mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-02-01 02:52:00 +00:00
30e260e2e6
Implement http-request timeout for QUIC MUX. It is used when the connection is opened and is triggered if no HTTP request is received in time. By HTTP request we mean at least a QUIC stream with a full header section. Then qcs instance is attached to a sedesc and upper layer is then responsible to wait for the rest of the request. This timeout is also used when new QUIC streams are opened during the connection lifetime to wait for full HTTP request on them. As it's possible to demux multiple streams in parallel with QUIC, each waiting stream is registered in a list <opening_list> stored in qcc with <start> as timestamp in qcs for the stream opening. Once a qcs is attached to a sedesc, it is removed from <opening_list>. When refreshing MUX timeout, if <opening_list> is not empty, the first waiting stream is used to set MUX timeout. This is efficient as streams are stored in the list in their creation order so CPU usage is minimal. Also, the size of the list is automatically restricted by flow control limitation so it should not grow too much. Streams are insert in <opening_list> by application protocol layer. This is because only application protocol can differentiate streams for HTTP messaging from internal usage. A function qcs_wait_http_req() has been added to register a request stream by app layer. QUIC MUX can then remove it from the list in qc_attach_sc(). As a side-note, it was necessary to implement attach qcc_app_ops callback on hq-interop module to be able to insert a stream in waiting list. Without this, a BUG_ON statement would be triggered when trying to remove the stream on sedesc attach. This is to ensure that every requests streams are registered for http-request timeout. MUX timeout is explicitely refreshed on MAX_STREAM_DATA and STOP_SENDING frame parsing to schedule http-request timeout if a new stream has been instantiated. It was already done on STREAM parsing due to a previous patch. |
||
---|---|---|
.. | ||
haproxy | ||
import |