Serving Static Files

Todd Lipcon todd at
Thu Aug 9 19:46:00 UTC 2007

If all of your static files match a regular expression, you can use a 
selector service with a matching plugin in order to forward them to a 
different reverse_proxy service.

You can find one such plug-in here:

I've taken that and adapted it more to fit our needs, in order to set a 
prioritized list of backend balancers. For example:

   URL_REGEXP 100 (?:jpg|gif|css|js)$    = static_service
   URL_REGEXP 0   .                      = balancer_service

If my plug-in seems to fit your application better than the Urlmatch 
above, let me know and I can probably send it along.


On Thu, 9 Aug 2007, Can Sar wrote:

> Hi,
> I just installed Perlbal and have it working with the default
> configuration but I want to figure out how to tell it to serve static
> files from a different machine (all with the same URL prefix). I was
> looking into reproxying, but it seems that this would make me talk to
> one of the main webservers (apache in my case) that would then send a
> redirect back and would then go to my static server (lighttpd). Is
> there a simpler way of having perlbal just directly talk to lighttpd
> without the extra roundtrips?
> Thank you very much for your help,
> Can Sar

More information about the perlbal mailing list