Home » Performance » LAMP » Load balancing
Load balancing [message #3775] Mon, 08 December 2008 10:22 Go to next message
razdaman  is currently offline razdaman
Messages: 26
Registered: May 2007
Junior Member
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 Smile

Thanks in advance!

[Updated on: Wed, 17 December 2008 09:50]

Re: Load balancing [message #3822 is a reply to message #3775 ] Fri, 19 December 2008 02:42 Go to previous messageGo to next message
debug  is currently offline debug
Messages: 132
Registered: March 2008
Senior Member

Hi,

I can recommend you using Pfsense: http://pfsense.org/
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.


Mikhail Solovyev, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
Re: Load balancing [message #3835 is a reply to message #3775 ] Mon, 22 December 2008 02:21 Go to previous messageGo to next message
manhnd  is currently offline manhnd
Messages: 2
Registered: December 2008
Junior Member
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
Re: Load balancing [message #4338 is a reply to message #3775 ] Thu, 30 April 2009 07:46 Go to previous messageGo to next message
jerome  is currently offline jerome
Messages: 5
Registered: April 2009
Junior Member
Hi razdaman,

you could also give a try to Varnish : http://varnish.projects.linpro.no/.

It does Load Balancing and is a fantastic HTTP accelerator.

Here is a example on how to configure Varnish to do load balancing : http://varnish.projects.linpro.no/wiki/VCLExampleDirector

Smile
Re: Load balancing [message #4339 is a reply to message #4338 ] Thu, 30 April 2009 09:36 Go to previous messageGo to next message
debug  is currently offline debug
Messages: 132
Registered: March 2008
Senior Member

jerome wrote on Thu, 30 April 2009 18:46

Hi razdaman,

you could also give a try to Varnish : http://varnish.projects.linpro.no/.

It does Load Balancing and is a fantastic HTTP accelerator.

Here is a example on how to configure Varnish to do load balancing : http://varnish.projects.linpro.no/wiki/VCLExampleDirector

Smile


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


Mikhail Solovyev, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
Re: Load balancing [message #4340 is a reply to message #4339 ] Thu, 30 April 2009 10:28 Go to previous messageGo to next message
jerome  is currently offline jerome
Messages: 5
Registered: April 2009
Junior Member
debug wrote on Thu, 30 April 2009 15:36


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


Can you please explain this a bit more ?

Smile
Re: Load balancing [message #4341 is a reply to message #4340 ] Thu, 30 April 2009 10:47 Go to previous messageGo to next message
debug  is currently offline debug
Messages: 132
Registered: March 2008
Senior Member

jerome wrote on Thu, 30 April 2009 21:28

debug wrote on Thu, 30 April 2009 15:36


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


Can you please explain this a bit more ?

Smile



It was a few months ago, I don't remember details already.. We used it on highly loaded production, and there were multiple issues..


Mikhail Solovyev, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
Re: Load balancing [message #4342 is a reply to message #4341 ] Thu, 30 April 2009 11:04 Go to previous messageGo to next message
jerome  is currently offline jerome
Messages: 5
Registered: April 2009
Junior Member
debug wrote on Thu, 30 April 2009 16:47


It was a few months ago, I don't remember details already.. We used it on highly loaded production, and there were multiple issues..


Maybe it was a bit after the 2.0 version was released there were some annoying issues which are now fixed if I remember well.

I already deployed Varnish on a few overloaded production site and I never got any issues with it. I also used to do backend switching and it worked fine too.

Which platform did you use it on ?

Smile
Re: Load balancing [message #4343 is a reply to message #4342 ] Thu, 30 April 2009 12:16 Go to previous messageGo to next message
debug  is currently offline debug
Messages: 132
Registered: March 2008
Senior Member

jerome wrote on Thu, 30 April 2009 22:04

debug wrote on Thu, 30 April 2009 16:47


It was a few months ago, I don't remember details already.. We used it on highly loaded production, and there were multiple issues..


Maybe it was a bit after the 2.0 version was released there were some annoying issues which are now fixed if I remember well.

I already deployed Varnish on a few overloaded production site and I never got any issues with it. I also used to do backend switching and it worked fine too.

Which platform did you use it on ?

Smile



Not sure about the version, here is what I can find:

varnishd (varnish-trunk)
Copyright (c) 2006-2008 Linpro AS / Verdens Gang AS

Was using it on 64bit CentOS 4, and CentOS 5.


Mikhail Solovyev, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
Re: Load balancing [message #4346 is a reply to message #4343 ] Fri, 01 May 2009 13:18 Go to previous messageGo to next message
jerome  is currently offline jerome
Messages: 5
Registered: April 2009
Junior Member
debug wrote on Thu, 30 April 2009 18:16


Not sure about the version, here is what I can find:

varnishd (varnish-trunk)
Copyright (c) 2006-2008 Linpro AS / Verdens Gang AS

Was using it on 64bit CentOS 4, and CentOS 5.


Maybe using the trunk version was the reason why you get a weird behaviour.

Maybe you could test the new 2.0.4 release for your next projects.

http://sourceforge.net/project/showfiles.php?group_id=155816

Have a nice day.

Smile
Re: Load balancing [message #4352 is a reply to message #4346 ] Sat, 02 May 2009 14:46 Go to previous messageGo to next message
debug  is currently offline debug
Messages: 132
Registered: March 2008
Senior Member

jerome wrote on Sat, 02 May 2009 00:18

debug wrote on Thu, 30 April 2009 18:16


Not sure about the version, here is what I can find:

varnishd (varnish-trunk)
Copyright (c) 2006-2008 Linpro AS / Verdens Gang AS

Was using it on 64bit CentOS 4, and CentOS 5.


Maybe using the trunk version was the reason why you get a weird behaviour.

Maybe you could test the new 2.0.4 release for your next projects.

http://sourceforge.net/project/showfiles.php?group_id=155816

Have a nice day.

Smile




Hehe, we used trunk version, because it had bugfixes for some bugs which were critical for us. I don't really like using development versions on production, but we had to do this, because of some problems in release version.
I will have a look at new version, though we already use squid, and I will have a chance to test it only on some other project. BTW, do you know what kind of load tests are done on Varnish before release?


Mikhail Solovyev, MySQL Performance Expert
MySQL Performance Blog
MySQL Consulting
Re: Load balancing [message #4353 is a reply to message #4352 ] Sun, 03 May 2009 05:48 Go to previous message
jerome  is currently offline jerome
Messages: 5
Registered: April 2009
Junior Member
debug wrote on Sat, 02 May 2009 20:46


Hehe, we used trunk version, because it had bugfixes for some bugs which were critical for us.


Ha ok.

debug wrote on Sat, 02 May 2009 20:46


I don't really like using development versions on production, but we had to do this, because of some problems in release version.


I do not really doing like this either but in that situation it definitely makes sense.

debug wrote on Sat, 02 May 2009 20:46


I will have a look at new version, though we already use squid, and I will have a chance to test it only on some other project. BTW, do you know what kind of load tests are done on Varnish before release?


Unfortunately I do not know.
There is a regression test suite available here :
http://varnish.projects.linpro.no/browser/trunk/varnish-tool s/regress but I found nothing about load tests.

Smile
Previous Topic:MySQL very slow for big SELECT - Optimize MySQL
Next Topic:How would you set this up
Goto Forum:
  


Current Time: Fri Jul 10 03:26:09 EDT 2009

Total time taken to generate the page: 0.11116 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 2.7.7.
Copyright ©2001-2007 FUD Forum Bulletin Board Software

MySQL is a trademark of Sun Microsystems.
InnoDB is a trademark of Oracle Corp.

Percona Performance Forums are a service of Percona, Inc.
Not affiliated with Sun Microsystems or Oracle Corp.