Master-slave configuration
Each of the solutions discussed previously have their own pros and cons. If a Redis container configured to save data to file fails, there are chances of losing the data; on the other hand, if it is configured to use AOF type persistence the new container might take more time to replay the logs. To build reliable and high performance web applications, the underlying sub-systems should also be available and performing as well. The ideal solution for promising round-the-clock availability is replication. Redis contains a built-in replication feature which is simple yet effective. Redis allows the master to save exact copies of itself as slaves. It uses asynchronous replication while copying data to slaves which increases the reliability of the cache service: since master is not kept busy during replication, the performance of the upstream systems during replication are not impacted. Further slaves can also talk to other slaves in a cascading style so that writes...