Posts Tagged ‘dns’

Load balancing on the cheap: DNS balancing

Thursday, July 3rd, 2008

So you can’t afford a F5 load balancer? But your Apache server is dying under the load?
We had to use load balancing using DNS because we had scaling issues. Fast and good fix (just add a box and one line of code).

Create different DNS entries for different front side Apache servers:

And in your code (PHP):

$baserUrl = "www".rand(1,3)."";