Sobes.tech
Junior — Middle

What are the advantages and disadvantages of master-slave replication?

sobes.tech AI

Answer from AI

Master-Slave replication scheme implies that all data records and changes occur on the primary server (Master), while other servers (Slaves) receive copies of the data for reading.

Advantages:

  • Simplifies read scaling: Slaves can handle read requests, relieving the Master.
  • Increases fault tolerance: if the Master fails, a switch to a Slave is possible (although it requires additional configuration).
  • Centralizes writing: all changes go through one node, simplifying data consistency.

Disadvantages:

  • Replication delay: data on Slaves may be outdated at the time of reading due to synchronization delay.
  • Single point of failure for writes: if the Master crashes, writing becomes impossible until switched over.
  • Limited write scalability: all writes go through one server, which can become a bottleneck.

Thus, Master-Slave is well-suited for systems with high read load and relatively low write load.

What are the advantages and disadvantages of… - sobes.tech