Let's suppose a system that has a MySQL master server and a slave.
A lot of read\write is happening on the master server and I choose to perform a heavy slow query on the slave.
What could happen? Could the master server show some slowdown?
Let's suppose a system that has a MySQL master server and a slave.
A lot of read\write is happening on the master server and I choose to perform a heavy slow query on the slave.
What could happen? Could the master server show some slowdown?
Using a replicated slave server for read only queries for such things as reporting is common practice.
Replication on the master reads from the log file and does not hit the actual database tables. Replication on the master side does not perform any queries, so no real database load.
Replication has its own thread on the master server, and while it's blocked, it should not stop normal database operations.
MySQL replication is able to fully recover after a crash and will automatically pick up where it left off.
There is one caveat. With MySQL 5.5+, MySQL supports (default is off) Semisynchronous Replication, where a database request on the master won't respond to the client until after the slave has confirmed receipt of the transaction. If it times out waiting for the slave to respond, MySQL will revert to asynchronous replication. When it's determined that the slave has caught up, it will attempt semisynchronous replication again.
This means that if you run a query that just completely bogs down the slave server, you may see a delay of up to 10 seconds on the master side, but after that, nothing should be impacted. You can configure the timeout.
Also, if all of these servers share the same network bandwidth, consider that returning large result sets from either server may cause issues if you reach the maximum capacity of your bandwidth.