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

long durations when auto-pipelining enabled #1850

Open
moish83 opened this issue Jan 23, 2024 · 0 comments
Open

long durations when auto-pipelining enabled #1850

moish83 opened this issue Jan 23, 2024 · 0 comments

Comments

@moish83
Copy link

moish83 commented Jan 23, 2024

Hello,

We are using ioredis in our service, connecting to Amazon Elasticache service, every once in a while - happens sporadically in production, not at peak times, we get redis durations spiking (hundreds of milliseconds), the rest of the time redis response duration is at single digit milliseconds.

We've noticed that when the issue happens, there are several GET commands impacted by it, all in the same pipeline, we tried setting a timeout on the GET commands using Promise.race(), however the retry of the GET command on the same key, resulted in the same pipeline, hence we got it back at the same time with the original GET.

We've seen the commandTimeout option and would like to use that, however, this option is also affecting the connection command, which we don't want to limit to the same value as we do for GET commands, for that we use the connectTimeout option, which doesn't take precedence over the commandTimeout.

What we thought is if we can add the same mechanism like the autoPipeliningIgnoredCommands where we give a list of commands to not set the timeout, or event better a whitelist of commands to set the commandTimeout on, for example, in our case we expect the GET commands to be extremely fast, but we don't care if SET commands take a little bit longer.

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