-
Notifications
You must be signed in to change notification settings - Fork 229
atenet-router: raise actor-cluster circuit breakers #806
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -60,6 +60,11 @@ data: | |
| address: 0.0.0.0 | ||
| port_value: 9901 | ||
|
|
||
| # Per-worker event-loop duration histograms; the documented overhead is | ||
| # accepted for the observability. | ||
| enable_dispatcher_stats: true | ||
|
|
||
|
|
||
| node: | ||
| id: substrate-envoy-node | ||
| cluster: substrate-router-cluster | ||
|
|
@@ -158,6 +163,15 @@ spec: | |
| # turns to survive a shutdown, raise --drain-timeout and | ||
| # terminationGracePeriodSeconds alongside it. | ||
| # - "--route-timeout=5m" | ||
| resources: | ||
| # Small requests so the pod schedules anywhere (including CI kind | ||
| # nodes); the limits are the real cap. | ||
| requests: | ||
| cpu: 250m | ||
| memory: 256Mi | ||
| limits: | ||
| cpu: "8" | ||
| memory: 2Gi | ||
| env: | ||
| - name: POD_NAME | ||
| valueFrom: | ||
|
|
@@ -217,13 +231,22 @@ spec: | |
| - name: "drain-signal" | ||
| mountPath: "/var/run/atenet" | ||
| - name: envoy | ||
| # Not v1.39+: it measured 20-38% lower sustained throughput on this | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. remove this comment |
||
| # workload. | ||
| image: envoyproxy/envoy:v1.30-latest | ||
| command: | ||
| - "/usr/local/bin/envoy" | ||
| - "-c" | ||
| - "/etc/envoy/envoy.yaml" | ||
| - "--component-log-level" | ||
| - "upstream:debug,router:debug,ext_proc:debug" | ||
| # Envoy sizes worker threads from the node's CPU count unless told | ||
| # otherwise; on a large node that is dozens of event loops. | ||
| - "--concurrency" | ||
| - "8" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But what if you install on a smaller machine? Are we ok with setting this to 8 overall or should this be tuned? |
||
| # Observability: mutex-contention counters on the admin /contention | ||
| # endpoint. Costs one atomic per contended acquisition. | ||
| - "--enable-mutex-tracing" | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this give us in production |
||
| # Prevents Envoy from fast-exiting on SIGTERM before atenet-router finishes | ||
| # its drain sequence. Polls for the drain-complete marker written by the | ||
| # router on the shared emptyDir, terminating Envoy as soon as the drain | ||
|
|
@@ -232,6 +255,17 @@ spec: | |
| preStop: | ||
| exec: | ||
| command: ["sh", "-c", "while [ ! -f /var/run/atenet/drain-complete ]; do sleep 0.5; done"] | ||
| resources: | ||
| # Small requests, real cap in limits (see the sidecar's note); keep | ||
| # the CPU limit in step with --concurrency above. Do not raise it | ||
| # past 8 cores: measured capacity per core falls steeply beyond | ||
| # that — scale by adding router replicas instead. | ||
| requests: | ||
| cpu: 250m | ||
| memory: 256Mi | ||
| limits: | ||
| cpu: "8" | ||
| memory: 4Gi | ||
| ports: | ||
| - name: http | ||
| containerPort: 8080 | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You should put a comment why the limit needs to be set:
Otherwise Envoy configures too many event loops on a large machine?
Does this affect scheduling on a small machine?