You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I'm use local cache using Ristretto to reduce the latency of data retrieval. I'm retriving around 60000 cache keys per second at peak traffic. I tried searching but not able to find a multi get solution for retriving data so I'm looping over the number of cache keys and doing Get() to retrieve data from local cache.
Sharing some comparison calculation for latency:
Local cache:
Avg latency: 0.00994 ms
Cache keys in a request 1000
Total latency in one request: 9.94 ms
Redis Mget:
Avg latency: 2.18 ms
Cache keys in a request 1000
Reducing cache keys per request can help in reducing this but due to goroutines throttling added in system I can only take this upto 500 cache keys per request.
Question.
Hi,
I'm use local cache using Ristretto to reduce the latency of data retrieval. I'm retriving around 60000 cache keys per second at peak traffic. I tried searching but not able to find a multi get solution for retriving data so I'm looping over the number of cache keys and doing Get() to retrieve data from local cache.
Sharing some comparison calculation for latency:
Local cache:
Avg latency: 0.00994 ms
Cache keys in a request 1000
Total latency in one request: 9.94 ms
Redis Mget:
Avg latency: 2.18 ms
Cache keys in a request 1000
Reducing cache keys per request can help in reducing this but due to goroutines throttling added in system I can only take this upto 500 cache keys per request.
Code reference:
How can I optimise my code so I don't have to loop for Get() operations?
The text was updated successfully, but these errors were encountered: