Optimize perlbal as reverse proxy.

dormando dormando at rydia.net
Thu Mar 20 23:35:43 UTC 2008

>     I didn't fully understand what you mean by scaling perlbal. it would
>     be great if you could shed some more light on it.

Add more, and have a fast L4 load balancer send client connections to
each, which use the same pool of backends. Although it's sounding more
like you don't really need perlbal here? What are you using it for?

>     Another thing I noticed is that if I force a specified rate, i get
>     upto 1100 connections/sec (double the amount if I don't specify).

What do you mean by force a specified rate? Rate on what?

For static image serving I've done setups where a fast L4 load balancer
sends the image connections to a pool of, say, lighttpd webservers
running out of large tmpfs partitions. Those can easily do 4,000+
requests/sec of small images. All dynamic requests L4 to a pool of
perlbals, which do "perfect" load balancing do the slower dynamic
pageviews, and for any mogilefs content.

I'd be great if you could spend a little effort profiling perlbal to see
just what might be slowest about it. We can still optimize hot paths.


>     Abhinav Akshay wrote:
>     > Hi,
>     >
>     > I am using perlbal as a reverse proxy. My set up includes three
>     > identical backend apache servers connected to the proxy server. (The
>     > backends are identical to share high demand.) I add/remove backend
>     > servers on the fly.
>     >
>     > The problem I am facing is that of optimization. If I direct traffic
>     > through the proxy server, I am able to achieve a rate of around 450
>     > connections/sec. However, if I directly connect to a single backend
>     > apache server, I get upto 2500 connections/sec.
>     >
>     > It would be great if I could get some tips to optimze the
>     perfomance of
>     > perlbal?
>     >
>     > Thanks,
>     > Abhinav.
>     >
>     > p.s: Other points about my setup:
>     > * I do use IO::AIO, (if that's a matter of concern).
>     > * Under heavy load, 'top' shows CPU usage as 99.9% by perlbal.
>     > * I use httperf as workload generator, the command to test the
>     > connection rate being: httperf --hog --server
>     > --uri=/static.html --num-conns=3000 --timeout=5
>     > * The backends and the proxy server are xen virtual machines hosted on
>     > same physical node.
>     >
>     >
>     ------------------------------------------------------------------------
>     > Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
>     > it now.
>     > >>
> ------------------------------------------------------------------------
> Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try
> it now.
> <http://us.rd.yahoo.com/evt=51733/*http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ

More information about the perlbal mailing list