2

We have MySQL MASTER-SLAVE Replication (1 Master and 1 Slave) setup and everything is working fine.

Currently all load (reads/writes) are going to MASTER server. Now we want all writes to be redirected to only Master server and reads to be distributed between Master and Slave servers.

We are looking for a bit of clarification on the best strategy for that from below.

  1. HAProxy
  2. MySQL Proxy
  3. MySQL ROuter
Navrattan Yadav
  • 1,993
  • 1
  • 17
  • 22
  • Its not so easy. A SELECT direct behind a INSERT on the same Records can be a different Result. A good proxy to do this is MaxScale from MariaDB. – Bernd Buffen Dec 09 '15 at 07:26

1 Answers1

0

After researching, I came to the conclusion that here we need to use Ha-Proxy with Hybrid approach.

Eg: All right operations goes to 3306 port Ha-Proxy and read goes to 3307 port.

The logic to decide port must be implemented on programming side rather than Ha-Proxy side.

Navrattan Yadav
  • 1,993
  • 1
  • 17
  • 22