Skip to content

feat(lb): add support for max-connections and timeout queue #3258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ ARGS:
[ignore-ssl-server-verify] Defines whether the server certificate verification should be ignored
[redispatch-attempt-count] Whether to use another backend server on each attempt
[max-retries] Number of retries when a backend server connection failed
[max-connections] Maximum number of connections allowed per backend server
[timeout-queue.seconds]
[timeout-queue.nanos]
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)

DEPRECATED ARGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ ARGS:
[ignore-ssl-server-verify] Defines whether the server certificate verification should be ignored
[redispatch-attempt-count] Whether to use another backend server on each attempt
[max-retries] Number of retries when a backend server connection failed
[max-connections] Maximum number of connections allowed per backend server
[timeout-queue.seconds]
[timeout-queue.nanos]
[zone=fr-par-1] Zone to target. If none is passed will use default zone from the config (fr-par-1 | fr-par-2 | nl-ams-1 | nl-ams-2 | nl-ams-3 | pl-waw-1 | pl-waw-2)

DEPRECATED ARGS:
Expand Down
6 changes: 6 additions & 0 deletions docs/commands/lb.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,9 @@ scw lb backend create [arg=value ...]
| ignore-ssl-server-verify | | Defines whether the server certificate verification should be ignored |
| redispatch-attempt-count | | Whether to use another backend server on each attempt |
| max-retries | | Number of retries when a backend server connection failed |
| max-connections | | Maximum number of connections allowed per backend server |
| timeout-queue.seconds | | |
| timeout-queue.nanos | | |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |


Expand Down Expand Up @@ -492,6 +495,9 @@ scw lb backend update <backend-id ...> [arg=value ...]
| ignore-ssl-server-verify | | Defines whether the server certificate verification should be ignored |
| redispatch-attempt-count | | Whether to use another backend server on each attempt |
| max-retries | | Number of retries when a backend server connection failed |
| max-connections | | Maximum number of connections allowed per backend server |
| timeout-queue.seconds | | |
| timeout-queue.nanos | | |
| zone | Default: `fr-par-1`<br />One of: `fr-par-1`, `fr-par-2`, `nl-ams-1`, `nl-ams-2`, `nl-ams-3`, `pl-waw-1`, `pl-waw-2` | Zone to target. If none is passed will use default zone from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/moby/buildkit v0.11.6
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230630135857-7255970b0203
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230630150747-10731c512952
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.7.0
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -497,8 +497,8 @@ github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncj
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230630135857-7255970b0203 h1:0A41ePzns5c5Did7m9hWnc9jtv++Chs6LxFC2tdiLGE=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230630135857-7255970b0203/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230630150747-10731c512952 h1:Vn4FCfzj1vuBQPrQ/GK8LvKW8UpuRxedPshhGBfqVBU=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.17.0.20230630150747-10731c512952/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
Expand Down
38 changes: 38 additions & 0 deletions internal/namespaces/lb/v1/lb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1012,6 +1012,25 @@ func lbBackendCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "max-connections",
Short: `Maximum number of connections allowed per backend server`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "timeout-queue.seconds",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "timeout-queue.nanos",
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down Expand Up @@ -1199,6 +1218,25 @@ func lbBackendUpdate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "max-connections",
Short: `Maximum number of connections allowed per backend server`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "timeout-queue.seconds",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "timeout-queue.nanos",
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down