Introduction

Single leader replication is a type of replication strategy commonly used in relational databases. Every database host that receives a copy of data is called a replica.

In a single leader replication:

  • The database selects one of the replicas as the leader. The client should send every modification request to the leader replica that writes it to its local storage engine.

  • Other replicas are called followers. Once the leader acknowledges the modification request, follower replicas synchronize the data from the leader through the replication log. The follower then persists the data changes to its local storage engine.

Followers apply the modification changes of data in the same sequence as the leader. In the event of a leader crash, the database chooses one of the up-to-date followers and promotes them as the leader.

These are the characteristics of a single-leader replication:

  • There can only be one leader at a point in time.

  • The client must send the modification requests to only the leader replica.

  • The client can send the read requests to the leader or follower replicas.

Get hands-on with 1200+ tech skills courses.