-
Notifications
You must be signed in to change notification settings - Fork 3
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
fix: Use Redis ConnectionManager to reconnect on failures #34
Conversation
How many times does the connection manager try to reconnect? Is there an exponential timeout? Are these parameters configurable? Because these reconnect attempts can cause performance issues on the Redis server side which could lead to DoS. |
Seems like they are using https://docs.rs/tokio-retry/latest/tokio_retry/ for that. They have some default values in https://docs.rs/redis/latest/src/redis/aio/connection_manager.rs.html#101-109, which I guess should be a good starting point |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM if sascha is happy :)
Co-authored-by: Malte Sander <malte.sander.it@gmail.com>
Thanks! That looks reasonable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just one question (non-blocking).
Previously trino-lb would not recover from a closed connection
Now the first call to redis will fail, but the following calls will work again