Introduction to Distributed Redis Architectures

Learn how to run Redis across multiple servers for scalability and high availability.

Redis architectures

Redis is a high performance database and a single Redis server can go a long way. But we can also run Redis across multiple servers if data requirements exceed the limitations of a single server. This also ensures high availability and redundancy.

This lesson will provide an introduction to the following Redis architectures:

  • Primary-replica

  • Redis sentinel

  • Proxy

  • Redis Cluster

Primary-replica

The primary-replica architecture, also known as leader-follower architecture, lays the foundation of operating Redis in a highly available and distributed manner. There are multiple Redis servers (or nodes), one of which is designated as the primary node (also known as the leader node) and others acts as replicas (or followers). Data is replicated from primary to replica nodes. This allows the replica nodes to be exact copies of the primary node.

The replication process is asynchronous, meaning that the primary node doesn’t need to wait for a command to be processed by the replicas. This ensures that the replication is executed with low latency and high performance. The primary node is aware of which command the replica has processed because the replicas periodically acknowledge the amount of data they’ve received.

Get hands-on with 1200+ tech skills courses.