On Sat, Dec 13, 2008 at 1: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?
I can't tell you which is better, but I can tell you that we have been very happy with squid. We run four load balanced squid proxies in front of all of our web servers and they never break a sweat. Squid is very efficient and can handle a massive amount of concurrent connections with minimal hardware requirements. We run them on old school single proc PIII DL360s as squid barely uses the CPU and just load them up with RAM since squid will use as much as you throw at it to serve cached content out of RAM instead of the disk. I'll include a few numbers below in case it helps out (these were taken on a Saturday afternoon, so definitely not peak time). We run an average of 10mb/s through our internet feed where most of the traffic is web traffic which all goes through the squids. Load balancer connection stats (notice that one of our squids is actually down for maintenance today) Prot LocalAddress:Port Scheduler Flags -> RemoteAddress:Port Forward Weight ActiveConn InActConn TCP xxx.xxx.xxx.xxx:8090 lc -> syd-webcache-04 Route 1 297 882 -> syd-webcache-02 Route 1 297 816 -> syd-webcache-01 Route 1 291 1169 -> syd-webcache-03 Route 0 0 0 syd-webcache-01: $ uptime 14:28:28 up 50 days, 22:17, 1 user, load average: 0.14, 0.12, 0.09 syd-webcache-01: $ vmstat 5 procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu---- r b swpd free buff cache si so bi bo in cs us sy id wa 0 0 750428 53064 38388 243800 8 7 4 1 9 5 4 2 91 3 0 0 750428 52224 38540 244844 0 0 222 43 845 620 3 4 88 4 0 0 750416 53492 38100 243768 5 0 270 72 865 571 5 3 88 4 1 1 750396 54108 37776 243300 19 0 351 82 988 770 7 6 82 5 800Mhz Pentium III (Coppermine) with 2Gb RAM and stripped SCSI disks We've been running this setup for several years now and it has never been a bottle neck for us (mind you we have never been slashdotted either :) ) Cheers, Cees Hek