# Load balancing

**URL:** <https://forums.percona.com/t/load-balancing/2046>\
**Category:** LAMP Stack\
**Created:** [December 8, 2008, 9:52am UTC](https://forums.percona.com/t/load-balancing/2046 "2008-12-08T09:52:32Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![razdaman](https://avatars.discourse-cdn.com/v4/letter/r/b5a626/32.png) [@razdaman](https://forums.percona.com/u/razdaman)\
**Post date:** [December 8, 2008, 9:52am UTC](https://forums.percona.com/t/load-balancing/2046/1 "2008-12-08T09:52:32Z")

</div>

Hi there,

I’ve got a website served with three web servers and a single database server. Currently we’re behind our hosting centre’s large and expensive hardware load balancer.

As we are currently considering switching to another hosting centre, we might get the responsibility for the load balancing ourselves in the future. Therefore, I’m currently researching the different possibilities within load balancing.

I see the following to solutions:

1. A software based load balancer.  
We buy a new cheap server on which we install apache with mod\_proxy\_balancer (recommendations on other software are welcome). This server will point to our other web servers. What is the typical bottleneck on a machine like this? Cpu?
2. Buy a “real” hardware load balancer.  
I consider this the best solution based on what I’ve heard from other people’s experiences. However, this is also a bit more expensive I think. Can you recommend some good brands/models?

What do you think of the above proposed solution? What would you recommend? The more details you can give me the better )

Thanks in advance!

---

<div class="post-metadata">

**Author:** ![debug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/debug/32/772_2.png) [@debug](https://forums.percona.com/u/debug)\
**Post date:** [December 19, 2008, 2:12am UTC](https://forums.percona.com/t/load-balancing/2046/2 "2008-12-19T02:12:26Z")

</div>

Hi,

I can recommend you using Pfsense: [URL][http://pfsense.org/[/URL]](http://pfsense.org/%5B/URL%5D)  
It is a software router/firewall/balancer based on FreeBSD. It is configured through web interface. We have a wide experience of using Pfsense, and it works fine.

---

<div class="post-metadata">

**Author:** ![manhnd](https://avatars.discourse-cdn.com/v4/letter/m/977dab/32.png) [@manhnd](https://forums.percona.com/u/manhnd)\
**Post date:** [December 22, 2008, 1:51am UTC](https://forums.percona.com/t/load-balancing/2046/3 "2008-12-22T01:51:44Z")

</div>

Hi razdaman

I think you can use haproxy for load balancer software or squid with mode reverse.

I was used both haproxy and squid. It’s very good for your problem

---

<div class="post-metadata">

**Author:** ![jerome](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jerome/32/807_2.png) [@jerome](https://forums.percona.com/u/jerome)\
**Post date:** [April 30, 2009, 6:16am UTC](https://forums.percona.com/t/load-balancing/2046/4 "2009-04-30T06:16:53Z")

</div>

Hi razdaman,

you could also give a try to Varnish : [URL=“http&#58;&#47;&#47;varnish.projects.linpro.no/.”][http://varnish.projects.linpro.no/.[/URL]](http://varnish.projects.linpro.no/.%5B/URL%5D)

It does Load Balancing and is a fantastic HTTP accelerator.

Here is a example on how to configure Varnish to do load balancing : [URL=“http&#58;&#47;&#47;varnish.projects.linpro.no/wiki/VCLExampleDirector”][http://varnish.projects.linpro.no/wiki/VCLExampleDirector[/URL]](http://varnish.projects.linpro.no/wiki/VCLExampleDirector%5B/URL%5D)

)

---

<div class="post-metadata">

**Author:** ![debug](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/debug/32/772_2.png) [@debug](https://forums.percona.com/u/debug)\
**Post date:** [April 30, 2009, 8:06am UTC](https://forums.percona.com/t/load-balancing/2046/5 "2009-04-30T08:06:27Z")

</div>

| [B]jerome wrote on Thu, 30 April 2009 18:46[/B] |
| Hi razdaman,

you could also give a try to Varnish : [URL=“http&#58;&#47;&#47;varnish.projects.linpro.no/.”][http://varnish.projects.linpro.no/.[/URL]](http://varnish.projects.linpro.no/.%5B/URL%5D)

It does Load Balancing and is a fantastic HTTP accelerator.

Here is a example on how to configure Varnish to do load balancing : [URL=“http&#58;&#47;&#47;varnish.projects.linpro.no/wiki/VCLExampleDirector”][http://varnish.projects.linpro.no/wiki/VCLExampleDirector[/URL]](http://varnish.projects.linpro.no/wiki/VCLExampleDirector%5B/URL%5D)

)

 |

I won’t recommend it for production yet. Maybe a bit later…
