P
P
paurlift2016-09-26 10:30:27
MySQL
paurlift, 2016-09-26 10:30:27

Load balancer MySQl replication in PHP?

In all frameworks known to me (Yii, Symfony, Zend), the choice of a slave server is random.
There are situations when a lot of heavy requests come to one slave, and there is no load on other servers.
There is an idea to implement a load balancer, which, for example, will poll the slave server every 10 seconds and save the load on the mysql server in the database.
Requests for a selection (SELECT) should not be sent randomly, but depending on the load on the servers.
The task should be quite popular, but I haven't found any framework extension or PHP script that does it.
Can you please tell me if there are any implementations? Maybe someone wrote something similar and can suggest an algorithm for such an implementation?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
A
Alexander Aksentiev, 2016-09-26
@Sanasol

www.haproxy.org

V
vyachin, 2016-09-26
@vyachin

https://downloads.mysql.com/archives/router/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question