Using HAProxy to load-balance multiple web servers

"The inside of a computer is as dumb as hell but it goes like mad!"—Richard Feynman

Back in the day, the way to speed up slow web servers was to add more cores. I recall one employer buying a monster 24-core Sun box the size of a Hummer. We had to have the data center door widened to get it in.

Scaling websites nowadays is still a matter of adding cores, but they either come in their own little beige boxes, as commodity hardware, or you rent them as as a wholesale compute resource from a cloud provider. In order to group all these cores together to serve a single website, we use load balancers.

Once, a load balancer was a big box that sat in a rack and cost eighty thousand dollars. Although you ...

Get Puppet 2.7 Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.