Lettuce initial latency spikes #2476
Unanswered
surajrajanmyntra
asked this question in
Q&A
Replies: 1 comment
-
Without knowing further details it's impossible to say why this is. Generally, the client startup takes a bit, however, once the first connection is established, you should not see any latency in the range of seconds. Have you been able to reproduce the issue outside of your application? I recommend using a profiler to find out the hotspots. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
We are using Lettuce version 5 in our Spring Boot project, along with Redis version 6.
Our Redis read preference is set to ALL.
We have noticed that the initial Redis calls through Lettuce exhibit high latency, ranging from 1 to 2 seconds, for the first one to two minutes.
After this period, the latency subsides and stabilizes around 5 to 10 ms. Interestingly, if we make some initial calls to Redis during the application start-up, we do not observe this initial latency spike.
Does this suggest that our application needs to establish a connection to all the Redis ports during the warm-up before handling actual traffic?
Additionally, could this be related to the ioThreadPool or computationThreadPool, given that Lettuce performs lazy initialization of threads within the thread pool?
Beta Was this translation helpful? Give feedback.
All reactions