]> git.ipfire.org Git - thirdparty/pdns.git/commit
dnsdist: Add per connection queries count and duration stats for DoH 9738/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 16 Nov 2020 14:20:40 +0000 (15:20 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 16 Nov 2020 14:20:40 +0000 (15:20 +0100)
commitce470a73605a8d8c1dc2469c406286cd1565ac63
treef800e2650f18c072194e0a8180da7702ce9a8a23
parent3c3c03a0994ded5eea2c29473637447710f27eb8
dnsdist: Add per connection queries count and duration stats for DoH

This is done by implementing a per-thread table of DoH connections,
keyed on the underlying file descriptor, since we don't have access
to the h2o_conn_t object but only to the h2o_socket_t when the
connection is first established (h2o_socket_read_start() callback)
or terminated (on_close callback of the socket).
This also makes it possible to use a std::shared_ptr instead of our
custom reference counting, since we keep an entry in the table for
the duration of the connection and don't need to rely on h2o's raw
pointer anymore to pass our data.
pdns/dnsdistdist/doh.cc