Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dnsdist: Add per connection queries count and duration stats for DoH #9738

Merged
merged 1 commit into from Dec 16, 2020

Conversation

rgacogne
Copy link
Member

Short description

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.

Checklist

I have:

  • read the CONTRIBUTING.md document
  • compiled this code
  • tested this code
  • included documentation (including possible behaviour changes)
  • documented the code
  • added or modified regression test(s)
  • added or modified unit test(s)

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.
@rgacogne rgacogne added this to the dnsdist-1.6.0 milestone Nov 16, 2020
@rgacogne rgacogne merged commit a1395c4 into PowerDNS:master Dec 16, 2020
24 checks passed
@rgacogne rgacogne deleted the ddist-doh-conn-stats branch December 16, 2020 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant