Tomcat – Spring Framework – MySQL, Load balancing design-Collection of common programming errors
-
-
For web load balancing, there are multiple solutions, opensource and paid, I personally have used cisco load balancers(CSM and ACE) and F5 and like them(but those solutions can get expensive). There are multiple for opensource, one that comes to mind is http://www.linuxvirtualserver.org/
-
For mysql load balancing, you can look at master to master replication for msyql. Look at: http://www.howtoforge.com/mysql_master_master_replication. What I have done in past for a project, I had 3 web servers serverfarm behind big IP(F5) and they all talked to one mysql server. And I had exact same setup in a different site, and both mysql servers had master to master replication. So users would use all the webservers and db servers and if one of the DB server, went down, web farm on that site would go down and users would only use the other site. (DNS failover and monitoring for multiple site monitoring and failover). You can use global load balancer if you have the budget to get more granular.
-
-
I would not recomend using MySQL Cluster. I have never seen it perform well and not crash alot. Havent used it in a while though (since it didnt realy work a year or so ago).
Simply use a master with slaves. Do al your read operations on the slaves (unless you need to read your own writes or data current to the ms). If that doesnt scale enough for you (you have to many writes). It is time to look at sharding.
Another option, if your application allows it (or can be turned into allowing