Repository navigation
Conversation
In large static deployments (10k+ named actors across shards), named-actor resolution currently depends on gossip convergence. Nodes reached only via statically configured routes never appear in gossip membership, so SWIM probes against them fail and the route gets filtered out, surfacing as "No healthy instances" errors during resolve() under load. Add an explicit seeding API that registers a path->addr route directly, bypassing gossip convergence: - NamingBackend::seed_static_route (default no-op, backward compatible) - GossipBackend/GossipCluster implementation: derives a synthetic NodeId from the address hash and inserts an Online ClusterNode plus a named actor instance, so resolve() succeeds without gossip round-trips - ActorSystem::seed_static_route(path, addr) public entry point Callers with static topologies can seed routes at startup (and refresh periodically) for deterministic delivery. Validated in a 2-process, 10,101-actor deployment: 9,999 cross-process named-actor letters over 13 hours with 0 send_err and 0 unresolved routes; pre-fix runs intermittently failed resolve with "No healthy instances".
Codecov Report❌ Patch coverage is
... and 11 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Cover the seed_static_route path added in this PR: bad-addr rejection, named-instance registration, resolve() success without gossip round-trips, idempotent re-seeding, and multiple names per address (the N-shops-per-shard shape).
Author
|
Added unit tests for the new
Pushed as c5cb4f5 — Codecov should pick up the new coverage on the next report. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
In large static deployments (10k+ named actors across shards), named-actor resolution depends on gossip convergence. Nodes reachable only via statically configured routes never join gossip membership, so SWIM probes against them fail and the resolver filters those routes out — surfacing as
No healthy instanceserrors fromresolve()under load. We hit this reliably when scaling a named-actor workload to 10k actors across 2 ActorSystem processes.Solution
Add an explicit, opt-in seeding API that registers
path -> addrdirectly, bypassing gossip convergence:NamingBackend::seed_static_route(path, addr)— new trait method with a default no-op implementation (backward compatible for other backends)GossipBackend/GossipClusterimplementation — derives a syntheticNodeIdfrom the address hash and inserts anOnlineClusterNodeplus a named-actor instance, soresolve()succeeds without gossip round-trips; delivery is by path, so the synthetic id does not need to match the peer's real node idActorSystem::seed_static_route(path, addr)— public entry point:Callers with static topologies seed routes at startup (and may refresh periodically) for deterministic delivery.
Evidence
Validated in a 2-process, 10,101-actor deployment (single desktop, WSL2):
resolve()withNo healthy instancesas soon as SWIM marked the statically-known nodes unhealthyNotes
cluster/vssystem/) to maintainers' preference.