-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Multiple connection strings for master-slave demotion/promotion. #830
Comments
Can be related to #821 - essentially multiple connection settings to support any kind of switching in redis |
We have also been bitten by this. Compose's Redis distribution is doing some maintenance soon, and will be failing back to their slave Redis instance during the outage. They recommend using a |
if I made a fork for this would someone even consider approving it? This has serious consequences for my company. |
humm.. @Mattsi-Jansky and @samuelt1 could you use the solution outlined #1050 ? If I'm understanding the solution of just specifying multiple connection strings, I can see cases where not everyone would want this. |
yeah, so that is how I am fixing this on my end. I just have my own function that will connect to all of the servers, and then drop the slaves but not the master. |
https://github.com/luin/ioredis/#cluster |
On ElasticCache, a redis cluster has one primary master read/write node and several secondary slave read-only nodes. The redis cluster periodically switches roles for nodes, exchanging master and slave nodes. The connection string to the ElasticCache is to the primary node when writes are needed. The createClient should be modified to take more than one connection port and host pair, and try each one in turn when an error like "Can't save packet:Error: READONLY You can't write against a read only slave." occurs so that the client can recover if the primary is switched while in operation.
The text was updated successfully, but these errors were encountered: