Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I currently have 1 mysql server running and want to install 2 seperate mysql VPS'es. Maybe one master for inserts/updates and one slave for selects. What is the best setup for this if I have the following requirements:

  • Run backups on machine
  • When my mysql backups run on the slave machine it generates a high load. Can the master decide to take over some selects to reduce the loads?

Is there a way that the master decides where to execute the query (load balancing)? Is it possible to send all queries to one master and the master decides if he sends it to the slave, so I don't have to make 2 connections in my php code (1 for select, 1 for updates)?

Thanks, Ward

share|improve this question

migrated from Aug 26 '11 at 17:41

This question came from our site for system and network administrators.

You might look into MySQL Proxy. Features include:

  • load balancing
  • failover
  • query analysis
  • query filtering and modification

I haven't run it myself, but it seems to cover what you want.


Apparently the Read/Write splitting is a proof of concept and not for production use

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.