]> git.ipfire.org Git - thirdparty/haproxy.git/commit
[MEDIUM] acl: add tree-based lookups of networks
authorWilly Tarreau <w@1wt.eu>
Thu, 13 May 2010 18:03:41 +0000 (20:03 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 13 May 2010 19:37:50 +0000 (21:37 +0200)
commitb337b532decc4962d9dbc84cf1c2881cdb2f26a3
tree219cb8d7f6dc167352ed05f02c255b5218a081a5
parentc4262961f8c47b67b22643b9fa4c854246ba7f3e
[MEDIUM] acl: add tree-based lookups of networks

Networks patterns loaded from files for longest match ACL testing
will now be arranged into a prefix tree. This is possible thanks to
the new prefix features in ebtree v6.0. Longest match testing is
slightly slower than exact data maching. However, the measured impact
of running at 42000 requests per second and testing whether the IP
address found in a header belongs to a list of 52000 networks or
not is 3% CPU (increase from 66% to 69%). This is low enough to
permit true geolocation based on huge tables.
src/acl.c
src/client.c
src/proto_http.c