Linux – Load Balancing Two Linux Apache Servers

apache-2.2linuxload balancing

I am wondering how I can set this up. I only have the two servers available to me, and I want to be able to deliver the same content from both, but have the load distributed so one server doesn't get bogged down. How would I go about doing this? Any kind of tutorials out there?

Best Answer

Here are a few ways to do it:

  1. DNS load balancing - RR or Weighted RR.
  2. Use a HAProxy on both, and let them LB between themselves.
  3. Write URLs on your page so that they load balance across both - if dynamic.