]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[BUG] proxy: connection rate limiting was eating lots of CPU
authorWilly Tarreau <w@1wt.eu>
Mon, 7 Jun 2010 08:40:48 +0000 (10:40 +0200)
committerWilly Tarreau <w@1wt.eu>
Mon, 7 Jun 2010 20:43:54 +0000 (22:43 +0200)
commitd9bbe17b7f68ff8b3768f2ed8a5520cfc40b125a
treece3976b61ba98641a737135ed6d9ba2dea6599f4
parent4fe41902789d188ee4c23b14a7cdbf075463b158
[BUG] proxy: connection rate limiting was eating lots of CPU

The rate-limit feature relied on a timer to define how long a frontend
must remain idle. It was not considering the pending connections, so it
was almost always ready to be used again and only the accept's limit was
preventing new connections from coming in. By accounting for the pending
connection, we can compute a correct delay and effectively make the
frontend go idle for that (short) time.
src/proxy.c