Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
0df3bda
An open seals what the engine before it left unsealed, instead of wai…
sorenbs Oct 31, 2026
1fcbbc0
TLA-016 re-recorded for the seal at an open that inherits unsealed pages
sorenbs Oct 31, 2026
48a655f
A failed inherited seal is retried at its backoff, not left to the ag…
sorenbs Nov 1, 2026
22d8936
A non-owner forwards a data-plane request once to its stream's owner,…
sorenbs Oct 31, 2026
c034339
A forward never carries a Proxy-Connection field to the owner, comple…
sorenbs Nov 1, 2026
514e727
A forwarded answer is relayed with the owner's headers, its offset, c…
sorenbs Nov 1, 2026
0594d25
An owner that drops a forwarded request unanswered is answered exactl…
sorenbs Nov 1, 2026
d449e0c
A forward gives the owner 1 s to connect and its shard-open wait, the…
sorenbs Nov 1, 2026
93ee1fd
Forwards waiting for their owners hold at most a quarter of a non-own…
sorenbs Nov 1, 2026
1af661f
A create refused because another instance owns its shard drops the st…
sorenbs Nov 1, 2026
1b5616a
A fleet-off cell passes every request to its handler untouched by the…
sorenbs Nov 1, 2026
b800da3
The LiveFeed fleet certification probes each instance with forwarding…
sorenbs Nov 1, 2026
2f0a244
Edge change #235's record and the wire matrix state what forwarding d…
sorenbs Nov 1, 2026
564eca6
Each instance builds its own forwarding transport, and the forwarding…
sorenbs Nov 1, 2026
cc8720b
An instance that owns more than the fair share of shards moves one to…
sorenbs Nov 1, 2026
ad53664
A scale-validation guide tells an agent on Prisma Compute how to test…
sorenbs Nov 1, 2026
fc4f7ff
Edge change #235 records the owner's ratification of 2026-11-01
sorenbs Nov 1, 2026
651b357
The count balance's fair share is one function, ceil(shards / members…
sorenbs Nov 1, 2026
fe57da5
A shard whose override names an instance outside the ring may be move…
sorenbs Nov 1, 2026
6c83243
After a young override holds the count balance's reads, two consecuti…
sorenbs Nov 1, 2026
1fccb77
The count balance's DSTs pin that a committed move holds the mover's …
sorenbs Nov 1, 2026
9a0cd18
A raw append whose body is over 64 KiB keeps its 409 at a non-owner, …
sorenbs Nov 1, 2026
9cb47c1
A forwarded read that fails or times out after it was sent answers th…
sorenbs Nov 1, 2026
98beed0
Edge change #235 says Streams-Forwarded is a client-usable opt-out an…
sorenbs Nov 1, 2026
8ca77dc
The forward-cap DST ends in milliseconds: its owner stand-in drops th…
sorenbs Nov 1, 2026
b8749b4
The forward cap has a mutation owner of its own: admission_forwards s…
sorenbs Nov 1, 2026
601e2e6
An owner stand-in that no forward reaches fails its test in 10 s by n…
sorenbs Nov 1, 2026
08b62cd
The answer bound waits only for a watch's key observation, pinned: a …
sorenbs Nov 1, 2026
7b6edc7
TLA-011 TLA-016 re-recorded for the count balance's spawn line and th…
sorenbs Nov 1, 2026
644630e
The write-tier rig waits for the sealer's open before it appends, so …
sorenbs Nov 1, 2026
9727b88
The inherited-seal tests wait until the seal that retired the backlog…
sorenbs Nov 1, 2026
78c9581
The failed-inherited-seal test opens its engine with sealing off and …
sorenbs Nov 1, 2026
e0a391c
The fleet DSTs that start a fleet assert its tick runs right after th…
sorenbs Nov 1, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 30 additions & 6 deletions bench/fleet/livefeed-cert.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,22 @@ leg("streams-1 serves outside fleet mode with no ring",
JSON.stringify((await debug("streams-1"))?.ring ?? null));

// SSE collector over fetch streaming.
async function sseCollect(url, { headers = {}, ms = 10000, until = () => false } = {}) {
// Every leg below asserts what ONE instance does, so a subscription opts
// out of forwarding to the owner (edge change #235) with the
// Streams-Forwarded request header: a non-owner then answers its typed
// 409 itself instead of sending the request on. The forwarding leg passes
// `forward: true` to measure the forward.
const PINNED = { "streams-forwarded": "cert" };
async function sseCollect(url, { headers = {}, ms = 10000, until = () => false, forward = false } = {}) {
const ctl = new AbortController();
const out = { text: "", eof: false, status: 0 };
const timer = setTimeout(() => ctl.abort(), ms);
try {
const r = await fetch(url, { headers: { ...H(), accept: "text/event-stream", ...headers }, signal: ctl.signal });
const pin = forward ? {} : PINNED;
const r = await fetch(url, { headers: { ...H(), accept: "text/event-stream", ...pin, ...headers }, signal: ctl.signal });
out.status = r.status;
out.replayTo = r.headers.get("streams-replay-to");
out.forwardedTo = r.headers.get("streams-forwarded-to");
if (!r.body) { out.eof = true; return out; }
const reader = r.body.getReader();
const dec = new TextDecoder();
Expand Down Expand Up @@ -412,7 +420,7 @@ const mkWedge = async (url) => {
let r;
const t0 = Date.now();
for (;;) {
r = await fetch(url, { headers: { ...H(), accept: "text/event-stream" } });
r = await fetch(url, { headers: { ...H(), accept: "text/event-stream", ...PINNED } });
if (r.status === 200 || Date.now() - t0 > 60000) break;
await r.body?.cancel?.().catch(() => {});
await sleep(1500);
Expand Down Expand Up @@ -446,9 +454,12 @@ const waitFor = async (pred, ms) => {

// ---- Leg group A: replay via EVERY instance (initial ownership) -----
// Exactly one instance owns the live tail and serves the full lineage;
// the others answer the TYPED routing refusal carrying the owner name
// (round-11.4 field finding: without Streams-Replay-To the product
// translator renders the bounce as non-retryable cursor_beyond_tail).
// the others, asked not to forward, answer the TYPED routing refusal
// carrying the owner name (round-11.4 field finding: without
// Streams-Replay-To the product translator renders the bounce as
// non-retryable cursor_beyond_tail). Without the opt-out a non-owner
// forwards the replay once to that owner and relays its full lineage,
// naming it in Streams-Forwarded-To (edge change #235).
let initialOwner = null;
{
const results = {};
Expand Down Expand Up @@ -479,6 +490,19 @@ let initialOwner = null;
leg(`replay via ${n}: typed routing refusal names the owner`,
nr.status === 409 && nr.replayTo === initialOwner && !nr.text.includes("cursor_beyond_tail"),
`status=${nr.status} replayTo=${nr.replayTo} body=${nr.text.slice(0, 160)}`);
let fr;
for (let i = 0; i < 20; i++) {
fr = await sseCollect(`${base(n)}/v1/streams/certsplit/records:sse?routingKey=hot0`, {
ms: 20000, until: (t) => t.includes('"upToDate":true'), forward: true,
});
if (fr.status !== 503) break;
await sleep(1000);
}
const fseeds = count(fr.text, '"seed":0');
leg(`replay via ${n}, forwarded: the owner (${initialOwner}) serves the full lineage through it`,
fr.status === 200 && fr.forwardedTo === initialOwner && fr.replayTo === null
&& fr.text.includes('"upToDate":true') && fseeds === 1,
`status=${fr.status} forwardedTo=${fr.forwardedTo} replayTo=${fr.replayTo} seed0x${fseeds}`);
}
}
}
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Do not read these whole. Find the heading first, then read only that range
- [QUEUES-DESIGN-REVIEWS.md](QUEUES-DESIGN-REVIEWS.md): the review record for the queues design: each review's points of revisions 1-6 and where the design answers or declines them.
- [STREAMS-COST-LEVERS-2026-10.md](STREAMS-COST-LEVERS-2026-10.md): Streams at Cloudflare K2's price: the four-profile benchmark and modelled cost (Fable 5.1's report, kept outside the tree), the screening of the first cost levers on the launch posture (live-window scan cache, tail ring, `_ops_metrics` at 60 s landed; history fan-in deferred) and the levers that decide the goal next.
- [QUEUES-PRICING-BENCHMARK.md](QUEUES-PRICING-BENCHMARK.md): the queues price goal (Cloudflare parity at an 80% infrastructure margin), the control-plane scenario and its Cloudflare bill ($27.06 a month, a $5.41 cost ceiling), the cost benchmark that decides the goal after Q5 (Q0 runs a preliminary), and the pre-build estimate; calculator and measurement rig in [bench/queues-cost](../bench/queues-cost/README.md).
- [SCALE-VALIDATION.md](SCALE-VALIDATION.md): the guide for validating streams and queues at scale on a Prisma Compute fleet: the deployment posture (1-2 shards per instance, the 100 ms WAL gap) and how to verify it, the streams and queue tests with their void and stop rules, the cost model (WAL PUTs per busy shard), measured cost against Cloudflare's prices, acceptance bars and the report template.
- [BETA-REFERENCE.md](BETA-REFERENCE.md): the public beta's customer reference: per-project limits on a shared cell (provisional until the envelope arm), the 413, 429 and 503 answers with `Retry-After` and `retryable`, the append retry rule, and what the beta does not promise. SPEC §6 links it. [BETA-DATA-POSTURE.md](BETA-DATA-POSTURE.md): the beta's data posture as built (where data lives, what is encrypted under which keys, retention, erasure, one instance, no SLA, no backups), the engineering half of its terms; the legal parts await Prisma legal.

**Wire contract, edge changes and decisions**
Expand Down
Loading
Loading