MEDIUM: quic: define an accept queue limit
authorAmaury Denoyelle <adenoyelle@haproxy.com>
Wed, 8 Nov 2023 13:29:31 +0000 (14:29 +0100)
committerAmaury Denoyelle <adenoyelle@haproxy.com>
Thu, 9 Nov 2023 15:24:00 +0000 (16:24 +0100)
commitbb28215d9b75e75a286e0252fd8db46def497ed5
tree250eda2ba012f1f3ac8f4f8b2fcc3fbb7454af7e
parent3df6a60113773d8abff3457c7a06e30c1892b7dc
MEDIUM: quic: define an accept queue limit

QUIC connections are pushed manually into a dedicated listener queue
when they are ready to be accepted. This happens after handshake
finalization or on 0-RTT packet reception. Listener is then woken up to
dequeue them with listener_accept().

This patch comptabilizes the number of connections currently stored in
the accept queue. If reaching a certain limit, INITIAL packets are
dropped on reception to prevent further QUIC connections allocation.
This should help to preserve system resources.

This limit is automatically derived from the listener backlog. Half of
its value is reserved for handshakes and the other half for accept
queues. By default, backlog is equal to maxconn which guarantee that
there can't be no more than maxconn connections in handshake or waiting
to be accepted.
doc/configuration.txt
include/haproxy/quic_sock.h
include/haproxy/receiver-t.h
src/cfgparse.c
src/quic_conn.c
src/quic_rx.c
src/quic_sock.c