Skip to content

feat(lb): add support for connection-rate-limit #4512

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 3 commits into from
Feb 18, 2025
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 @@ -13,6 +13,7 @@ ARGS:
[timeout-client=5m] Maximum allowed inactivity time on the client side
[certificate-ids.{index}] List of SSL/TLS certificate IDs to bind to the frontend
[enable-http3] Defines whether to enable HTTP/3 protocol on the frontend
[connection-rate-limit] Rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.
[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 | pl-waw-3)

DEPRECATED ARGS:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ ARGS:
[timeout-client=5m] Maximum allowed inactivity time on the client side
[certificate-ids.{index}] List of SSL/TLS certificate IDs to bind to the frontend
[enable-http3] Defines whether to enable HTTP/3 protocol on the frontend
[connection-rate-limit] Rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.
[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 | pl-waw-3)

DEPRECATED ARGS:
Expand Down
2 changes: 2 additions & 0 deletions docs/commands/lb.md
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,7 @@ scw lb frontend create [arg=value ...]
| ~~certificate-id~~ | Deprecated | Certificate ID, deprecated in favor of certificate_ids array |
| certificate-ids.{index} | | List of SSL/TLS certificate IDs to bind to the frontend |
| enable-http3 | | Defines whether to enable HTTP/3 protocol on the frontend |
| connection-rate-limit | | Rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second. |
| 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`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |


Expand Down Expand Up @@ -765,6 +766,7 @@ scw lb frontend update <frontend-id ...> [arg=value ...]
| ~~certificate-id~~ | Deprecated | Certificate ID, deprecated in favor of certificate_ids array |
| certificate-ids.{index} | | List of SSL/TLS certificate IDs to bind to the frontend |
| enable-http3 | | Defines whether to enable HTTP/3 protocol on the frontend |
| connection-rate-limit | | Rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second. |
| 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`, `pl-waw-3` | Zone to target. If none is passed will use default zone from the config |


Expand Down
14 changes: 14 additions & 0 deletions internal/namespaces/lb/v1/lb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -1721,6 +1721,13 @@ func lbFrontendCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "connection-rate-limit",
Short: `Rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.`,
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2, scw.ZonePlWaw3),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down Expand Up @@ -1831,6 +1838,13 @@ func lbFrontendUpdate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "connection-rate-limit",
Short: `Rate limit for new connections established on this frontend. Use 0 value to disable, else value is connections per second.`,
Required: false,
Deprecated: false,
Positional: false,
},
core.ZoneArgSpec(scw.ZoneFrPar1, scw.ZoneFrPar2, scw.ZoneNlAms1, scw.ZoneNlAms2, scw.ZoneNlAms3, scw.ZonePlWaw1, scw.ZonePlWaw2, scw.ZonePlWaw3),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down
Loading