mozilla / neqo

Neqo, the Mozilla Firefox implementation of QUIC in Rust
https://firefox-source-docs.mozilla.org/networking/http/http3.html
Apache License 2.0
1.83k stars 123 forks source link

Max idle timeout is perhaps too short #1412

Open msoxzw opened 1 year ago

msoxzw commented 1 year ago

The maximum idle timeout in neqo used by Firefox is 30 seonds, eclipsed by 600 seconds in quiche used by Chrome.

Considering remote servers, https://www.cloudflare.com/ is 180 seconds, and https://www.google.com/ is 240 seconds.

I reckon that neqo probably has not implemented the QUIC handshake timeout, and as a result 30 seconds idle timeout is picked and chosen.

martinthomson commented 1 year ago

Yes, our timeouts are a little shorter than you will see elsewhere. We have a single timeout for the connection, regardless of its state; handshakes need to fit inside that time. Idle timeouts also drive our keep-alive behaviour in cases where we want to keep a connection open (we do this if the HTTP client has an outstanding request).

The value is configurable, we just haven't seen much reason to reassess the 30s value. @msoxzw do you have a reason that this should be longer?

msoxzw commented 1 year ago

Longer idle timeout tends to avoid unnecessary expensive handshakes. If QUIC handshake timeout is used like Google quiche, ngtcp2, etc. , an outstanding request could be closed in a much shorter time, e.g. 10 seconds.