NOSQL – Redis: Handling failover?

Redis really seems to be a great product with built-in replication and amazing speed. After testing, it definitely feels like a 2010 memcached replacement.

However, since memcached is usually used, consistent hashing is being used to evenly distribute the data on the servers in the pool. If one of the servers in the pool stops running and stops accessing, then it will be transparently Processing, only the lost keys will be recreated and evenly distributed among the remaining available servers in the pool.

On the other hand, Redis also has built-in sharding, and another very interesting feature It is called automatic replication. Because of this, the availability of data can be greatly improved when the slave server is used to handle the fan.

However, I have not found any good solution to handle the redis server as a slave The status of the station is changed to the status of automatically becoming the new host, or the failover with Redis is automatically handled by other means.

How can this be done? What is the appropriate method?

However, since when normally using memcached, a consistent hashing is being used to evenly spread out the data across the servers in a pool. If one of the servers in the pool goes down and stops being accessible, it is being handled transparently and only the keys that were lost will be recreated and evenly distributed across the remaining available servers in the pool.

This is not what memcached does, the client library is doing all this magic;)

However, I have yet not found any good solution to handle changing a redis server’s status as a slave to become a new master automatically or by any other way automatically handling the failover with Redis.

Use SlaveofCommand to change the characteristics. Automatic failover will require more coding to connect to the server, and if you loose the connection and cannot establish a period of time X again, select a slave to be the master and change the slaves of all other servers Station host status.

Update (August 1, 2012): Redis sentinel version is now available, which is a monitoring and automatic failover solution for version 2.4.16 and higher.

Landis really seems to be a great product with built-in replication and amazing speed. After testing, it definitely feels like 2 Memcached was replaced in 010.

However, since memcached is usually used, consistent hashing is being used to evenly distribute the data on the servers in the pool. If one of the pools is The server stops running and stops accessing, then it will be handled transparently, and only the lost keys will be recreated and evenly distributed among the remaining available servers in the pool.

On the other hand, Redis Sharding is also built-in, and another very interesting feature is called automatic replication. Because of this, the availability of data can be greatly improved when the slave server is used to handle the fan.

However, I have not yet Find any good solution to deal with changing the state of the redis server as a slave to the state of automatically becoming a new host, or automatically handle failover with Redis by other means.

How can this be done? What is the appropriate method?

However, since when normally using memcached, a consistent hashing is being used to evenly spread out the data across the servers in a pool . If one of the servers in the pool goes down and stops being accessible, it is being handled transparently and only the keys that were lost will be recreated and evenly distributed across the remaining available servers in the pool.

This is not what memcached does, the client library is doing all these magic 😉

However, I have yet not found any good solution to handle changing a redis server’s status as a slave to become a new master automatically or by any other way automatically handling the failover with Redis.

Use SlaveofCommand to change features. Automatic failover will require more , Connect to the server, and if you loose the connection and cannot establish a period of time X again, select a slave to be the master, and change the slave host status of all other servers.

Update (August 1, 2012): Redis sentinel version is now available, which is a monitoring and automatic failover solution of 2.4.16 and higher.

Leave a Comment

Your email address will not be published.