Running multiple perlbal instances

Mark Smith smitty at
Tue Jan 29 20:55:00 UTC 2008

> Does anyone have some advice on running multiple perlbal instances on one
> multi-cpu box?  We're getting to the point where one perlbal instance is
> handling 30,000-45,000 connections/min and load is hitting 1.00.
> An easy solution would seem to be to have different perlbal instances
> handling different vips, but that introduces extra config files and what
> not.  It'd be nice to simply round-robin load balance between the two
> instances, without adding another full blown load balancer to the mix.
> Any suggestions,warnings?

This is actually a good setup - since Perlbal is single-threaded, you
have to do something like this to really take advantage of
multi-core/CPU machines.  Six Apart uses a setup like this:

* incoming requests to a hardware load balancer
* requests spread evenly over available Perlbal instances

Yes, this introduces separate configuration files for each to put them
on different ports.  It also requires the separate level of load
balancer, which sounds like something you're trying to avoid.

Perhaps you could configure something like lighttpd or apache to do
the proxying to Perlbal.  It's in C, will be far faster than Perlbal
on its own, and will still net you the same configuration flexibility
that you're used to with Perlbal.

If you really want to avoid that sort of setup, then you could do
something involving round robin DNS and putting each Perlbal on its
own IP.  Bind your various instances to various IPs (still requires
different configurations per Perlbal) and then have the users coming
in on different IPs... this has its own issues, but would avoid the
separate layer.

Mark Smith / xb95
smitty at

More information about the perlbal mailing list