tech-notes-and-questions

Master-Slave Architecture

In database terminology, master-slave architecture (now often referred to as primary-replica or leader-follower) is a replication model where one database instance (the master) serves as the authoritative source, while one or more secondary instances (the slaves) are copies of the master database.

Master (Primary):

Slave (Replica):

Use Cases:

Scalability:

By offloading read queries to slave databases, the load on the master can be reduced, allowing better performance.

Fault Tolerance:

If the master fails, the system can switch to a slave to ensure continuity.

Backup:

Slave databases can be used to perform backups without affecting the master’s performance.

Example:

This architecture has become less popular due to the naming convention and the shift towards more modern, distributed database systems. Many systems now use terms like primary-replica to describe the same concept.