]> git.ipfire.org Git - thirdparty/pdns.git/commit - pdns/ws-auth.cc
auth: Hash the entire query in the packet cache, split caches 5132/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Mar 2017 08:44:00 +0000 (09:44 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Fri, 10 Mar 2017 08:44:00 +0000 (09:44 +0100)
commitbf269e28a33fb014c23159afcd65903e0eda45cb
treee66035f6e2da7b378b42abf3b829b467705b30b1
parent1896dee4109d5293c63671504e3234b5a5802de2
auth: Hash the entire query in the packet cache, split caches

* The packet cache now behaves a lot like the ones in dnsdist and
the recursor, hashing the entire query (except the query id)
to prevent matching queries with, for example, different EDNS version.
* Since the packet and query caches have now much less in common, split
them into two different classes since it doesn't make sense to share
the same storage and maximum number of entries and doing so clarifies
the code a lot. This should also reduce contention.
* Add a new `max-packet-cache-entries` setting to control the number of
entries in the packet cache.
* Add a new metric, `query-cache-size`, the number of entries
in the query cache since `packetcache-size` is only about the packet
cache.

Note that contrary to the recursor one's, the new packet cache doesn't
skip the content of an EDNS Client Subnet option if present, in case it's
used by a backend to produce the response. We could easily change that, or
even make it configurable if we care.
42 files changed:
docs/markdown/authoritative/performance.md
docs/markdown/authoritative/settings.md
modules/remotebackend/Makefile.am
modules/remotebackend/test-remotebackend-http.cc
modules/remotebackend/test-remotebackend-json.cc
modules/remotebackend/test-remotebackend-pipe.cc
modules/remotebackend/test-remotebackend-post.cc
modules/remotebackend/test-remotebackend-unix.cc
modules/remotebackend/test-remotebackend-zeromq.cc
modules/remotebackend/test-remotebackend.cc
pdns/Makefile.am
pdns/auth-caches.cc [new file with mode: 0644]
pdns/auth-caches.hh [new file with mode: 0644]
pdns/auth-packetcache.cc [new file with mode: 0644]
pdns/auth-packetcache.hh [new file with mode: 0644]
pdns/auth-querycache.cc [new file with mode: 0644]
pdns/auth-querycache.hh [new file with mode: 0644]
pdns/cachecleaner.hh
pdns/common_startup.cc
pdns/common_startup.hh
pdns/dnspacket.cc
pdns/dnspacket.hh
pdns/dnsproxy.cc
pdns/dnswriter.cc
pdns/dnswriter.hh
pdns/dynhandler.cc
pdns/mastercommunicator.cc
pdns/packetcache.cc [deleted file]
pdns/packetcache.hh
pdns/packethandler.cc
pdns/pdnsutil.cc
pdns/recpacketcache.cc
pdns/recpacketcache.hh
pdns/recursordist/Makefile.am
pdns/recursordist/packetcache.hh [new symlink]
pdns/rfc2136handler.cc
pdns/tcpreceiver.cc
pdns/test-packetcache_cc.cc
pdns/testrunner.cc
pdns/ueberbackend.cc
pdns/ws-auth.cc
regression-tests.nobackend/counters/expected_result