0

I have a Ubuntu production server running apache2 and tomcat6 both on port 80 with mod_jk setup hosting some jsp pages. And also, all the client's informations are stored in the mysql databases on the same server. And CDN is used for static contents.

We are planning to setup like Clustering/Load Balancing/High Availability, whatever it's called so that if production server is down/destroyed, other will be hosting services without any down time.

I want to know how many ways I could do this with two servers or with any other, could anybody short-list?. I also want the good guides whereby I could achieve this.

I know many would have setup load balancing for the web servers and I request you all to help guiding me in right direction sharing your knowledge.

Thank you!

user53864
  • 1,723
  • 11
  • 37
  • 66

1 Answers1

1

With only two servers, not that many.

A good HA/Load Balanced setup is 3 servers;
2 Application servers
1 Frontend server The frontend server runs a 'proxy' (Something like NGINX, Squid or Apache) that forwards the requests on to the application servers

An /ideal/ setup is 4 servers;
2 application servers
2 frontend servers
The frontend servers would run heartbeat IP failover and maybe even have DNS round robin.

With only two servers the only option is to run the frontend server on one or both of your application servers, which adds extra load and extra responsibilities to them that might affect the performance of your application.

  • Thanks you!. what about the mysql? which also should be availabel all time where in which client's info is stored! – user53864 Jun 17 '11 at 11:49
  • I want to start with minimal setup(as it's not possible with 2 servers, may be with 3). I could not find any link that is related to me which gives good guide to `HA` and `load balancing` for `apache tomcat+mod_jk+mysql` – user53864 Jun 17 '11 at 11:53
  • For MySQL, I'm also looking at `master-slave` and `master-master` replication for mysql ha & lb. With master-slave I may have HA but with some down time and with master-master, many are speaking about conflicting problem – user53864 Jun 17 '11 at 11:58
  • I'm also looking at `HAProxy` which may only be related to web ha & lb. I don't understand that if `roundrobin DNS` is mandatory for any HA and lb setup. – user53864 Jun 17 '11 at 12:01