Icelk / kvarn

An extensible and efficient forward-thinking web server for the future.
https://kvarn.org
Apache License 2.0
15 stars 1 forks source link

Make HTTP/3 even faster #57

Closed Icelk closed 1 month ago

Icelk commented 1 month ago

Currently, the uring HTTP/3 implementation only allows one packet to be sent at a time. See 08245fe for more details

Icelk commented 1 month ago

After some more consideration and looking at the relevant code bits in quinn (listed below), the normal code path only sends one Transmit at a time and groups several datagrams into a single Transmit if that's needed. The code path that triggered the warning (removed in f8c590b) was probably the connection being reset in the middle of a send operation. It will not improve performance by implementing "several sends at the same time", since this isn't what happens.

Normal send code: https://github.com/quinn-rs/quinn/blob/b55ec2925174f06dcba9876439085150cc11336d/quinn/src/connection.rs#L946-L1000 Non-normal (before the handshake is complete / connection resets) send code: https://github.com/quinn-rs/quinn/blob/b55ec2925174f06dcba9876439085150cc11336d/quinn/src/endpoint.rs#L504-L526