mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
MINOR: quic: Tunable "initial_max_streams_bidi" transport parameter
Add tunable "tune.quic.frontend.max_streams_bidi" setting for QUIC frontends to set the "initial_max_streams_bidi" transport parameter. Add some documentation for this new setting.
This commit is contained in:
parent
1d96d6e024
commit
2674098569
@ -1120,6 +1120,7 @@ The following keywords are supported in the "global" section :
|
|||||||
- tune.pool-low-fd-ratio
|
- tune.pool-low-fd-ratio
|
||||||
- tune.quic.conn-buf-limit
|
- tune.quic.conn-buf-limit
|
||||||
- tune.quic.frontend.max-idle-timeout
|
- tune.quic.frontend.max-idle-timeout
|
||||||
|
- tune.quic.frontend.max-streams-bidi
|
||||||
- tune.quic.retry-threshold
|
- tune.quic.retry-threshold
|
||||||
- tune.rcvbuf.client
|
- tune.rcvbuf.client
|
||||||
- tune.rcvbuf.server
|
- tune.rcvbuf.server
|
||||||
@ -2954,6 +2955,17 @@ tune.quic.frontend.max-idle-timeout <timeout>
|
|||||||
|
|
||||||
The default value is 30000.
|
The default value is 30000.
|
||||||
|
|
||||||
|
tune.quic.frontend.max-streams-bidi <number>
|
||||||
|
Warning: QUIC support in HAProxy is currently experimental. Configuration may
|
||||||
|
change without deprecation in the future.
|
||||||
|
|
||||||
|
Sets the QUIC initial_max_streams_bidi transport parameter for frontends.
|
||||||
|
This is the initial maximum number of bidirectional streams the remote peer
|
||||||
|
will be authorized to open. This determines the number of concurrent client
|
||||||
|
requests.
|
||||||
|
|
||||||
|
The default value is 100.
|
||||||
|
|
||||||
tune.quic.retry-threshold <number>
|
tune.quic.retry-threshold <number>
|
||||||
Warning: QUIC support in HAProxy is currently experimental. Configuration may
|
Warning: QUIC support in HAProxy is currently experimental. Configuration may
|
||||||
change without deprecation in the future.
|
change without deprecation in the future.
|
||||||
|
@ -160,6 +160,7 @@ struct global {
|
|||||||
#ifdef USE_QUIC
|
#ifdef USE_QUIC
|
||||||
unsigned int quic_backend_max_idle_timeout;
|
unsigned int quic_backend_max_idle_timeout;
|
||||||
unsigned int quic_frontend_max_idle_timeout;
|
unsigned int quic_frontend_max_idle_timeout;
|
||||||
|
unsigned int quic_frontend_max_streams_bidi;
|
||||||
unsigned int quic_retry_threshold;
|
unsigned int quic_retry_threshold;
|
||||||
unsigned int quic_streams_buf;
|
unsigned int quic_streams_buf;
|
||||||
#endif /* USE_QUIC */
|
#endif /* USE_QUIC */
|
||||||
|
@ -31,6 +31,7 @@ struct tp_preferred_address {
|
|||||||
#define QUIC_DFLT_ACK_DELAY_COMPONENT 3 /* milliseconds */
|
#define QUIC_DFLT_ACK_DELAY_COMPONENT 3 /* milliseconds */
|
||||||
#define QUIC_DFLT_MAX_ACK_DELAY 25 /* milliseconds */
|
#define QUIC_DFLT_MAX_ACK_DELAY 25 /* milliseconds */
|
||||||
#define QUIC_DFLT_FRONT_MAX_IDLE_TIMEOUT 30000 /* milliseconds */
|
#define QUIC_DFLT_FRONT_MAX_IDLE_TIMEOUT 30000 /* milliseconds */
|
||||||
|
#define QUIC_DFLT_FRONT_MAX_STREAMS_BIDI 100
|
||||||
#define QUIC_DFLT_BACK_MAX_IDLE_TIMEOUT 30000 /* milliseconds */
|
#define QUIC_DFLT_BACK_MAX_IDLE_TIMEOUT 30000 /* milliseconds */
|
||||||
#define QUIC_ACTIVE_CONNECTION_ID_LIMIT 2 /* number of connections */
|
#define QUIC_ACTIVE_CONNECTION_ID_LIMIT 2 /* number of connections */
|
||||||
|
|
||||||
|
@ -76,6 +76,7 @@ static int cfg_parse_quic_tune_setting(char **args, int section_type,
|
|||||||
{
|
{
|
||||||
unsigned int arg = 0;
|
unsigned int arg = 0;
|
||||||
int prefix_len = strlen("tune.quic.");
|
int prefix_len = strlen("tune.quic.");
|
||||||
|
const char *suffix;
|
||||||
|
|
||||||
if (too_many_args(1, args, err, NULL))
|
if (too_many_args(1, args, err, NULL))
|
||||||
return -1;
|
return -1;
|
||||||
@ -88,9 +89,12 @@ static int cfg_parse_quic_tune_setting(char **args, int section_type,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(args[0] + prefix_len, "conn-buf-limit") == 0)
|
suffix = args[0] + prefix_len;
|
||||||
|
if (strcmp(suffix, "conn-buf-limit") == 0)
|
||||||
global.tune.quic_streams_buf = arg;
|
global.tune.quic_streams_buf = arg;
|
||||||
else if (strcmp(args[0] + prefix_len, "retry-threshold") == 0)
|
else if (strcmp(suffix, "frontend.max-streams-bidi") == 0)
|
||||||
|
global.tune.quic_frontend_max_streams_bidi = arg;
|
||||||
|
else if (strcmp(suffix, "retry-threshold") == 0)
|
||||||
global.tune.quic_retry_threshold = arg;
|
global.tune.quic_retry_threshold = arg;
|
||||||
else {
|
else {
|
||||||
memprintf(err, "'%s' keyword not unhandled (please report this bug).", args[0]);
|
memprintf(err, "'%s' keyword not unhandled (please report this bug).", args[0]);
|
||||||
@ -103,6 +107,7 @@ static int cfg_parse_quic_tune_setting(char **args, int section_type,
|
|||||||
static struct cfg_kw_list cfg_kws = {ILH, {
|
static struct cfg_kw_list cfg_kws = {ILH, {
|
||||||
{ CFG_GLOBAL, "tune.quic.backend.max-idle-timeou", cfg_parse_quic_time },
|
{ CFG_GLOBAL, "tune.quic.backend.max-idle-timeou", cfg_parse_quic_time },
|
||||||
{ CFG_GLOBAL, "tune.quic.conn-buf-limit", cfg_parse_quic_tune_setting },
|
{ CFG_GLOBAL, "tune.quic.conn-buf-limit", cfg_parse_quic_tune_setting },
|
||||||
|
{ CFG_GLOBAL, "tune.quic.frontend.max-streams-bidi", cfg_parse_quic_tune_setting },
|
||||||
{ CFG_GLOBAL, "tune.quic.frontend.max-idle-timeout", cfg_parse_quic_time },
|
{ CFG_GLOBAL, "tune.quic.frontend.max-idle-timeout", cfg_parse_quic_time },
|
||||||
{ CFG_GLOBAL, "tune.quic.retry-threshold", cfg_parse_quic_tune_setting },
|
{ CFG_GLOBAL, "tune.quic.retry-threshold", cfg_parse_quic_tune_setting },
|
||||||
{ 0, NULL, NULL }
|
{ 0, NULL, NULL }
|
||||||
|
@ -208,6 +208,7 @@ struct global global = {
|
|||||||
#ifdef USE_QUIC
|
#ifdef USE_QUIC
|
||||||
.quic_backend_max_idle_timeout = QUIC_DFLT_BACK_MAX_IDLE_TIMEOUT,
|
.quic_backend_max_idle_timeout = QUIC_DFLT_BACK_MAX_IDLE_TIMEOUT,
|
||||||
.quic_frontend_max_idle_timeout = QUIC_DFLT_FRONT_MAX_IDLE_TIMEOUT,
|
.quic_frontend_max_idle_timeout = QUIC_DFLT_FRONT_MAX_IDLE_TIMEOUT,
|
||||||
|
.quic_frontend_max_streams_bidi = QUIC_DFLT_FRONT_MAX_STREAMS_BIDI,
|
||||||
.quic_retry_threshold = QUIC_DFLT_RETRY_THRESHOLD,
|
.quic_retry_threshold = QUIC_DFLT_RETRY_THRESHOLD,
|
||||||
.quic_streams_buf = 30,
|
.quic_streams_buf = 30,
|
||||||
#endif /* USE_QUIC */
|
#endif /* USE_QUIC */
|
||||||
|
@ -45,7 +45,7 @@ static void quic_dflt_transport_params_cpy(struct quic_transport_params *dst)
|
|||||||
void quic_transport_params_init(struct quic_transport_params *p, int server)
|
void quic_transport_params_init(struct quic_transport_params *p, int server)
|
||||||
{
|
{
|
||||||
const uint64_t ncb_size = global.tune.bufsize - NCB_RESERVED_SZ;
|
const uint64_t ncb_size = global.tune.bufsize - NCB_RESERVED_SZ;
|
||||||
const int max_streams_bidi = 100;
|
const int max_streams_bidi = global.tune.quic_frontend_max_streams_bidi;
|
||||||
const int max_streams_uni = 3;
|
const int max_streams_uni = 3;
|
||||||
|
|
||||||
/* Set RFC default values for unspecified parameters. */
|
/* Set RFC default values for unspecified parameters. */
|
||||||
|
Loading…
Reference in New Issue
Block a user