haproxy/include/common
Willy Tarreau f3045d2a06 MAJOR: pattern: add LRU-based cache on pattern matching
The principle of this cache is to have a global cache for all pattern
matching operations which rely on lists (reg, sub, dir, dom, ...). The
input data, the expression and a random seed are used as a hashing key.
The cached entries contains a pointer to the expression and a revision
number for that expression so that we don't accidently used obsolete
data after a pattern update or a very unlikely hash collision.

Regarding the risk of collisions, 10k entries at 10k req/s mean 1% risk
of a collision after 60 years, that's already much less than the memory's
reliability in most machines and more durable than most admin's life
expectancy. A collision will result in a valid result to be returned
for a different entry from the same list. If this is not acceptable,
the cache can be disabled using tune.pattern.cache-size.

A test on a file containing 10k small regex showed that the regex
matching was limited to 6k/s instead of 70k with regular strings.
When enabling the LRU cache, the performance was back to 70k/s.
2015-04-29 19:15:24 +02:00
..
accept4.h BUILD: syscalls: remove improper inline statement in front of syscalls 2014-05-08 22:38:02 +02:00
appsession.h
base64.h
buffer.h BUG/MEDIUM: lua: segfault with buffer_replace2 2015-03-09 18:12:59 +01:00
cfgparse.h MEDIUM: config: report it when tcp-request rules are misplaced 2014-09-16 15:43:24 +02:00
chunk.h
compat.h BUILD: fix dependencies between config and compat.h 2014-07-15 19:09:36 +02:00
compiler.h
config.h BUILD: fix dependencies between config and compat.h 2014-07-15 19:09:36 +02:00
debug.h REORG/MAJOR: session: rename the "session" entity to "stream" 2015-04-06 11:23:56 +02:00
defaults.h MAJOR: pattern: add LRU-based cache on pattern matching 2015-04-29 19:15:24 +02:00
epoll.h
errors.h
hash.h MINOR: hash: add new function hash_crc32 2015-01-20 19:48:05 +01:00
memory.h MEDIUM: memory: improve pool_refill_alloc() to pass a refill count 2014-12-24 23:47:31 +01:00
mini-clist.h CLEANUP: lists: remove dead code 2014-12-24 23:47:31 +01:00
namespace.h CLEANUP: namespaces: fix protection against multiple inclusions 2015-04-08 17:31:40 +02:00
rbtree.h
regex.h MEDIUM: regex: add support for passing regex flags to regex_exec_match() 2015-01-22 14:24:53 +01:00
sessionhash.h
splice.h BUILD: syscalls: remove improper inline statement in front of syscalls 2014-05-08 22:38:02 +02:00
standard.h MINOR: tools: provide an rdtsc() function for time comparisons 2015-04-29 19:14:03 +02:00
syscall.h BUILD: syscalls: remove improper inline statement in front of syscalls 2014-05-08 22:38:02 +02:00
template.h
ticks.h
time.h
tools.h
uri_auth.h
version.h DOC: stop referencing the slow git repository in the README 2014-05-10 11:04:39 +02:00