just recently I got responsible for an existing project that uses Apache webservers and MySQL databases.
The webserver are behind a HAProxy loadbalancer and the application connects to the MySQL slaves via another HAProxy.
2 of the 10 webserver were added just recently and are more powerful than the old ones. The same for the MySQL slaves: 2 of these 5 slaves have more RAM and CPUs.
The balancing algorithm for the Apache servers is leastconn and for the slaves is source. At least the settings for the MySQL servers I find odd because in the worst case the "best" apache (with the most weight) can always pick the worst MySQL server if I understand the HAProxy Docs right. I'd pick roundrobin with adjusted weights:
- 10 for the three normal MySQL server
- 20 for the two stronger MySQL server
And because the apaches are behind the HAProxy with a 20s timeout, I'd rather apply roundrobin, too.
- 10 for the eight normal apache server
- 20 for the more powerfull apache server
(I would use the 20 just for a start. I'm going to watch the monitoring and will have it adjusted later.)
Because the the servers are in colocation (as in: I have not root access, change requests take some time) I'd just like to have a second (or more) opinion on this topic: is it a good idea to change the balancing algorithm for both to roundrobin ? I wouldn't consider this if there weren't any performance problems just recently and this is just one place that I find worth tweaking.
Thanks for any/ your advice!
Regards dennis