Skip to content

[infra] Scale spore.host shared infra for concurrent/multi-activity use #58

Open

Description

@scttfrdmn

Summary

spore.host's shared infrastructure should scale to support many concurrent activities — multiple users, parallel sweeps, fleets of instances launching at once, and the e2e test suite — better than it does today. Surfaced concretely when ~22 concurrent launches in the Tier 2 run overwhelmed the client/launch path (#56), but the concern is broader than tests.

What we know (grounded)

  • DynamoDB: already PAY_PER_REQUEST (on-demand) across the CFN templates — scales automatically, not the bottleneck. ✓
  • Client-side serialization is the immediate pain: DNS registration SSHes into each instance (registerDNS, launch.go:2498) which then curls the DNS API. 22 parallel spawn processes share one SSH ControlMaster socket (~/.ssh/cm-*), which serialized everything (e2e Tier 2 harness can't run ~22 launches in parallel — waitForRunning times out, SSH ControlMaster contention #56). This is a per-client scaling limit but it's the one that bit us.
  • Lambda backends (dns-updater, dashboard-api, alert/scheduler/autoscale/pipeline orchestrators, cost-history, websocket) have no reserved/declared concurrency in their templates — under a burst (e.g. a 100-instance sweep all registering DNS at once) they're subject to the account's shared Lambda concurrency limit and could throttle.
  • Route53 has per-hosted-zone API rate limits (5 req/s) — a burst of DNS UPSERTs could throttle; is there batching/backoff?

Axes to evaluate

  1. Launch throughput — can N instances launch concurrently without client-side or API throttling? Decouple DNS registration from the synchronous launch path (e.g. instance self-registers via spored on boot, not via the client SSHing in).
  2. DNS API — Lambda concurrency + Route53 rate limits + retry/backoff; batch UPSERTs where possible.
  3. Per-client concurrency — the SSH ControlMaster / DNS-registration contention (e2e Tier 2 harness can't run ~22 launches in parallel — waitForRunning times out, SSH ControlMaster contention #56) is partly a client design issue: per-instance ControlPath, or skip client-side SSH for registration entirely.
  4. Multi-user isolation — tables are per-user-tagged already; confirm no shared hot keys / cross-user contention as user count grows.
  5. Observability — can we see throttling when it happens (CloudWatch on Lambda throttles, DDB, Route53)?

Deliverable

A scaling assessment + prioritized plan: identify the real ceilings (launch fan-out, DNS API, Lambda concurrency), recommend fixes (likely: move DNS registration off the synchronous client SSH path → instance self-registers via spored; add Lambda reserved concurrency / Route53 backoff). Not all at once — rank by impact.

Context

Raised alongside the Tier 2 work. #56 is the test-harness symptom; this issue is the underlying infra capacity. The DNS-registration-via-client-SSH design (3 above) is the most likely first win and also fixes #56's root cause.

Activity

  1. added
    enhancement
    on Jun 4, 2026
  2. added this to the Later milestone on Oct 19, 2026
  3. modified the milestones: Later, Post-1.0 on Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancement

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions