Repository navigation
feat(mesh): connect teapots in parallel at boot - #112
Merged
Merged
Conversation
N absent teapots cost N x bootTimeoutMs because each connect was awaited before the next began. Start every connect at once and register the results in config order, so the graph stays deterministic. A permanent refusal still fails the boot immediately; connects still in flight close their link when it lands. Tests: three absent teapots boot in about one budget on Node, Deno and Bun (1.8s before, ~0.6s after), and a refusal next to an absent teapot fails in under 3s (30s before). Closes #95 Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
This was referenced Nov 30, 2026
This was referenced Nov 30, 2026
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.
Closes #95.
Teapots connected one after another, so N absent teapots held the boot for N ×
bootTimeoutMs. Now every connect starts at once (Promise.all) and the results register in config order, so the graph does not depend on arrival order.spliceRemoteScopesinsrc/app/index.ts(D19 scope respected).Tests
develop.mesh-reconnect.test.ts.Verified locally
lint (0 errors), format, complexity, typecheck, coverage, build, api:check, test:deno (70), test:bun (60), test:edge.
Benchmark: boot path only; the request hot path is untouched, so no throughput bench was run. The boot timings above are the measurement.