Answer the question
In order to leave comments, you need to log in
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
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question