Troubleshooting replication
In a real production environment, you may run into many issues and get into trouble when using Redis replication. Many factors, such as disk I/O, network connectivity, the size of datasets, and long blocking operations, may become the root cause of replication failures.
In this recipe, we will take a look at a few replication failure cases and solutions to see what we can do if replication is not working as expected.
Getting ready…
You need to finish the installation of the Redis Server as we described in the Downloading and installing Redis recipe in Chapter 1, Getting Started with Redis. You should also finish setting up replication, as described in the Setting up Redis replication recipe in this chapter.
To generate a large amount of sample data, we use fake2db
mentioned in the Managing keys recipe in Chapter 2, Data Types to populate some fake data to Redis. Due to differing hardware performance, it may take you several hours to finish the data population:
# fake2db...