Hi, Let me just update a bit your configuration:
frontend www_fe bind :8080 mode http maxconn 4096 default_backend www_be acl spiderbots hdr_sub(user-agent) -i -f /etc/haproxy/spiderbotlist.lst use_backend spider_backend if spiderbots backend www_be mode http server be1 127.0.0.1:80 check maxconn 100 backend spider_backend mode http acl too_fast be_sess_rate gt 10 acl too_many be_conn gt 10 tcp-request inspect-delay 3s tcp-request content accept if ! too_fast or ! too_many tcp-request content accept if WAIT_END server be1 127.0.0.1:80 check maxconn 100 It has been tested with apache bench: without the WAIT_END line, I have 3600 req/s, and with WAIT_END line, it was only 8.5 reqs/s. cheers On Thu, Feb 16, 2012 at 10:27 PM, <[email protected]> wrote: > Thanks John gives me other ideas would this work > > ### > frontend www_fe > bind :80 > mode http > maxconn 4096 > default_backend www_be > option contstats > acl spiderbots hdr_sub(user-agent) -i -f /etc/haproxy/spiderbotlist.lst > use_backend spider_backend if spiderbots > > backend spider_backend > acl too_fast fe_sess_rate gt 10 > acl too_many fe_conn gt 10 > tcp-request inspect-delay 1000ms > tcp-request content accept if ! too_fast or ! too_many > tcp-request content accept if WAIT_END > server be1 10.1.2.3 check maxconn 100 > server be2 10.1.2.4 check maxconn 100 > > would that in theory limit new session and concurrent connections to > spider_backend to = maxconn / fe_sess_rate and maxconn /fe_sess_rate ? > > 100/10 = 10 new sessions/sec or 10 concurrent connections at a time ? > > the 11th new session or concurrent user would have a 1000ms delay until > serviced ? > > thanks > > --- > posted at http://www.serverphorums.com > http://www.serverphorums.com/read.php?10,445347,447162#msg-447162 >

