Skip to content

id: investigate: hot-world sharding — when one world outgrows one Durable Object #2059

Closed

Description

@dezren39

Source: the Cloudflare Workers fit investigation (on #2044) open question 3. A per-world Durable Object has a ~1,000 req/s soft ceiling and single-threaded execution. Investigate sharding/overflow strategies for a hot world (partition by topic/region, spill to native nodes, hierarchical objects) and the signals that trigger each.

Program: Drew's 2026-10-28 directive (full text: hatch-personal memory/topics/id-program-2026-10-28.md). Parent epic: #2056.
Working pattern: parallel investigations, then the named synthesis issue merges them into a full design. Route guidance: Workhorse by default; Specialist/Summit for synthesis and ramification-heavy work. A result that says "done" is not the endpoint — the orchestrator reviews it and may commission another round. Deliverables: a markdown design/investigation doc (mermaid/SVG diagrams welcome) linked from this issue, plus follow-up issues for anything buildable. Build a proof of concept where the design calls for one, but do NOT build the permanent feature on top of an unreviewed PoC.

Acceptance criteria

  • A markdown investigation doc is linked from this issue covering sharding/overflow strategies for a hot world (partition by topic/region, spill to native nodes, hierarchical objects).
  • The doc names the signals that trigger each strategy, against the per-world Durable Object ~1,000 req/s soft ceiling and single-threaded execution.
  • Anything buildable that falls out is filed as follow-up issues linked here.

Activity

  1. added
    app/idPackage/app: id (pkgs/ or apps/ in this repo)
    on Oct 29, 2026
  2. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Parent epic: #2056 — ID platform expansion (2026-10-28 directive). Filed as batch 2 from PREPARED-ACTIONS.md.

  3. developing-today commented on Oct 29, 2026

    @developing-today
    Contributor
  4. added
    kind/questionQuestion or design decision to resolve
    source/humanFiled directly by a human
    priority/normalOrdinary priority (the default)
    effort/mMedium: expected under 1 day of work
    meta/enrichedIntake review done: acceptance criteria, links, and normalized labels added
    on Oct 29, 2026
  5. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Intake review

    Related: parent epic #2056; source: Workers fit investigation #2044, open question 3; sibling investigations #2060 (key recovery) and #2061 (jurisdiction pinning).

    Notes: investigation deliverable in the ID program batch; the trigger signals matter as much as the strategies — an overflow path with no observable trigger is not a design.

    Risks: partitioning by topic/region changes world consistency semantics; the doc should state what consistency each strategy gives up.

    Suggested approach: Workhorse investigation per program route guidance.

    — Fleet monitor intake pass (protocol §5): issue verified still live this run (filed within the last hour; no merged PR or duplicate resolves it), labels normalized, meta/enriched applied.

  6. added
    priority/highImportant and time-sensitive
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 29, 2026
  7. dezren39 commented on Oct 29, 2026

    @dezren39
    MemberAuthor

    Top priority — ID program wave-1. Drew directed this be picked up in the next runs (2026-10-29): enqueued directly as triage task 3361 in repo-health-code-pilot at queue priority 20 (only breakage-class work at priority 10 outranks it). Wave-1 is the ungated investigations and designs; syntheses and PoCs stay gated on their named inputs. Investigation route: Workhorse.

  8. 8 remaining items

  9. added
    queue/queuedHas a queued task in the Supabase agent queue
    and removed
    work/assignedQueue worker lifecycle state
    on Oct 29, 2026
  10. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Queued: repo-health-code-pilot task 3928 (2026-10-30), wave-2 follow-on. The 2026-10-29 triage verified this issue and recorded 'write the investigation' as the next step; this task is that write — investigation doc PR under doc/, follow-up issues for buildable pieces, close with the doc link. Ordered by Drew ('queue unrun').

  11. added
    work/assignedQueue worker lifecycle state
    queue/claimedQueue worker lifecycle state
    and removed
    queue/queuedHas a queued task in the Supabase agent queue
    on Oct 30, 2026
  12. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

    • Agent: queue worker (repo-worker-code), Lane D shift
    • Session / ID: queue task 3928
    • Found via: queue claim
    • Task: Write the wave-2 investigation/design doc for hot-world sharding (overflow strategies past one Durable Object, trigger signals, journal/semantics impact) under doc/ via PR; follow-ups + close.
    • Expectation: effort m; done = doc PR opened/merged, follow-up issues filed, issue closed with doc link.
    • Links: task 3928
  13. added 2 commits that reference this issue on Oct 30, 2026
  14. dezren39 commented on Oct 30, 2026

    @dezren39
    MemberAuthor

    Investigation landed — closing

    The wave-2 investigation/design document for this issue is landed on main:

    It formalises the wave-1 findings recorded on this issue (task 3361), re-verified against current main (metrics.rs signal fields, SetCrossWorldWrite in actor.rs, WorldLimits in mod.rs). It covers: the escalation ladder (rung 0 shed non-actor load → 1 topic partition → 2 region shards → 3 native spill under a journaled lease → 4 hierarchy for reads only); the §2 signal bands with sustained-window and de-escalation discipline; the §4 comparison table with each strategy's consistency cost explicit (ordering, atomicity, "is it still one world?"); and §5 on what sharding does to the journal, with multi-writer CRDT journal splitting explicitly rejected. All four Codex review findings on the PR were verified against the code, fixed in the doc, and replied to on their threads: windowed queue-depth signal (actor_queue_depth_max is a lifetime fetch_max high-water mark — a note also landed on #2275), shard re-merge as a state-import/reconciliation design rather than journal concatenation (WorldCore::restore rejects a second Created header), command_latency corroboration (it times the whole handler, journal persistence included), and aggregate-vs-per-object storage for topic partitioning.

    Follow-ups filed from the investigation:

    Hand-off to #2046 (doc §8): rung-1 hosted mapping (separate DOs vs segmented tables), shard re-merge design or one-way declaration, threshold defaults confirmation against #2275's detector. The signals follow-on #2275 remains open and carries the windowed-queue-depth refinement.

    🤖 Agent note · done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

app/idPackage/app: id (pkgs/ or apps/ in this repo)effort/mMedium: expected under 1 day of workkind/questionQuestion or design decision to resolvemeta/enrichedIntake review done: acceptance criteria, links, and normalized labels addedpriority/highImportant and time-sensitivepriority/normalOrdinary priority (the default)source/humanFiled directly by a human

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions