Skip to content

Commit

Permalink
MINOR: quic: add "bbr" new "quic-cc-algo" option
Browse files Browse the repository at this point in the history
Add this new "bbr" option to the list of the congestion control algorithms which
may be set by "quic-cc-algo" setting.

This new algorithm is considered as experimental and may be enabled only if
"expose-experimental-directive" is set.

Also update the documentation for this new setting.
  • Loading branch information
haproxyFred committed Nov 20, 2024
1 parent 5948a75 commit c2c5b3d
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
7 changes: 5 additions & 2 deletions doc/configuration.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17199,7 +17199,7 @@ proto <name>
instance, it is possible to force the http/2 on clear TCP by specifying "proto
h2" on the bind line.

quic-cc-algo { cubic[-pacing] | newreno | nocc }[(<args,...>)]
quic-cc-algo { cubic[-pacing] | newreno | bbr | nocc }[(<args,...>)]
This is a QUIC specific setting to select the congestion control algorithm
for any connection attempts to the configured QUIC listeners. They are similar
to those used by TCP.
Expand All @@ -17212,7 +17212,10 @@ quic-cc-algo { cubic[-pacing] | newreno | nocc }[(<args,...>)]
scenario, it can significantly improve network throughput. However, it can
also increase CPU usage if haproxy is forced to wait too long between each
emission. Pacing support is still experimental, as such it requires
"expose-experimental-directives".
"expose-experimental-directives". BBR congestion control algorithm depends on
the pacing support which is in this case implicitely activated by "bbr".
Note that BBR haproxy implementation is still considered as experimental and
cannot be enabled without "expose-experimental-directives".

For further customization, a list of parameters can be specified after the
algorithm token. It must be written between parenthesis, separated by a comma
Expand Down
13 changes: 13 additions & 0 deletions src/cfgparse-quic.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@

#define QUIC_CC_NEWRENO_STR "newreno"
#define QUIC_CC_CUBIC_STR "cubic"
#define QUIC_CC_BBR_STR "bbr"
#define QUIC_CC_NO_CC_STR "nocc"

static int bind_parse_quic_force_retry(char **args, int cur_arg, struct proxy *px, struct bind_conf *conf, char **err)
Expand Down Expand Up @@ -141,6 +142,18 @@ static int bind_parse_quic_cc_algo(char **args, int cur_arg, struct proxy *px,
arg += strlen(str_pacing);
}
}
else if (strncmp(arg, QUIC_CC_BBR_STR, strlen(QUIC_CC_BBR_STR)) == 0) {
if (!experimental_directives_allowed) {
ha_alert("'%s' algo is experimental, must be allowed via a global "
"'expose-experimental-directives'\n", arg);
goto fail;
}

/* bbr */
algo = QUIC_CC_BBR_STR;
cc_algo = &quic_cc_algo_bbr;
arg += strlen(QUIC_CC_BBR_STR);
}
else if (strncmp(arg, QUIC_CC_NO_CC_STR, strlen(QUIC_CC_NO_CC_STR)) == 0) {
/* nocc */
if (!experimental_directives_allowed) {
Expand Down

0 comments on commit c2c5b3d

Please sign in to comment.