Skip to content
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

PUT and GET calls to redis are taking more time than Expected #3083

Open
prateeeka-nadimpalli opened this issue Aug 7, 2024 · 0 comments
Open

Comments

@prateeeka-nadimpalli
Copy link

Iam trying to put and get data into Redis from my go application. My application is typically running as a pod and redis as another pod for which I am trying to connect and publish data. I have 200 go routines running simultaneously for each poll with frequency 5 min and nearly these routines will do 7000 Redis PUT and GET calls. Its taking more time for processing than expected.

Expected Behavior

For each poll i need to process all these data and publish in atmost 1 min.

Current Behavior

I have enabled logs and and observed that for most of the calls its taking more than 2 minutes. This results in late processing of data. And even if i set any timeout the call is being automatically discarded.

Possible Solution

Please suggest if there need to be any configuration changes from the redis we are using. If its issue from the go redis library itself, check if its possible to increase the asynchronous processing of the internal redis client PUT GET function. It would be better if you can provide any go code snippet on how to connect and do asynchronous calls to redis in an efficient way to avoid these kind of issues.

Steps to Reproduce

  1. Write a standalone where 200 go routines are running
  2. For each go routine post 30 random GET or PUT calls
  3. before put and get calls add loggers with start time, end time and time taken so that you might observe the issue

Context (Environment)

We have a frequency of 5 minutes for posting data. But due to the time taking in this calls, each poll is taking more than 5 minutes, due to which, the previous and current poll is getting collided and its being infinite process. Because of this all the polls data is getting discarded and couldn't publish to cloud. Its effecting our monitoring widely.

@prateeeka-nadimpalli prateeeka-nadimpalli changed the title PUT and GET class to redis is taking more time than Expected PUT and GET calls to redis are taking more time than Expected Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant