From 3b6e7a6346cb9620ebf717004c9ff08cfc420818 Mon Sep 17 00:00:00 2001 From: ffilippopoulos Date: Fri, 5 Jul 2024 14:13:20 +0100 Subject: [PATCH 1/3] Raise default rate limits In our prod environment we have observed very frequent rate limiting on xDS clients, while each of the xDS server pods sits comfortably at ~0.06 cores and ~258Mb memory. We should increase the default limits to end streams less frequently so that our clients can have smoother experience --- main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 3947eec..e738421 100644 --- a/main.go +++ b/main.go @@ -23,8 +23,8 @@ var ( flagLabelSelector = flag.String("label-selector", getEnv("SXDS_LABEL_SELECTOR", "xds.semaphore.uw.systems/enabled=true"), "Label selector for watched kubernetes resources") flagLbPolicyLabel = flag.String("lb-policy-selector", getEnv("SXDS_LB_POLICY_SELECTOR", "xds.semaphore.uw.systems/lb-policy"), "Label to allow user to configure the lb policy for a Service clusters") flagServerListenPort = flag.Uint("server-listen-port", 18000, "xDS server listen port") - flagMaxRequestsPerSecond = flag.Float64("max-requests-per-second", 300.0, "maximum allowed requests to the server per second") - flagMaxPeerRequestsPerSecond = flag.Float64("max-peer-requests-per-second", 30.0, "maximum allowed requests from a peer per second") + flagMaxRequestsPerSecond = flag.Float64("max-requests-per-second", 500.0, "maximum allowed requests to the server per second") + flagMaxPeerRequestsPerSecond = flag.Float64("max-peer-requests-per-second", 50.0, "maximum allowed requests from a peer per second") flagMetricsListenPort = flag.String("metrics-listen-port", "8080", "Listen port to serve prometheus metrics") bearerRe = regexp.MustCompile(`[A-Z|a-z0-9\-\._~\+\/]+=*`) From bc09e99401dade91e44cf61ebe0826713db23f83 Mon Sep 17 00:00:00 2001 From: ffilippopoulos Date: Fri, 5 Jul 2024 14:32:02 +0100 Subject: [PATCH 2/3] Fix docker build, bump Dockerfile Golang image version --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 21a015b..e8e45d9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.21-alpine AS build +FROM golang:1.22-alpine AS build WORKDIR /go/src/github.com/utilitywarehouse/semaphore-xds COPY . /go/src/github.com/utilitywarehouse/semaphore-xds ENV CGO_ENABLED=0 From f484f3bbc615ebafaae83c5d58f04592e2a7b0a9 Mon Sep 17 00:00:00 2001 From: ffilippopoulos Date: Fri, 5 Jul 2024 14:34:51 +0100 Subject: [PATCH 3/3] go mod tidy --- go.mod | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/go.mod b/go.mod index e90973c..d4ba019 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,7 @@ module github.com/utilitywarehouse/semaphore-xds -go 1.21 +go 1.22.0 + toolchain go1.22.4 require (