diff --git a/cmd/main.go b/cmd/main.go index 8d9d5440..e5727c4e 100644 --- a/cmd/main.go +++ b/cmd/main.go @@ -5,7 +5,6 @@ import ( "os" "os/signal" "runtime" - "runtime/debug" "strconv" "syscall" "time" @@ -33,9 +32,6 @@ func init() { if i, err := strconv.Atoi(Unix); err == nil { Time = time.Unix(int64(i), 0).Format(time.RFC3339) } - - debug.SetGCPercent(70) - debug.SetMemoryLimit(1.75 * 1024 * 1024 * 1024) // 1.75GB } func main() { diff --git a/k8s/production.template.yaml b/k8s/production.template.yaml index 3dd2f69d..a66768f5 100644 --- a/k8s/production.template.yaml +++ b/k8s/production.template.yaml @@ -7,6 +7,11 @@ spec: selector: matchLabels: app: eventapi + strategy: + type: RollingUpdate + rollingUpdate: + maxSurge: 5 + maxUnavailable: 5 template: metadata: labels: @@ -57,10 +62,10 @@ spec: resources: limits: cpu: "1" - memory: 1.5Gi + memory: 3225Mi requests: - cpu: 100m - memory: 1.5Gi + cpu: 350m + memory: 3000Mi volumeMounts: - name: config mountPath: /app/config.yaml @@ -124,10 +129,10 @@ data: api: enabled: true bind: 0.0.0.0:3000 - heartbeat_interval: 25000 + heartbeat_interval: 28000 subscription_limit: 100 - connection_limit: 7500 - ttl: 10 + connection_limit: 10000 + ttl: 30 v1: false v3: true bridge_url: http://api:9700