Skip to content

atenet-router: raise the tunnel circuit breaker to 1m - #3087

Merged
Lior Lieberman (LiorLieberman) merged 1 commit into
agent-substrate:mainfrom
yufan-su:raise-tunnel-circuit-breaker
Oct 22, 2026
Merged

Lior Lieberman (LiorLieberman) merged 1 commit into
agent-substrate:mainfrom
yufan-su:raise-tunnel-circuit-breaker

Conversation

@yufan-su

@yufan-su Yufan Su (yufan-su) commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

At 1k nodes and 200k actors, atenet-router starts failing ingress with
503 upstream connect error or disconnect/reset before headers. reset reason: remote connection failure. The requests that fail are the ones that need a new
tunnel. actor_connect refuses the tunnel once a circuit breaker set by
tunnelCircuitBreakerLimit (65536) is full.

  • Split the limit into tunnelCircuitBreakerLimit and
    actorConnectCircuitBreakerLimit, so each cluster can be tuned on its own.

  • Set both to 1048576. For actor_connect that covers 11,000 workers on up to
    about 95 Envoy threads. Leaving the breakers unset would mean Envoy's default
    of 1024.

  • Tuning actor_connect's limits is tracked in atenet-router: size actor_connect's circuit breakers #3100.

  • Tests pass

  • Docs updated

@LiorLieberman

Copy link
Copy Markdown
Collaborator

max_connections counts mTLS connections to workers

Is this the case? I thought yanavlasov mentioned its connections to the internal_listener?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like it is used in buildActorTunnelCluster and other buildActorConnectCluster - which is used both for the internal_listener AND the proxy-->atunnel.

Should we split those configs?

I think increasing it for the proxy-->atunnel needs more thinking.. as this is real circut breakers we should think carefully about. The internal_listener ones are less important

@yufan-su

Copy link
Copy Markdown
Collaborator Author

Should we split those configs?

Yes we can split into two limit

But I think we should increase the actor_connect limit as well, since this is what we hit in the scale test based on the error message.

@yanavlasov

Copy link
Copy Markdown
Collaborator

LGTM from me.

Merged via the queue into agent-substrate:main with commit 931d993 Oct 22, 2026
15 checks passed
M.Besher Massri (besher-massri) pushed a commit to besher-massri/substrate that referenced this pull request Oct 22, 2026
…e#3087)

At 1k nodes and 200k actors, atenet-router starts failing ingress with
`503 upstream connect error or disconnect/reset before headers. reset
reason:
remote connection failure`. The requests that fail are the ones that
need a new
tunnel. `actor_connect` refuses the tunnel once a circuit breaker set by
`tunnelCircuitBreakerLimit` (65536) is full.

- Split the limit into tunnelCircuitBreakerLimit and
actorConnectCircuitBreakerLimit, so each cluster can be tuned on its
own.
- Set both to 1048576. For actor_connect that covers 11,000 workers on
up to
about 95 Envoy threads. Leaving the breakers unset would mean Envoy's
default
  of 1024.
- Tuning actor_connect's limits is tracked in agent-substrate#3100.

- [ ] Tests pass
- [ ] Docs updated
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants