As a cache server, redis has very powerful functions.
Redis also provides the master-slave mechanism. The slave synchronization time is on the testing machine (unit: MS ). In the figure, the master and slave nodes are distributed in two data centers, and the access time is around 0.88ms.
However in the http://redis.io/topics/replication there is such a sentence: When a master and a slave reconnects after the link went down, a full Resync is completed MED.
This means that if there is 10 GB Data in redis, and slave redis disconnects for any reason, slave will re-Synchronize the 10 GB Data. When slave needs to accept the read operation and the network is unstable, problems will certainly occur as the data volume increases.
To solve this problem, we re-designed the redis synchronization policy: first, store a list in redis and insert the list when there is data. Second, the local script monitoring queue is not empty, synchronize data to the Server Load balancer instance.
This design ensures that when the network between the master and slave is disconnected, you do not need to re-Synchronize all the data, but only need to synchronize the data in the list.
List Operation: http://www.cnblogs.com/stephen-liu74/archive/2012/02/14/2351859.html
CodeFollow-up