On Fri, Dec 12, 2008 at 6:02 PM, Jeff Pang <pa...@laposte.net> wrote: > Hello, > > I have a modperl application on a host which is running with heavy load. > I have the plan to put a reverse proxy before it. > There are two well known reverse proxy software, one is Squid, another is > nginx. > Which one is better for modperl application? or is there any others which > are better than these two?
Perlbal is my reverse proxy of choice. In addition to being able to handle tens of thousands of connections to the client without breaking a sweat, it is written in Perl and isn't that hard to customize once you grok the event driven programming in it; that is a really big selling point for me as a Perl programmer. It also has a cool feature called reproxying. Take for example, perlbal running as a reverse proxy to mod_perl. If you get a request for a file or url resource such as an image, you can code mod_perl to return headers with 'X-Reproxy-Url: http://someurl.com/file.txt' and perlbal will asynchronously proxy that file from the resource to the client, leaving mod_perl free to service new requests. The load balancing feature in perlbal is excellent. It keeps track of the number of busy httpd backends, automatically removing those which don't respond, and allowing you to run many mod_perl servers behind one perlbal server. And Perlbal has a plugin architecture that you can use to code up request rewrite or similar functionality as plugins.