-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[QUESTION] Need some more context on cached_response_duration_seconds #443
Comments
you should assess the performance of your redis to see if it's the bottleneck |
are you storing large results in redis (lmore than 1 MBytes )? |
yes some results are big, more than 1MB. |
Here is the rational of this choice: If the remaining TTL in Redis is too small, we took the decision to first put the data into a file before streaming it to the client. It's to prevent the case where the client is too slow (because it's doing some business logic while consuming the stream or because its network connection is bad) and the object in Redis expire before the end of the stream, which would lead to an error from CH proxy. With this design choice, the client is guaranteed to have an answer from chproxy because if the transfer into the file fails, the retry mechanism will be triggered and the SQL query will be done in live from clickhouse then put into cache and given to the client. If you want, you can add a PR to allow the modification of the hardcoded 2MB bulk size using a configuration variable (that would be at 2MB by default). |
sure, let me raise that. this might fix the slowness we are facing |
ok, if it helps here is an example of a previous PR that was aiming to adding a new configuration variable |
Which feature your question relates to?
Can I get some more context what does cached_response_duration_seconds metric is calculating.
From what I understand, it is calculating the time, from the time it received request to the time it sent the response, incase of a cache it.
And if it is correct, the cached_response_duration_seconds I'm getting is way more that I would expect
Average time is sometimes going over 3s.
The text was updated successfully, but these errors were encountered: