HiveBrain v1.2.0
Get Started
← Back to all entries
patternsqlMinor

What are the limits on the amount of slaves per master?

Submitted by: @import:stackexchange-dba··
0
Viewed 0 times
thewhatperareamountlimitsslavesmaster

Problem

I currently have a Master with 2 slaves, all running MySql 5.5.

What are the limitations on the amount of slaves I can connect to a single master? what parameters should be taken into affect?

Solution

There are no limits in terms of settings, but you need to be cognizant of some aspects.

You could use semisynchrnous replication as it uses a nice algorithm for shipping SQL to Slaves by making sure at least one server has all the latest SQL in the Slaves relay logs. (See my August 5, 2011 post Is MySQL Replication Affected by a High-Latency Interconnect?)

However, semisynchronous replication is only good for one out of N Slaves.

Whether you have semisynchronous replication or not, it would suffice to say that the more Slaves you have, the more CPU processing a Master has to do to keep its Slaves up-to-date.

For a Master with N Slaves, that's...

  • N SQL Statements to send to Slave



  • N Acknowledgments from Slaves 1-N that SQL was Executed



With semisynchrnous replication, it is not much better because For a Master with N Slaves, that's ...

  • N SQL Statements to send to Slave



  • Acknowledgments from Slave



  • 1 Acknowledgment that a Slave 1 received the latest SQL



  • N-1 Acknowledgments from Slaves 2-N that SQL was Executed



If you have to have many Slaves, think of using a Distribution Master in a Star Topology

  • Best way to setup master to multi master replication



  • Is it a good idea to split MySQL DB into two servers



  • Infrastructure for Highly Concurrent, High Write DB



  • https://stackoverflow.com/a/5784578/491757



If you cannot setup a Distribution Master in a Star Topology, then here is my simple rule: Use Semisynchrnous Replication but use as few Slaves as possible.

Context

StackExchange Database Administrators Q#20601, answer score: 3

Revisions (0)

No revisions yet.