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

Support for blocking redis commands such as BRPOP and BLPOP #519

Closed
mcanonic opened this issue Feb 21, 2017 · 2 comments
Closed

Support for blocking redis commands such as BRPOP and BLPOP #519

mcanonic opened this issue Feb 21, 2017 · 2 comments

Comments

@mcanonic
Copy link

Hi,
I saw the notes/redis.md file and I'm wondering if the unsupported commands are somethin that you are working on it or not. Just to know if the (near?) future these commads like BRPOP e BLPOP will be supported.
Thanks
M

@MichaelScofield
Copy link

any update?

@TysonAndre
Copy link
Collaborator

It's very likely the decision to leave it out was deliberate on the part of the original maintainers - it was documented that the command is not supported.

If twemproxy has 200 clients and a small number of redis servers, and one of them issues a BRPOP or BLPOP, then 199 other clients will see an unexpected pause of an unknown length (for commands forwarded to the same server), possibly even seconds, causing an unexpected delay and adversely impacting the overall host/application performance, in a reason that those 199 clients have no visibility into.

  • Currently, I believe twemproxy only supports a single server connection, even if the configuration allows more than one connection to a backend server.
  • This would manifest as random pauses and would make twemproxy appear to be extremely unreliable
  • Application authors would need to know what twemproxy's timeouts were, in order to make sure that a lower timeout was passed to BLPOP, etc.

As a workaround, it's already possible to call BLPOP/BRPOP in lua scripting (eval) if you're sure that your use case has timeouts properly configured or won't have adverse performance impact from blocking commands interfering with non-blocking commands.

  • In theory, separate server connections could be allocated for use exclusively with blocking commands, but that goes against the current design, and is difficult to implement correctly in C

@TysonAndre TysonAndre changed the title Support for BRPOP and BLPOP Support for blocking redis commands such as BRPOP and BLPOP Jul 2, 2021
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

3 participants