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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.