Nebulo icon indicating copy to clipboard operation
Nebulo copied to clipboard

Pipeline DNS over TLS queries over a single connection

Open amithm7 opened this issue 3 years ago • 6 comments

When I initially created Nebulo I did just that. What I quickly noticed though is that DoT providers do not follow the specs and close the TLS connections regardless. I can check what the state is right now, though.

Ch4t4r avatar Nov 24 '21 14:11 Ch4t4r

I can check what the state is right now, though

Btw, RethinkDNS supports pipelining of queries over DoT (connections are closed after 60s of inactivity, but keep-alive isn't considered "activity"... this is done to limit resource exhaustion), if you ever want to test. https://rethinkdns.com/configure?p=dot | code.

In our tests, DNS over TLS without pipelining is über expensive. Like 5x the latencies.

ignoramous avatar Dec 28 '21 07:12 ignoramous

Indeed a keepalive would be welcome. Especially when the configured server has a higher RTT (think you own pihole deployment at home, to be used from 4G while on travel) the TLS handshake for every single DNS query really hurts performance.

bernhardschmidt avatar Sep 11 '22 08:09 bernhardschmidt

...the TLS handshake for every single DNS query really hurts performance.

TLS v1.2 has support for session resumption which the server needs to support, while TLS v1.3 bakes it in the protocol itself.

As for DoH3, the underlying transport (QUIC) supports faster handshakes, too.

ignoramous avatar Sep 11 '22 16:09 ignoramous

TLS v1.2 has support for session resumption which the server needs to support, while TLS v1.3 bakes it in the protocol itself.

That's true, but if I'm not mistaken that's still a 2 RTT (1 RTT for TCP and 1 RTT for session resumption) penalty on every DNS lookup. Might not be a large issue when using anycasted public resolvers, but if you go to your private server it's adding up

bernhardschmidt avatar Sep 11 '22 18:09 bernhardschmidt

No, I'm with you. Pipelining is great. In our tests, we saw 5x improvements! Amith (OP) implemented pipelining for RethinkDNS servers for DoT just for this reason alone.

ignoramous avatar Sep 12 '22 04:09 ignoramous