diff --git a/.dockerignore b/.dockerignore index c4ffe3d..59f4c59 100644 --- a/.dockerignore +++ b/.dockerignore @@ -13,3 +13,15 @@ tests examples scripts bin +**/.env +**/.env.* +**/backups +**/private +.archify +.worktrees +**/*.db +**/*.db-* +**/*.sqlite +**/*.sqlite-* + +**/.venv diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9bc3ccb..8838e86 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ permissions: jobs: verify: runs-on: ubuntu-24.04 - timeout-minutes: 15 + timeout-minutes: 30 steps: - uses: actions/checkout@v4.2.2 - uses: actions/setup-go@v5.5.0 @@ -21,5 +21,9 @@ jobs: - uses: actions/setup-node@v4.4.0 with: node-version: '24' + - run: python3 -m unittest discover -s examples/checkout -p 'test_*.py' + - run: node --test examples/checkout/*.test.mjs + - run: python3 -m unittest discover -s examples/outbox -p 'test_*.py' + - run: python3 -m unittest discover -s benchmarks -p 'test_*.py' - run: scripts/test-integration.sh - run: make demo DEMO_FLAGS=-cleanup diff --git a/.gitignore b/.gitignore index b50b7eb..ee11c4b 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,18 @@ bin/ *.log coverage.* .DS_Store +# Self-hosted private runtime/configuration data +**/backups/ +**/private/ +.archify/ +# Local application outbox databases and journals +**/*.db +**/*.db-* +**/*.sqlite +**/*.sqlite-* +# Private environment variants; checked-in examples remain public. +**/.env.* +!**/.env.example + +# Optional local figure-generation environment +**/.venv/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d1fc660..307f64a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -4,9 +4,12 @@ Keep the collector small and its claims reproducible. 1. Read [the delivery contract](docs/delivery.md). 2. Add a behavioural regression test before changing a failure path. -3. Run make test, go vet ./..., and make test-integration. +3. Run `make test`, `go vet ./...`, `go build ./...` and `make test-integration`. + Run the Python/Node suites when changing examples or artifact auditing; see + [development](docs/development.md). 4. Explain the resulting behaviour and verification in the pull request. Integration tests create and destroy only their own isolated Compose projects. Do not reset a shared database, weaken durability for a benchmark, or add a -performance claim without its raw results and environment metadata. +performance claim without its raw results and environment metadata. Keep timing studies sequential, commit the measured code first and +retain limited/unknown outcomes. Figure edits use [source/data and visual checks](docs/figures/README.md). diff --git a/Makefile b/Makefile index 221b89f..b1741ba 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ # Local service, demonstration and experiment commands. .PHONY: help up down logs test test-integration help: - @echo "make up | down | logs | test | test-integration | demo | demo-recovery | bench-db | bench-pipeline" + @echo "make up | down | logs | test | test-integration | demo | demo-recovery | bench-db | bench-pipeline | bench-study | bench-study-smoke" up: docker compose up -d --build --wait down: @@ -26,3 +26,9 @@ bench-db: .PHONY: bench-pipeline bench-pipeline: go run ./cmd/bench -mode pipeline $(BENCH_FLAGS) + +.PHONY: bench-study bench-study-smoke +bench-study: + go run ./cmd/bench -mode study $(STUDY_FLAGS) +bench-study-smoke: + go run ./cmd/bench -mode study -smoke $(STUDY_FLAGS) diff --git a/README.md b/README.md index 5efcca0..78ac658 100644 --- a/README.md +++ b/README.md @@ -1,99 +1,95 @@ # IngestKit -**What does an event collector actually guarantee when a dependency fails?** - -IngestKit is a small Go pipeline that makes that question testable. Send a stable -UUID over HTTP, acknowledge it through Redpanda, and persist it in PostgreSQL. -Stop the database, kill the consumer after a commit, or fail quarantine delivery: -the tests check the resulting IDs and source offsets. - -[Read the engineering article](docs/article.md) · [Run the experiments](benchmarks/README.md) · [Delivery contract](docs/delivery.md) - -~~~mermaid -flowchart LR - A[Application] -->|JSON + stable UUID| B[Go API] - B -->|acknowledged append| C[Redpanda] - C --> D[Go consumer] - D -->|COPY staging + merge| E[(PostgreSQL)] - D -->|malformed envelope| F[Quarantine topic] - E -. transaction commits before offset .-> C -~~~ +A self-hosted event collector for trusted application backends. Send JSON over +HTTPS, buffer it in Redpanda, and store it in PostgreSQL with stable event IDs. +The repository includes copyable clients, a transactional outbox, failure tests +and reproducible experiments. + +**HTTP 202 means broker acknowledgement. PostgreSQL storage is asynchronous.** +Retry uncertain delivery with the same UUID and content; storage keeps one row +per `(tenant_id,event_id)` and retains the first stored content. + +A backend sends HTTPS to Caddy; API, broker, consumer and PostgreSQL run privately on one Compose host. + +[Deployment](deploy/README.md) · [Application integration](docs/integration.md) · +[Operations](docs/operations.md) · [Engineering article](docs/article.md) -## Try it +## Deploy -Requires Docker with Compose v2+ and Go 1.24+. Start with the isolated checkout -demo; it prints the three accepted IDs and verifies each stored row: +Use a Linux host with Git, Docker/Compose 2.24.4+, OpenSSL and curl. Point your +own hostname at it and make ports 80/443 reachable. Replace `events.example.com` +below with that hostname. Go is built inside Docker. ~~~sh git clone https://github.com/feat7/ingestkit.git cd ingestkit -make demo -make demo-recovery +deploy/configure.sh events.example.com +docker compose --env-file deploy/.env -f deploy/compose.yml up -d --build --wait ~~~ -The recovery demo stops PostgreSQL, accepts events through the broker, then -restores the database and reconciles the same IDs. Runs have separate projects, -ports and volumes. They stop their services and preserve volumes; each prints -its evidence directory and a command to clean up only that run. Use -`DEMO_FLAGS=-cleanup` for disposable runs. +Configuration is generated into ignored `deploy/.env` with mode 0600 and fresh +secrets; existing files are never overwritten. Only Caddy publishes ports. +See the [deployment guide](deploy/README.md) for DNS, resources and certificate +prerequisites. Public certificate issuance requires working DNS/reachability; +the automated HTTPS tests use a trusted private CA. -For an interactive stack: +## Send and verify + +For the initial generated key mapping, load the key without printing it and send +the three checkout events: ~~~sh -make up -curl --fail-with-body http://localhost:8080/v1/events \ - -H 'Authorization: Bearer local-demo-key' \ +INGESTKIT_API_KEY=$(sed -n 's/^API_KEYS={"\([0-9a-f]*\)":"default"}/\1/p' deploy/.env) +curl --fail-with-body https://events.example.com/v1/events/batch \ + -H "Authorization: Bearer $INGESTKIT_API_KEY" \ -H 'Content-Type: application/json' \ - -d '{"event_id":"00000000-0000-4000-8000-000000000001","event_type":"order_completed","occurred_at":"2026-11-03T00:00:00Z","payload":{"order_id":"order-1","amount":25}}' -docker compose exec postgres psql -U ingestkit -d ingestkit_test \ - -c 'SELECT event_id,event_type,payload FROM ingestkit.events;' -make down -~~~ + --data-binary @examples/checkout/events.json +unset INGESTKIT_API_KEY -**202 means broker acknowledgement; storage happens afterward.** A failed or -timed-out HTTP request can still have delivered some records. Retry the same -IDs. Storage keeps the first event for each `(tenant_id,event_id)` pair. -[Python and Node callers](examples/checkout/README.md) show the HTTP contract -without installing a generated SDK. +docker compose --env-file deploy/.env -f deploy/compose.yml exec -T postgres \ + psql -U ingestkit_admin -d ingestkit -c \ + "SELECT tenant_id,event_id,event_type FROM ingestkit.events ORDER BY persisted_at DESC LIMIT 10;" +~~~ -## Evidence, including the awkward result +Allow the consumer time to catch up before checking SQL. Repeating these fixed +UUIDs still stores three logical events for the initial tenant. Use fresh UUIDs +for new business events. Stop with the following command; named data volumes remain: -On a shared M1 Max / OrbStack setup, three steady runs each accepted and stored -10,000 distinct events at an offered 1,000 events/s. HTTP ACK p95 was 27–31ms; -receipt-to-visible-storage p95 was 73–85ms, including SQL polling. Burst -repetitions varied more. These are load points, **not a maximum-capacity claim**. +~~~sh +docker compose --env-file deploy/.env -f deploy/compose.yml down +~~~ -The database comparison also found batch INSERT faster than the service's -COPY/staging/merge path at batch size 100: median 0.492s versus 1.011s for -10,000 unique submissions. Staging and replay handling have costs. All samples, -settings, source revision and caveats are in [the local results](benchmarks/results/local-2026-11-03/README.md). +## Integrate -![Database timings and storage visibility for every measured repetition](docs/assets/experiments.svg) +Copy the standard-library [Python or Node client](docs/integration.md) into a +backend. For durable application delivery, run the [order/outbox example](examples/outbox/README.md): +business state and the serialized event are saved in one SQLite transaction, +then a separate dispatcher sends pending work with stable IDs. Keys stay in +trusted backend configuration. See the [API reference](docs/api.md) for limits, +responses and permanent versus uncertain failures. -~~~sh -make test -make test-integration -make bench-db -make bench-pipeline -~~~ +## Inspect the evidence -Tests cover strict envelopes, byte limits, bounded publishing, tenant-scoped -deduplication, database/broker outages, the database-commit/offset-commit crash -window, quarantine failures, rebalance and shutdown. Integration checks use real -isolated services and fail if their setup is missing. +The [corrected HTTPS study](benchmarks/results/selfhost-2026-11-04/README.md) +records 25 configurations with three measured repetitions: database batching, +payloads, duplicates, HTTP load, concurrency and three recovery scenarios. +All acknowledged IDs reconciled with stored content; generator limits and +ambiguous outcomes remain explicit. These local runs do not establish maximum +capacity. Batch INSERT had the lower median than COPY/staging/merge in all 11 DB +configurations, so the deployed writer now uses atomic batch INSERT. -## Scope +To try an isolated local walkthrough, use Docker and Go 1.24+: -This is an engineering reference, with reusable HTTP examples and a small store -implementation. The local broker has one replica and finite retention. Disk/host -loss and outages beyond retention are outside the tested recovery assumptions. -There is no unconditional zero-loss, exactly-once or production-readiness claim. -Deployment hardening, row-level database isolation and business payload schemas -are outside this reference. +~~~sh +make demo DEMO_FLAGS=-cleanup +make demo-recovery DEMO_FLAGS=-cleanup +~~~ -The old compiler, generated SDKs, installers and event-specific endpoints were -removed. Existing external releases and legacy data were preserved; legacy data -is not automatically imported. Small workloads may be better served by direct -PostgreSQL writes. +[Development and tests](docs/development.md) · [Experiment controls](benchmarks/README.md) · +[Delivery semantics](docs/delivery.md) · [Architecture](docs/architecture.md) -[Architecture](docs/architecture.md) · [Development and configuration](docs/development.md) · [Contributing](CONTRIBUTING.md) · [Apache 2.0 license](LICENSE) +This is a single-host deployment with one broker replica and finite log retention. +It does not protect against losing the host/disk or a recovery gap beyond retained +data. PostgreSQL rows have no automatic expiry; the operator owns backups, disk +monitoring and retention. It provides ingestion and replay-safe storage, without +an analytics UI, schema compiler or database row-level tenant policies. diff --git a/benchmarks/README.md b/benchmarks/README.md index d06cf6d..9b8ca2f 100644 --- a/benchmarks/README.md +++ b/benchmarks/README.md @@ -1,18 +1,148 @@ # Experiments -Run `make bench-db` with Docker running. Each invocation creates and destroys its own local stack, prints an evidence directory, and writes every measured repetition to JSON/CSV. No external database is accepted by the CLI. +Read the [corrected self-hosted study](results/selfhost-2026-11-04/README.md) for +all 25 configurations, repetitions, controls and limits. The complete +[COPY-writer reference](results/selfhost-copy-2026-11-04/README.md) is preserved +separately. The final deployed writer uses batch INSERT, chosen after the first +study favored it over COPY/staging/merge in all 11 database configurations. -Defaults: 10,000 submitted events, 256-byte JSON payload, 10% duplicate submissions, batch size 100, three repetitions after warm-up. Override via `BENCH_FLAGS='-count 1000 -batch 50 -duplicates 0'`. Single INSERT commits every row; batch INSERT and the production COPY/staging/merge store commit every batch. All use the same table, indexes, conflict policy and database settings. These transaction boundaries are part of the experiment. +## Run the registered study -Workload generation, cleanup and exact ID/payload verification are outside the timer. Each repetition rotates method order. A random tenant scopes cleanup; no global truncation or schema changes. A missing row, mismatched payload, partial SQL failure or incomplete report fails the command. Raw per-call latency samples are in JSON; medians summarize repetitions. Performance evidence will be added after the harness is committed. +Use Go 1.24+, Docker/Compose 2.24.4+, Python 3.9+ and OpenSSL on the local experiment +host. The driver starts one owned HTTPS deployment, trusts its extracted private +CA, exposes only owned loopback observation ports, saves evidence and removes +only its own resources. The deployment server itself does not need Go. -Run `make bench-pipeline` for three measured windows after warm-up. `BENCH_FLAGS='-pattern burst -rate 1000 -duration 10s -batch 100 -concurrency 8'` offers the same total event count in the first quarter of each window. Steady load spreads it across the whole window. Rates are targets; inspect attempted events, queue misses, late schedules, HTTP failures and resource snapshots before interpreting a run. +~~~sh +# Small correctness subset; three repetitions per case, not publication evidence. +make bench-study-smoke STUDY_FLAGS='-out tmp/studies/my-smoke -seed 42' -HTTP acknowledgement latency is one sample per successful request. Storage latency is one sample per observed event: API receipt to first SQL observation after commit, including 50 ms polling and query delay. It is an upper bound, not a physical commit timer. Persisted throughput divides unique observed events by the complete window plus request tail/drain; acceptance throughput divides accepted events by the requested window. Raw samples and backlog observations are retained. Acknowledged missing IDs, unexpected IDs or duplicate physical rows fail reconciliation. Ambiguous HTTP delivery is reported separately. The driver does not retry requests. +# Full measurements: commit sources, run sequentially, choose a fresh directory. +make bench-study STUDY_FLAGS='-out benchmarks/results/my-study -seed 42' -The CLI requires committed source and records that revision, image content IDs/repository digests, database durability/index settings, complete topic configuration, host/VM versions and coarse Docker resource snapshots. It removes only its owned stack. Local credentials remain in a private ignored run directory; public reports contain a whitelisted configuration. Database resets use a random tenant; pipeline cleanup names only generated IDs and refuses existing-ID collisions. Both run on the same host as their generator and observer. These experiments do not estimate maximum capacity or cloud cost. +# Resume using the exact original source, seed, controls and runtime identity. +make bench-study STUDY_FLAGS='-out benchmarks/results/my-study -seed 42 -resume' -[Recorded local experiments](results/local-2026-11-03/README.md) include every -repetition, exact configuration and the observed COPY/staging disadvantage. -The optional figure generator is `python3 benchmarks/plot_results.py` with -matplotlib installed; it reads these captures and writes docs/assets/experiments.svg. +# Independent read-only audit of a complete recorded study. +python3 benchmarks/audit_study.py benchmarks/results/selfhost-2026-11-04 +~~~ + +The command prints the chosen output path, each case and its status. An omitted +path selects a fresh ignored `tmp/studies/` directory. Existing output is +refused without `-resume`. Full runs require clean committed source; smoke may +be explicitly marked dirty and is never publication timing evidence. Do not +edit source, run concurrent test/plot workloads, or stop unrelated user services +while timing a comparison. The recorded host had existing workloads, noted in +its environment limitations. + +## Fixed controls + +Every configuration has three measured repetitions after warm-up. The database +methods rotate order. The registry is deliberately not a full Cartesian product. + +| Question | Configurations | Matched controls | +| --- | --- | --- | +| SQL batching | Batches 1/10/50/100/500/1000 | 5,000 submissions/method, 256 B, no duplicates | +| SQL payload | 1 KiB/16 KiB | Batch 100; compare with 256 B/batch 100 above | +| Repeated IDs | 10/50/90% | Batch 100,256 B; compare with 0% above | +| HTTP batching | Batches 1/10/100 | Offered 1,000 events/s, 256 B, 32 clients | +| Offered load | 100/5,000/10,000 events/s | Batch 100,256 B, 32 clients;1,000/s baseline above | +| HTTP payload | 1 KiB/16 KiB | Batch 10; compare with 256 B/batch 10 above | +| Burst | Same total in first quarter of window | Batch 100,256 B, 32 clients | +| Client concurrency | 8/64 clients | Batch 1, 1,000 offered/s, 256 B;32-client baseline above | +| PostgreSQL outage | Stop requested 3s; start requested 8s | 15-second 500/s workload, batch 100 | +| Consumer kill/restart | KILL requested 3s; start requested 5s | Same 15-second 500/s workload | +| Outbox + broker outage | 100 durable application events, broker stopped 8s after stop completion | Failed attempt exceeds 5s; new dispatcher replays original UUIDs | + +Ordinary pipeline windows are ten seconds after two-second warm-up, with a +30-second observation drain deadline and 50 ms target polling. Large payloads use +batch 10 to fit the existing 1 MiB request cap. The selfhost study fixes API limit +10,000 requests/s, info logging, broker 1 core/1 GiB and seven-day topic retention. +Actual process arguments, topic/database settings and trusted HTTPS protocol are +captured; no environment variable silently tunes matched cases. + +Payloads are reproducible varied ASCII JSON at the exact encoded byte length. +Each case/repetition uses a recorded namespace and seed. Duplicate submissions +reuse identical bytes/IDs. For SQL, generation/reset/warm-up/content verification +are outside elapsed time. Single INSERT commits each row; batch INSERT and the +independent COPY/staging/merge reference commit each batch against the same +indexed table/conflict policy. Submitted/s and inserted unique/s differ when +there are duplicates; those cases do less new-row work. + +## Interpret the populations + +- HTTP ACK latency: one sample per successfully acknowledged request. +- SQL visibility upper bound: one sample per event first seen by the pending-ID + observer after commit, from API receipt through completed SQL observation. + It includes polling/query delay, not just database execution. +- In-window ACK rate: only acknowledgements completed inside the target window, + divided by that window. Late starts/ACKs are separate counters. +- Verified stored rate: independent unique-row count divided by the full window, + request tail, observation drain and final verification. It is not an intrinsic + server-capacity estimate. +- `ObservedEvents` identifies latency samples. `VerificationNS` records the final + census overhead; rows found only then do not receive invented latency samples. + +The temporary pending-ID relation is connection-owned, not a timestamp cursor. +Transactions committing out of order remain observable. Final ID/type/time/payload +reconciliation is independent of observation bookkeeping and scopes only the +owned namespace/IDs. It never truncates a shared table or cleans an unrelated run. + +`limited` retains generator misses, late schedules, request/ACK tails, rejected or +ambiguous delivery, late polls and observer outages. A normal finite-window tail +does not by itself diagnose saturation. Fewer attempted events means the driver +missed its target; it does not mean the collector lost unattempted events. +An ambiguous ID absent at the final deadline remains **unknown**, not proven +undelivered. Acknowledged missing IDs, unexpected content/IDs or duplicate physical +rows fail correctness; they cannot become a successful speed result. + +Receipt and SQL observation share the deployment clock; host monotonic time +schedules load. Nearest-rank p50/p95/p99 are computed from their distinct raw +populations. Slow polls/query duration/max gaps are reported. During the deliberate +PostgreSQL outage only, the observer reconnects and rebuilds pending IDs while +recording unavailable observations. No exact commit time is inferred in that gap. +Fault timestamps record actual control requests/completions, not an assumed +instant service recovery. Availability experiments are separate from capacity. + +## Artifacts and resume + +| Artifact | Contents | +| --- | --- | +| `index.json`, `summary.csv` | Every configuration, status, summaries, attempts, raw references and checksums | +| `manifest-N.json` | Immutable source SHA/fingerprint, host/VM, runtime settings, exact image IDs/digests | +| `raw/-attempt-N.json.gz` | Every repetition/method, raw samples/backlog and ID-population evidence | +| `resources-N.json.gz` | Coarse owned-container snapshots; not proof of a bottleneck | +| `journal.json` | Atomic progress, compatibility identity and retained interrupted history | + +Gzip timestamps are zero; references include SHA256 and raw/compressed sizes. +Per-capture limits are 128 MiB raw/64 MiB compressed. Pipeline populations use compact +submission indices plus namespace/seed/count; outbox UUIDs are explicit. Credentials, +CA files and private Docker/error evidence remain in ignored owned run directories. + +A partial case reruns all three repetitions on a fresh owned stack, retaining +history and completed artifact bytes. Resume rejects changed source/files, seed, +registry controls, runtime/host controls or image content/configuration. Exact image +IDs remain in manifests; compatibility excludes only Compose's per-project image +label, proven to alter config IDs without changing filesystem/execution. Other +config and layers remain fingerprinted. Source/config changes need a new study. + +Interrupt with Ctrl-C/SIGTERM for bounded owned cleanup. A hard host/process kill +can leave resources: inspect that run's private evidence and clean only that +project. Never use global prune or measure over an abandoned owned stack. + +## Other entry points + +`make bench-db` and `make bench-pipeline` retain configurable single-run experiments +on development HTTP. Their `BENCH_FLAGS` include count/batch/payload/duplicates or +rate/duration/concurrency/pattern as appropriate; inspect `go run ./cmd/bench -h`. +They are not the registered HTTPS deployment comparison. All single-run measurements +still require committed source and own their stacks. Registered study mode rejects +ad-hoc workload flags rather than silently changing the comparison. + +See [figure sources](../docs/figures/README.md) for charts generated from the audited +index. [Historical local captures](results/local-2026-11-03/README.md) retain their +fsync-bypass erratum: topic write caching was disabled while development mode +still bypassed process-level fsync. They do not establish corrected deployment +throughput. The new studies inspect and reject that bypass; old raw bytes remain +unchanged. None of these local captures establishes maximum capacity, cloud cost, +production adoption or tolerance of the only disk/host failing. diff --git a/benchmarks/audit_study.py b/benchmarks/audit_study.py new file mode 100644 index 0000000..79ab091 --- /dev/null +++ b/benchmarks/audit_study.py @@ -0,0 +1,221 @@ +#!/usr/bin/env python3 +"""Independent read-only checks of recorded study bytes, sets and statistics.""" +import argparse +import copy +import gzip +import hashlib +import json +import math +from pathlib import Path +import re +import uuid + +class AuditError(ValueError): + pass + +def check(condition, message): + if not condition: + raise AuditError(message) + +def percentile(values, p): + return sorted(values)[max(0, math.ceil(len(values)*p)-1)] if values else 0 + +def id_hash(values): + return hashlib.sha256("\n".join(sorted(set(values))).encode()).hexdigest() + +def read_artifact(root, ref, secrets=()): + path = (root/ref["Path"]).resolve() + check(path.is_relative_to(root.resolve()), "artifact escapes output") + data = path.read_bytes() + check(len(data) == ref["Size"] <= 64*1024*1024, "artifact size differs") + check(hashlib.sha256(data).hexdigest() == ref["SHA256"], "artifact checksum differs") + if ref.get("Codec", "gzip") == "json": + raw = data + else: + check(data[4:8] == b"\0\0\0\0", "gzip timestamp is not zero") + import io + with gzip.GzipFile(fileobj=io.BytesIO(data)) as stream: + raw = stream.read(128*1024*1024+1) + check(len(raw) == ref["RawBytes"] <= 128*1024*1024, "raw artifact bound differs") + text = raw.decode() + for secret in secrets: + check(secret not in text, "private credential found in public artifact") + for marker in ("postgres://", "POSTGRES_ADMIN_PASSWORD", "POSTGRES_WRITER_PASSWORD", "-----BEGIN PRIVATE KEY"): + check(marker not in text, "private configuration found in public artifact") + return json.loads(raw) + +def populations(group): + if "Explicit" in group: + return group["Explicit"] + lookup = [str(uuid.uuid5(uuid.NAMESPACE_OID, f"{group['Namespace']}/{group['Seed']}/{i}")) for i in range(group["Count"])] + sets = {} + for name, indices in group["Indices"].items(): + check(all(isinstance(i,int) and 0<=i=request["StartedNS"]>=0, "invalid request interval") + check(request["ElapsedNS"]==request["FinishedNS"]-request["StartedNS"], "request elapsed differs") + ids=attempted[cursor:cursor+n];cursor+=n + if request["Accepted"]: acked.extend(ids) + if request["Ambiguous"]: unknown.extend(ids) + check(cursor==len(attempted) and acked==accepted and unknown==ambiguous, "request/ID population differs") + window=run["WindowNS"] + inside=sum(q["Events"] for q in requests if q["Accepted"] and q["FinishedNS"]<=window) + starts=sum(q["Events"] for q in requests if q["StartedNS"]<=window) + check(inside==run["AcceptedInWindow"] and starts==run["AttemptedInWindow"], "window classification differs") + check(run["AcceptedAfterWindow"]==len(accepted)-inside and run["AttemptedAfterWindow"]==len(attempted)-starts, "tail classification differs") + check(run["ack_ns"]==[q["ElapsedNS"] for q in requests if q["Accepted"]], "ACK samples differ from requests") + check(len(run["visibility_ns"])==run["ObservedEvents"], "visibility population differs") + for samples,key in ((run["ack_ns"],"ack_latency"),(run["visibility_ns"],"receipt_to_observed_storage_upper_bound")): + check(all(isinstance(v,int) and v>=0 for v in samples), "invalid latency sample") + for p,name in ((.5,"p50_ns"),(.95,"p95_ns"),(.99,"p99_ns")): + check(percentile(samples,p)==run[key][name], "latency percentile differs") + check(run["TotalNS"]>=window and run["DrainNS"]==run["TotalNS"]-window, "complete duration differs") + check(math.isclose(run["AcceptedEPS"],inside*1e9/window,rel_tol=1e-12), "ACK rate denominator differs") + check(math.isclose(run["PersistedEPS"],len(stored)*1e9/run["TotalNS"],rel_tol=1e-12), "storage rate denominator differs") + unknown_count=len(set(ambiguous)-set(stored));check(unknown_count==run["AmbiguousUnobserved"], "unknown-by-verification count differs") + for point in run["backlog"]: + expected=sum(q["Events"] for q in requests if q["Accepted"] and q["FinishedNS"]<=point["elapsed_ns"]) + check(point["Accepted"]==expected, "backlog ACK timeline differs") + limited=any(run[k] for k in ("GeneratorMissed","LateSchedules","Rejected","Ambiguous","AttemptedAfterWindow","AcceptedAfterWindow","ObserverLatePolls","ObserverOutages")) + check(run["outcome"]==("limited" if limited else "complete"), "limit incorrectly labelled") + +def stripped(report, kind): + summary=copy.deepcopy(report) + def strip(run): + for field in ("ack_ns","visibility_ns","backlog","request_samples"): + run[field]=None + if kind=="database": + for run in summary["runs"]: run["batch_ns"]=None + elif kind=="pipeline": + for run in summary["runs"]: strip(run) + else: + for run in summary["Runs"]: + if run.get("Pipeline"): strip(run["Pipeline"]) + return summary + +def registered_cases(mode): + """An independent transcription of the approved fixed experimental design.""" + zero=dict(ID='',Kind='',Recovery='',Pattern='',PayloadProfile='varied',Count=0, + BatchSize=0,PayloadBytes=0,Rate=0,Concurrency=0,Repetitions=3, + DuplicateFraction=0,Window=0,Warmup=0,Drain=0,Poll=0,FaultAt=0,RestoreAt=0) + def case(**changes): return dict(zero,**changes) + if mode=='smoke': + return [case(ID='smoke-database',Kind='database',Count=100,BatchSize=10,PayloadBytes=256), + case(ID='smoke-pipeline',Kind='pipeline',Pattern='steady',Count=10,BatchSize=2, + PayloadBytes=256,Rate=20,Concurrency=2,Window=500_000_000,Warmup=100_000_000, + Drain=5_000_000_000,Poll=25_000_000)] + check(mode=='full','unknown study mode') + db=case(Kind='database',Count=5000,BatchSize=100,PayloadBytes=256) + result=[dict(db,ID=f'db-batch-{b}',BatchSize=b) for b in (1,10,50,100,500,1000)] + result += [dict(db,ID=f'db-payload-{p}',PayloadBytes=p) for p in (1024,16384)] + result += [dict(db,ID=f'db-duplicates-{d}',DuplicateFraction=d/100) for d in (10,50,90)] + base=case(Kind='pipeline',Pattern='steady',Count=10000,BatchSize=100,PayloadBytes=256, + Rate=1000,Concurrency=32,Window=10_000_000_000,Warmup=2_000_000_000, + Drain=30_000_000_000,Poll=50_000_000) + result += [dict(base,ID=f'pipeline-batch-{b}',BatchSize=b) for b in (1,10,100)] + result += [dict(base,ID=f'pipeline-rate-{r}',Count=r*10,Rate=r) for r in (100,5000,10000)] + result += [dict(base,ID=f'pipeline-payload-{p}',PayloadBytes=p,BatchSize=10) for p in (1024,16384)] + result += [dict(base,ID='pipeline-burst',Pattern='burst')] + result += [dict(base,ID=f'pipeline-concurrency-{c}',Concurrency=c,BatchSize=1) for c in (8,64)] + for name,restore in (('database',8),('consumer',5)): + result.append(dict(base,ID='recovery-'+name,Kind='recovery',Recovery=name,Rate=500, + Count=7500,Window=15_000_000_000,FaultAt=3_000_000_000,RestoreAt=restore*1_000_000_000)) + result.append(case(ID='recovery-outbox',Kind='recovery',Recovery='outbox',Count=100, + BatchSize=100,PayloadBytes=256,RestoreAt=8_000_000_000,Drain=30_000_000_000,Poll=50_000_000)) + return result + +def validate_registry(rows, mode): + check([r['Case'] for r in rows]==registered_cases(mode),'registered cases or controls differ') + +def validate_manifest(value, identity): + check(value['source_sha']==identity['SourceSHA'] and value['broker_fsync_bypass'] is False, + 'manifest revision/durability differs') + settings=value['settings'] + check(settings['api_tls'] is True and settings['api_route']=='https_gateway' + and settings['tls_version'] in ('TLS 1.2','TLS 1.3') + and settings['redpanda_memory']=='1G' and settings['redpanda_smp']==1 + and settings['api_rate_limit_rps']==10000 and settings['api_log_level']=='info', + 'runtime controls differ') + check(all(value['database'][key]=='on' for key in ('fsync','synchronous_commit','full_page_writes')) + and value['database']['server_version']=='18.6','database durability/version differs') + topics=value['TopicConfiguration'] + caching=re.findall(r'^write\.caching\s+(\S+)',topics,re.M) + retention=re.findall(r'^retention\.ms\s+(\S+)',topics,re.M) + check(len(caching)>=2 and set(caching)=={'false'},'topic write caching differs') + check(len(retention)>=2 and set(retention)=={'604800000'},'topic retention differs') + for name,partitions in (('ingestkit.events',3),('ingestkit.dlq',1)): + check(re.search(r'NAME\s+'+re.escape(name)+r'\s+PARTITIONS\s+'+str(partitions)+r'\s+REPLICAS\s+1',topics), + 'topic partition/replica controls differ') + +def audit(directory, allow_smoke=False, secrets=()): + root=Path(directory);index=json.loads((root/"index.json").read_text()) + check(index["Schema"]==1 and index["Status"]=="complete", "study is incomplete") + identity=index["Identity"];mode=identity["Mode"] + check(mode=="full" or allow_smoke and mode=="smoke", "smoke is not publication evidence") + check(mode!="full" or not identity["SourceDirty"], "full study used dirty sources") + for key in ("SourceFingerprint","ControlsFingerprint","ImagesFingerprint","ConfigFingerprint"): + check(re.fullmatch(r"[0-9a-f]{64}",identity[key]) is not None, "invalid provenance fingerprint") + check(re.fullmatch(r"[0-9a-f]{40}",identity["SourceSHA"]) is not None, "invalid source revision") + check(bool(index["MetadataArtifacts"]) and bool(index["Resources"]), "provenance/resources missing") + for ref in index["MetadataArtifacts"]+index["Resources"]: + value=read_artifact(root,ref,secrets) + if ref.get("Codec")=="json": + validate_manifest(value,identity) + cases=index["Cases"];validate_registry(cases,mode);check(len(cases)==(25 if mode=="full" else 2), "registry cardinality differs") + check(len({row["Case"]["ID"] for row in cases})==len(cases), "duplicate case ID") + totals={"database_runs":0,"pipeline_runs":0,"recovery_runs":0,"limited_cases":0} + for row in cases: + c=row["Case"];check(row["Status"] in ("complete","limited"), "case is not complete") + current=read_artifact(root,row["Artifact"],secrets) + check(current["Identity"]==identity and current["Case"]==c and current["Status"]==row["Status"], "capture identity/control differs") + for history in row["History"]: + read_artifact(root,history["Artifact"],secrets) + report=current["Report"];check(stripped(report,c["Kind"])==row["Summary"], "summary differs from raw capture") + runs=report.get("runs",report.get("Runs",[]));repetitions={r.get("repetition",r.get("Repetition")) for r in runs} + check(repetitions=={1,2,3}, "repetition set differs") + if row["Status"]=="limited": totals["limited_cases"]+=1 + if c["Kind"]=="database": + check(len(runs)==9 and {(r["method"],r["repetition"]) for r in runs}=={(m,r) for m in ("insert","batch-insert","copy-merge") for r in (1,2,3)}, "database method/repetition missing") + unique=c["Count"]-int(c["Count"]*c["DuplicateFraction"]) + for run in runs: + check(run["correct"] and run["submitted"]==c["Count"] and run["inserted"]==unique and run["duplicates"]==c["Count"]-unique, "database counts differ") + size=1 if run["method"]=="insert" else c["BatchSize"] + check(len(run["batch_ns"])==math.ceil(c["Count"]/size) and 0=4, "recovery control failed");totals["recovery_runs"]+=1 + else: + sets=populations(group);check(run["Correct"] and set(sets["accepted"])==set(sets["stored"]) and len(sets["stored"])==100, "outbox sets differ") + check(run["FirstAttemptNS"]>=5e9 and run["FirstAttemptStatus"] in ("http_503","delivery_uncertain"), "outbox timeout was not established") + check(len(sets["ambiguous"])==100 and len(run["Faults"])>=4, "outbox uncertainty/control missing");totals["recovery_runs"]+=1 + return totals + +if __name__=="__main__": + parser=argparse.ArgumentParser();parser.add_argument("directory");parser.add_argument("--allow-smoke",action="store_true");args=parser.parse_args() + try: + print(json.dumps(audit(args.directory,args.allow_smoke),sort_keys=True)) + except (AuditError,KeyError,ValueError,OSError) as error: + parser.exit(1,"audit failed: "+str(error)+"\n") diff --git a/benchmarks/plot_results.py b/benchmarks/plot_results.py index ac9ecbf..39e92bc 100644 --- a/benchmarks/plot_results.py +++ b/benchmarks/plot_results.py @@ -1,29 +1,433 @@ -"""Optional figure generator: Python + matplotlib; no service dependency.""" +"""Generate reproducible study figures; Python + matplotlib are developer tools.""" + +import argparse import json from pathlib import Path +import statistics +import textwrap import matplotlib -matplotlib.use('Agg') + +matplotlib.use("Agg") +matplotlib.rcParams.update( + { + "svg.hashsalt": "ingestkit-study-v1", + "svg.fonttype": "path", + "font.family": "DejaVu Sans", + "font.size": 13, + "axes.titlesize": 14, + "axes.labelsize": 12, + "xtick.labelsize": 11, + "ytick.labelsize": 11, + "text.color": "#18323c", + "axes.labelcolor": "#18323c", + "axes.edgecolor": "#73818b", + "xtick.color": "#18323c", + "ytick.color": "#18323c", + } +) import matplotlib.pyplot as plt -root = Path(__file__).resolve().parent -results = root / 'results/local-2026-11-03' -fig, axes = plt.subplots(1, 2, figsize=(11.5, 4.4), layout='constrained') -fig.patch.set_facecolor('#faf9f6') -for ax in axes: - ax.set_facecolor('#faf9f6') - ax.spines[['top', 'right']].set_visible(False) - ax.grid(axis='y', alpha=.18) -runs = json.loads((results / 'db-unique/database.json').read_text())['runs'] -for i, method in enumerate(['insert', 'batch-insert', 'copy-merge']): - values = [v['elapsed_ns'] / 1e9 for v in runs if v['method'] == method] - axes[0].scatter([i - .06, i, i + .06], values, s=42, color='#205f72', zorder=3) -axes[0].set(xticks=range(3), xticklabels=['Single INSERT', 'Batch INSERT', 'COPY + merge'], yscale='log', ylabel='Seconds to submit 10,000 events (log scale)', title='Small batches: COPY/staging did not win') -for i, pattern in enumerate(['steady', 'burst']): - runs = json.loads((results / pattern / 'pipeline.json').read_text())['runs'] - for j, v in enumerate(runs): - axes[1].scatter(i + (j - 1) * .09, v['receipt_to_observed_storage_upper_bound']['p95_ns'] / 1e6, s=50, color='#ac4d36', zorder=3) - axes[1].annotate(str(j + 1), (i + (j - 1) * .09, v['receipt_to_observed_storage_upper_bound']['p95_ns'] / 1e6), xytext=(5, 4), textcoords='offset points', fontsize=9) -axes[1].set(xticks=[0, 1], xticklabels=['Steady: 1,000/s', 'Burst: 4,000/s active'], xlim=(-.5, 1.5), ylim=(0, 310), ylabel='Receipt to visible committed row, p95 (ms)', title='All three repetitions matter') -fig.suptitle('Local evidence · 256-byte payload · batch 100 · shared M1 Max / OrbStack', fontsize=12) -fig.supxlabel('Each dot is one measured repetition. Storage visibility includes 50 ms polling and query time.', fontsize=9) -fig.savefig(root.parent / 'docs/assets/experiments.svg', metadata={'Date': None, 'Creator': 'IngestKit benchmark figure'}) -fig.savefig('/private/tmp/ingestkit-experiments.png', dpi=140) +from matplotlib.lines import Line2D +from audit_study import audit, read_artifact + +FS = 1.0 +PAPER = "#faf9f6" +COLORS = ["#73818b", "#205f72", "#ac4d36"] +METHODS = ["insert", "batch-insert", "copy-merge"] +LABELS = ["One INSERT", "Batch INSERT", "COPY + merge"] + + +def canvas(rows, height): + fig, axes = plt.subplots(rows, 1, figsize=(6.5, height * FS), layout="constrained") + fig.patch.set_facecolor(PAPER) + if rows == 1: + axes = [axes] + for ax in axes: + ax.set_facecolor(PAPER) + ax.spines[["top", "right"]].set_visible(False) + ax.grid(alpha=0.18, zorder=0) + return fig, axes + + +def caption(fig, text, fontsize): + if FS > 1: + text = "\n".join(textwrap.fill(line, width=57) for line in text.splitlines()) + fig.supxlabel(text, fontsize=fontsize) + + +def save(fig, name, args, description): + target = args.output / (name + args.variant + ".svg") + fig.savefig( + target, + metadata={ + "Date": None, + "Creator": "IngestKit study figure generator", + "Description": description, + }, + ) + target.write_text( + "\n".join(line.rstrip() for line in target.read_text().splitlines()) + "\n" + ) + if args.preview_dir: + fig.savefig(args.preview_dir / (name + args.variant + ".png"), dpi=140) + plt.close(fig) + + +def database(index, rows, args, stamp): + fig, axes = canvas(3, 12.5) + panels = [ + ( + "BatchSize", + [1, 10, 50, 100, 500, 1000], + [rows["db-batch-" + str(b)] for b in (1, 10, 50, 100, 500, 1000)], + "Batch size · 256 B, no duplicates", + "Events per transaction", + ), + ( + "PayloadBytes", + [256, 1024, 16384], + [rows["db-batch-100"], rows["db-payload-1024"], rows["db-payload-16384"]], + "Payload size · batch 100, no duplicates", + "Encoded JSON payload bytes", + ), + ( + "DuplicateFraction", + [0, 0.1, 0.5, 0.9], + [ + rows["db-batch-100"], + rows["db-duplicates-10"], + rows["db-duplicates-50"], + rows["db-duplicates-90"], + ], + "Repeated IDs · batch 100, 256 B", + "Duplicate submissions (%)", + ), + ] + for ax, (field, xs, selected, title, xlabel) in zip(axes, panels): + for mi, method in enumerate(METHODS): + for x, row in zip(xs, selected): + values = [ + r["submitted"] * 1e9 / r["elapsed_ns"] + for r in row["Summary"]["runs"] + if r["method"] == method + ] + median = statistics.median(values) + ax.errorbar( + [x], + [median], + yerr=[[median - min(values)], [max(values) - median]], + color=COLORS[mi], + capsize=3, + fmt="_", + markersize=11, + zorder=3, + ) + offsets = [ + ( + x * (1 + v * 0.035) + if field != "DuplicateFraction" + else x + v * 0.012 + ) + for v in (-1, 0, 1) + ] + ax.scatter( + offsets, + values, + s=22, + color=COLORS[mi], + marker=["o", "s", "^"][mi], + alpha=0.8, + zorder=4, + ) + if field != "DuplicateFraction": + ax.set_xscale("log") + ax.set_yscale("log") + ax.set_xticks( + xs, + [ + str(round(x * 100)) if field == "DuplicateFraction" else str(x) + for x in xs + ], + ) + ax.minorticks_off() + ax.set(title=title, xlabel=xlabel, ylabel="Submitted events/s (log)") + axes[0].legend( + [ + Line2D([], [], marker=m, color=c, linestyle="") + for m, c in zip(["o", "s", "^"], COLORS) + ], + LABELS, + ncol=(1 if FS > 1 else 3), + fontsize=int(10 * FS), + loc="upper left", + ) + fig.suptitle( + "Batch INSERT won these workloads", fontsize=int(17 * FS), weight="bold" + ) + caption( + fig, + "5,000 submissions/method · 3 measured repetitions\nDots = repetitions; bars = min–max, center = median.\nDuplicate cases insert 5,000 / 4,500 / 2,500 / 500 unique IDs.\n" + + stamp + + "\nSame indexed table, durable commits, shared local host.", + fontsize=int(10 * FS), + ) + save( + fig, + "database-batching", + args, + "All 11 database configurations and 99 method/repetition rows. Submitted rate is not unique insertion rate in duplicate cases. " + + stamp, + ) + + +def pipeline(index, rows, args, stamp): + selected = [r for r in index["Cases"] if r["Case"]["Kind"] == "pipeline"] + names = [ + "batch 1 · 1k/s", + "batch 10 · 1k/s", + "batch 100 · 1k/s", + "100/s · batch 100", + "5k/s · batch 100", + "10k/s · batch 100", + "1 KiB · batch 10", + "16 KiB · batch 10", + "burst · batch 100", + "8 clients · batch 1", + "64 clients · batch 1", + ] + fig, axes = canvas(2, 14) + for i, row in enumerate(selected): + c = row["Case"] + axes[0].scatter([c["Rate"]], [i], marker="|", s=170, color="#a1aab0", zorder=2) + for rep, run in enumerate(row["Summary"]["runs"]): + y = i + (rep - 1) * 0.2 + limited = run["outcome"] == "limited" + for x, color, marker in [ + (run["AttemptedInWindow"] * 1e9 / run["WindowNS"], "#73818b", "s"), + (run["AcceptedEPS"], "#205f72", "o"), + ]: + axes[0].scatter( + [x], + [y], + s=32, + marker=marker, + edgecolors=color, + facecolors=PAPER if limited else color, + zorder=3, + ) + for field, color, marker in [ + ("ack_latency", "#ac4d36", "s"), + ("receipt_to_observed_storage_upper_bound", "#205f72", "o"), + ]: + axes[1].scatter( + [run[field]["p95_ns"] / 1e6], + [y], + s=32, + marker=marker, + edgecolors=color, + facecolors=PAPER if limited else color, + zorder=3, + ) + for ax in axes: + ax.set_yticks(range(len(names)), names) + ax.invert_yaxis() + ax.set_xscale("log") + ax.grid(axis="x", alpha=0.2) + ax.grid(axis="y", visible=False) + axes[0].set( + xlabel=( + "Events/s in 10-second window\n(log scale)" + if FS > 1 + else "Events/s inside the 10-second window (log)" + ) + ) + axes[1].set(xlabel="p95 latency · milliseconds (log)") + axes[0].legend( + [ + Line2D([], [], marker=m, color=c, linestyle="") + for m, c in [("|", "#a1aab0"), ("s", "#73818b"), ("o", "#205f72")] + ], + ["Target", "Attempted", "ACK"], + title="Offered / attempted / ACK", + title_fontsize=int(12 * FS), + ncol=(2 if FS > 1 else 3), + fontsize=int(10 * FS), + loc="lower left", + bbox_to_anchor=(0, 1.01), + borderaxespad=0, + ) + axes[1].set_xlim(10, 500) + axes[1].set_xticks( + [10, 20, 50, 100, 200, 500], ["10", "20", "50", "100", "200", "500"] + ) + axes[1].minorticks_off() + axes[1].legend( + [ + Line2D([], [], marker=m, color=c, linestyle="") + for m, c in [("s", "#ac4d36"), ("o", "#205f72")] + ], + ["ACK/request", "SQL/event upper bound"], + title="p95 latency populations", + title_fontsize=int(12 * FS), + ncol=(1 if FS > 1 else 2), + fontsize=int(10 * FS), + loc="lower left", + bbox_to_anchor=(0, 1.01), + borderaxespad=0, + ) + fig.suptitle( + "Offered load is not achieved capacity", fontsize=int(17 * FS), weight="bold" + ) + caption( + fig, + "3 repetitions/case · hollow markers = reported limits\nAll 11 configurations; every outcome retained.\nACK: successful requests. SQL: first observed committed events;\n50 ms polling + query delay, shared deployment clock.\n" + + stamp + + "\nPrivate-CA HTTPS; generator/observer share the host.", + fontsize=int(10 * FS), + ) + save( + fig, + "pipeline-load", + args, + "All 11 pipeline configurations and 33 measured windows. Hollow markers preserve late schedule, observer, rejection, ambiguity and tail limits. SQL latency is an observation upper bound, not physical commit time. " + + stamp, + ) + + +def recovery(index, rows, args, stamp): + fig, axes = canvas(3, 12.7) + names = ["recovery-database", "recovery-consumer", "recovery-outbox"] + for ax, name, title in zip( + axes, + names, + [ + "PostgreSQL outage", + "Consumer kill and restart", + "Broker outage + durable application outbox", + ], + ): + row = rows[name] + capture = read_artifact(args.study, row["Artifact"]) + for run in capture["Report"]["Runs"]: + rep = run["Repetition"] + color = COLORS[rep - 1] + if run.get("Pipeline"): + points = run["Pipeline"]["backlog"] + xs = [p["elapsed_ns"] / 1e9 for p in points] + ys = [ + ( + p["PendingAcknowledged"] + if p["ObservationAvailable"] + else float("nan") + ) + for p in points + ] + else: + xs = [p["ElapsedNS"] / 1e9 for p in run["Outbox"]] + ys = [p["Pending"] for p in run["Outbox"]] + if run.get("Pipeline"): + ax.plot( + xs, + ys, + color=color, + label="rep " + str(rep), + linewidth=1.4, + alpha=0.9, + marker=".", + markersize=2, + linestyle=["-", "--", ":"][rep - 1], + ) + else: + ax.scatter(xs, ys, color=color, label="rep " + str(rep), s=24) + faults = {f["Action"]: f["ElapsedNS"] / 1e9 for f in run["Faults"]} + for action, style in [("stopped", ":"), ("started", "--")]: + ax.axvline( + faults[action], + color=color, + linestyle=style, + linewidth=0.9, + alpha=0.6, + ) + ax.set( + title=title, + xlabel="Seconds from measured workload start", + ylabel=( + "Pending acknowledged events" + if name != "recovery-outbox" + else "Pending application outbox rows" + ), + ylim=(-10, None), + ) + axes[0].set_title("") + axes[0].legend( + title="PostgreSQL outage", + title_fontsize=int(14 * FS), + fontsize=int(10 * FS), + ncol=3, + loc="lower left", + bbox_to_anchor=(0, 1.01), + borderaxespad=0, + ) + fig.suptitle( + "Recovery is a separate experiment", fontsize=int(17 * FS), weight="bold" + ) + caption( + fig, + "All 3 repetitions per failure · dots are observations\nDotted line: stop/kill command completed; dashed: start completed.\nSQL gaps are blank; lines join observations, not exact commits.\nOutbox retains 100 stable IDs across the >5 s failed attempt.\n" + + stamp + + "\nFinal independent ID/content reconciliation is mandatory.", + fontsize=int(10 * FS), + ) + save( + fig, + "recovery", + args, + "Three availability experiments with three repetitions, actual Docker control completion times and explicit SQL observation gaps. Pending acknowledgement observations are not exact physical-commit backlogs. " + + stamp, + ) + + +def main(): + global FS + root = Path(__file__).resolve().parent.parent + parser = argparse.ArgumentParser(description=__doc__) + parser.add_argument( + "--study", type=Path, default=root / "benchmarks/results/selfhost-2026-11-04" + ) + parser.add_argument("--output", type=Path, default=root / "docs/assets") + parser.add_argument("--preview-dir", type=Path) + args = parser.parse_args() + audit(args.study) + index = json.loads((args.study / "index.json").read_text()) + rows = {r["Case"]["ID"]: r for r in index["Cases"]} + args.output.mkdir(parents=True, exist_ok=True) + if args.preview_dir: + args.preview_dir.mkdir(parents=True, exist_ok=True) + stamp = ( + "Source " + + index["Identity"]["SourceSHA"][:7] + + " · study " + + args.study.name + + " · seed " + + str(index["Identity"]["Seed"]) + ) + base = matplotlib.rcParams.copy() + for FS, args.variant in [(1.0, ""), (1.35, "-mobile")]: + for key in ( + "font.size", + "axes.titlesize", + "axes.labelsize", + "xtick.labelsize", + "ytick.labelsize", + ): + matplotlib.rcParams[key] = float(base[key]) * FS + database(index, rows, args, stamp) + pipeline(index, rows, args, stamp) + recovery(index, rows, args, stamp) + print( + "Generated desktop/mobile database, pipeline and recovery figures from audited study " + + str(args.study) + ) + + +if __name__ == "__main__": + main() diff --git a/benchmarks/results/local-2026-11-03/README.md b/benchmarks/results/local-2026-11-03/README.md index c7bfc3b..8f2549b 100644 --- a/benchmarks/results/local-2026-11-03/README.md +++ b/benchmarks/results/local-2026-11-03/README.md @@ -1,5 +1,15 @@ # Local experiments — 3 November 2026 +**Correction discovered during the self-hosting audit:** these pipeline samples +used Redpanda's dev-container mode, which started the pinned v26.2.6 broker with +`--unsafe-bypass-fsync=true`. Turning off topic write caching did not remove this +process-level flag ([startup mode reference](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-redpanda/rpk-redpanda-start/)). The raw captures are preserved, but their pipeline timings +must be read as development-mode measurements. They do not establish broker- +fsync-enabled throughput or deployment sizing. The current configuration is +corrected and replacement measurements are pending. The PostgreSQL-only write +comparison retains its recorded PostgreSQL fsync/synchronous_commit settings. + + Measured source: [deefc8162504fa482c19c63edda05c1c1a4c2ae7](https://github.com/feat7/ingestkit/tree/deefc8162504fa482c19c63edda05c1c1a4c2ae7). All four manifests record clean source at this revision. Subsequent validation/lifecycle fixes are regression-tested but these timing captures have not been rerun on those later revisions. This branch must be pushed before that GitHub revision link resolves; the commit is available locally now. Apple M1 Max, 10 logical CPUs, 64 GiB physical memory; OrbStack Docker VM with 10 CPUs and about 15.7 GiB reported memory. Go generator 1.26.5; container builds 1.26.10. PostgreSQL 18.6, Redpanda 26.2.6, one broker/replica, event topic three partitions, one consumer. PostgreSQL fsync/synchronous_commit/full_page_writes were on; topic write.caching was false, retention seven days. Exact versions, image hashes, indexes and topic settings are in each manifest. Host, generator, observer and services share resources. The manifest's generic caveat says “Docker Desktop”; its actual runtime fields identify OrbStack. The numbers below describe this local VM. diff --git a/benchmarks/results/selfhost-2026-11-04/README.md b/benchmarks/results/selfhost-2026-11-04/README.md new file mode 100644 index 0000000..6e9e0aa --- /dev/null +++ b/benchmarks/results/selfhost-2026-11-04/README.md @@ -0,0 +1,85 @@ +# Corrected self-hosted ingestion study + +Measured 4 November 2026 from clean source `213e4cc50523882f0d0cf7533d064494387d3207`. The deployed consumer uses atomic **batch INSERT**. The explicit COPY/staging/merge reference remains independently implemented in the database comparison. The [complete earlier COPY-writer study](../selfhost-copy-2026-11-04/README.md) motivated that change; its bytes and limits are retained. + +## What this capture establishes + +All 25 registered configurations completed with three measured repetitions: 99 database method/repetition rows, 33 HTTPS load windows and 9 recovery repetitions. Nine configurations contain reported limits. Every broker-acknowledged ID reconciled with independently verified stored content; no accepted missing IDs, unexpected IDs or duplicate physical rows were found. Ambiguous HTTP outcomes are a separate population and are **not** counted as successful delivery. + +The independent [auditor](../../audit_study.py) verified registry controls, method/repetition counts, immutable artifact hashes and bounds, raw timing populations, nearest-rank p50/p95/p99, actual request/ACK windows, ID sets, rates, summaries, broker/topic/PostgreSQL durability and the trusted HTTPS route. An exact scan against this owned run’s generated credentials passed. + +## Database comparison + +5,000 submissions per method/repetition, rotated method order, varied deterministic JSON payloads. Generation, warm-up, reset and exact verification are outside elapsed time. Single INSERT commits each row; batch INSERT and COPY/stage/merge commit each batch against the same indexed table and first-content conflict policy. Values below are **median seconds [min–max] across all three repetitions**. + +| Case | Single INSERT | Batch INSERT | COPY + merge | +| --- | ---: | ---: | ---: | +| db-batch-1 | 5.023 [4.936–7.941] | 5.088 [4.576–5.245] | 21.302 [21.177–22.681] | +| db-batch-10 | 4.522 [4.443–4.821] | 0.568 [0.524–1.255] | 2.144 [1.996–2.291] | +| db-batch-50 | 4.868 [4.694–10.170] | 0.193 [0.175–0.317] | 0.603 [0.546–0.639] | +| db-batch-100 | 6.510 [4.710–8.375] | 0.155 [0.121–0.247] | 0.486 [0.212–0.523] | +| db-batch-500 | 7.059 [6.646–7.221] | 0.085 [0.077–0.142] | 0.112 [0.111–0.118] | +| db-batch-1000 | 6.378 [6.155–9.558] | 0.081 [0.074–0.082] | 0.088 [0.075–0.108] | +| db-payload-1024 | 6.861 [5.654–10.520] | 0.195 [0.146–0.240] | 0.406 [0.274–0.416] | +| db-payload-16384 | 13.877 [7.016–14.818] | 1.006 [0.761–1.083] | 1.063 [1.062–1.115] | +| db-duplicates-10 | 5.675 [5.055–9.249] | 0.116 [0.115–0.212] | 0.302 [0.244–0.377] | +| db-duplicates-50 | 4.253 [3.998–4.346] | 0.096 [0.091–0.198] | 0.263 [0.253–0.509] | +| db-duplicates-90 | 1.394 [1.198–2.531] | 0.064 [0.056–0.080] | 0.229 [0.219–0.423] | + +Batch INSERT had the lower median than COPY/staging/merge in all eleven configurations in both studies. Individual repetitions overlap or reverse that ordering in some larger-batch/payload cases. This supports the simpler default here, not a universal COPY threshold. No adaptive cutoff, UNNEST comparison or typed-schema speed claim is inferred. Duplicate configurations insert fewer unique rows; submitted/s differs from unique inserted/s. + +## HTTPS pipeline + +Ten-second windows after two-second warm-up; 50 ms target SQL polling; bounded 30-second observation drain; private-CA HTTPS with certificate verification. Default controls: 1,000 offered events/s, batch100, 32 clients, 256B varied payload. Larger payloads use batch10, with the 256B/batch10 case as their matched control. Burst offers the same total in the first quarter of the window. + +Counts are per repetition in order1/2/3. ACK p95 is per successful HTTP request; SQL p95 is API receipt to first observed committed row per observed event, including polling/query delay. The two latency populations differ. + +| Case | Attempted | Broker acknowledged | Verified stored | ACK p95 ms | SQL p95 upper bound ms | +| --- | --- | --- | --- | --- | --- | +| pipeline-batch-1 | 10000 / 9949 / 9377 | 10000 / 9949 / 9377 | 10000 / 9949 / 9377 | 17.38 / 20.53 / 31.92 | 75.82 / 91.93 / 239.38 | +| pipeline-batch-10 | 10000 / 10000 / 10000 | 10000 / 10000 / 10000 | 10000 / 10000 / 10000 | 21.65 / 21.97 / 118.65 | 97.96 / 104.65 / 302.32 | +| pipeline-batch-100 | 10000 / 10000 / 10000 | 10000 / 10000 / 10000 | 10000 / 10000 / 10000 | 40.19 / 41.28 / 42.92 | 101.61 / 103.08 / 102.86 | +| pipeline-rate-100 | 1000 / 1000 / 1000 | 1000 / 1000 / 1000 | 1000 / 1000 / 1000 | 57.13 / 53.51 / 64.47 | 97.18 / 92.49 / 95.83 | +| pipeline-rate-5000 | 50000 / 50000 / 50000 | 50000 / 50000 / 50000 | 50000 / 50000 / 50000 | 27.90 / 27.97 / 32.61 | 97.65 / 99.18 / 177.82 | +| pipeline-rate-10000 | 100000 / 100000 / 100000 | 100000 / 99000 / 100000 | 100000 / 99000 / 100000 | 30.60 / 30.25 / 27.58 | 156.22 / 173.50 / 134.91 | +| pipeline-payload-1024 | 10000 / 10000 / 10000 | 10000 / 10000 / 10000 | 10000 / 10000 / 10000 | 33.32 / 74.40 / 25.10 | 130.13 / 255.11 / 129.98 | +| pipeline-payload-16384 | 10000 / 10000 / 10000 | 10000 / 9840 / 10000 | 10000 / 9840 / 10000 | 49.53 / 60.63 / 42.91 | 251.74 / 270.53 / 179.64 | +| pipeline-burst | 10000 / 10000 / 10000 | 10000 / 10000 / 10000 | 10000 / 10000 / 10000 | 28.23 / 29.19 / 28.97 | 78.95 / 81.47 / 80.47 | +| pipeline-concurrency-8 | 4680 / 4644 / 4492 | 4680 / 4644 / 4492 | 4680 / 4644 / 4492 | 20.81 / 20.87 / 22.24 | 72.65 / 71.46 / 90.68 | +| pipeline-concurrency-64 | 10000 / 10000 / 9938 | 10000 / 10000 / 9938 | 10000 / 10000 / 9938 | 19.58 / 21.20 / 37.42 | 86.18 / 109.43 / 225.58 | + +The batch100 baseline, 100/s case and first-quarter burst completed without reported limits. Other cases retain generator misses, late schedules, request/ACK tails, observer delays or ambiguous delivery. A finite-window tail is not by itself evidence of saturation. Lower attempted counts mean the driver did not generate the target; they do not mean the collector lost those unattempted events. + +At 10,000 offered events/s, repetition2 retained 1,000 ambiguous IDs absent at its final deadline. The 16KiB case’s repetition2 retained 160 such IDs. Absence at that deadline means delivery remains unknown, not proved never delivered. Reuse those IDs on retry. No ambiguous ID is converted into an acknowledgement or a fabricated latency sample. + +In-window ACK rate divides only acknowledgements completed inside the target window by that window. Stored rate divides independently verified rows by the full window, request tail, observation drain and final independent verification. A final census can find a row without yielding a pending-observer latency sample; `ObservedEvents` and `VerificationNS` expose the distinction. Inspect all rate denominators and limit reasons in [index.json](index.json). No maximum capacity or cloud-cost claim follows. + +## Availability experiments + +Each row below represents three repetitions, separate from throughput claims. Actual fault request/completion timestamps are retained in raw captures. + +| Experiment | Controls | Verified outcome | +| --- | --- | --- | +| PostgreSQL | Stop requested at3s; start requested at8s during15s at offered500 events/s | Every accepted ID/content reconciled after recovery; SQL-observer outage/gap remains explicit | +| Consumer | KILL requested at3s; restart requested at5s during the same workload | Every accepted ID/content reconciled after group recovery; actual Docker timings retained | +| Outbox + broker | 100 persisted application events; broker stopped for8s after stop completion; failed attempt exceeds5s | Pending IDs survived a new dispatcher; replay yielded100 accepted/stored unique IDs each repetition | + +These availability results do not prove an arbitrary kill landed inside the SQL-commit/offset window. The separate deterministic process-kill regression pauses exactly there, verifies an uncommitted offset, and replays to one stored row. SQL gaps cannot reveal precise commit times. Docker stop/start completion is a control observation, not an exact service-availability clock. + +## Environment and reproducibility + +[manifest-1.json](manifest-1.json) records actual versions/image IDs/digests, running broker process controls, source/host/VM metadata, topic configuration, database durability/indexes and trusted TLS protocol. Broker1core/1GiB, one replica, seven-day log retention; process fsync bypass false and topic write caching false. PostgreSQL18.6 fsync, synchronous commit and full-page writes on. API limit10,000 requests/s, info logging. Local TLS trust was verified; public ACME issuance was not tested. + +The M1 Max physical host had10 logical CPUs/68,719,476,736 bytes RAM; OrbStack’s Linux Docker VM exposed10 CPUs/16,818,991,104 bytes RAM. The generator and SQL observer ran on that same physical host alongside existing workloads. Only owned containers were controlled. Resource snapshots are coarse observations, not a calibrated bottleneck or isolated-disk benchmark. One broker/host does not protect against host/disk loss or retention expiry. + +Run from the repository root: + +~~~sh +python3 benchmarks/audit_study.py benchmarks/results/selfhost-2026-11-04 +# New timing run: commit source and choose a fresh output directory. +make bench-study STUDY_FLAGS='-out benchmarks/results/my-study -seed 42' +~~~ + +See the [study guide](../../README.md) for controls, prerequisites, resume and artifact bounds. The current source can audit these immutable captures; reproducing the exact measured implementation requires the recorded source revision. Changes to docs/evidence after that revision do not retroactively remeasure it. + +[index.json](index.json) contains readable controls, summaries, statuses and SHA256 references; [summary.csv](summary.csv) lists every case. [journal.json](journal.json) retains progress/attempts. Raw gzip files under `raw/` have zero timestamps and include all repetitions, request/event timing samples, backlog observations and compact ID populations. Metadata and coarse resources are independently checksummed. Private keys/config/CA/logs remain in the ignored owned run directory. No failed/limited case was discarded. diff --git a/benchmarks/results/selfhost-2026-11-04/index.json b/benchmarks/results/selfhost-2026-11-04/index.json new file mode 100644 index 0000000..e5b76ae --- /dev/null +++ b/benchmarks/results/selfhost-2026-11-04/index.json @@ -0,0 +1,5595 @@ +{ + "MetadataArtifacts": [ + { + "Codec": "json", + "Path": "manifest-1.json", + "SHA256": "0ce0a588fea23e93241c9429f410ffcbc480fb652a7306df4acc61102d9da566", + "Size": 14173, + "RawBytes": 14173 + } + ], + "Schema": 1, + "Status": "complete", + "Identity": { + "SourceSHA": "213e4cc50523882f0d0cf7533d064494387d3207", + "SourceFingerprint": "26d4ffc91f5fe2d520fc9c1db07a7a75a480539a898dd4b16fe2b6917aabe1ec", + "ControlsFingerprint": "48c89aca641858936a3ae61db38c6683c1e3ec590b3c447c2548cbf4c2f9e318", + "ImagesFingerprint": "5c671c388095ad2d8824c81b887f50aba9e3ec46670be9e2b49a2b062dcbb501", + "ConfigFingerprint": "adb4f8dbf754b2e2b5e2de4d6ee3b92af55c55d2f7ea0e90bf218c045898b242", + "Mode": "full", + "Seed": 42, + "SourceDirty": false + }, + "RunNamespace": "a966020c-1625-4bea-a08d-b0a83bf05c46", + "ManifestFiles": [ + "manifest-1.json" + ], + "Resources": [ + { + "Codec": "gzip", + "Path": "resources-1.json.gz", + "SHA256": "094e95ac94ff6a4f18ace2a09b1aa42220b8dfb46f5514bfaf94e7f3bdb46cdf", + "Size": 24659, + "RawBytes": 483396 + } + ], + "Cases": [ + { + "Case": { + "ID": "db-batch-1", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 1, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1-attempt-1.json.gz", + "SHA256": "1a159a2e21dfb85d2b5476daca25f8e87dfccb2c3478723259775b2019a1925d", + "Size": 130640, + "RawBytes": 342505 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1-attempt-1.json.gz", + "SHA256": "1a159a2e21dfb85d2b5476daca25f8e87dfccb2c3478723259775b2019a1925d", + "Size": 130640, + "RawBytes": 342505 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-1", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 1, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4936232209, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5088313167, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 22681047542, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5244822500, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 21302178625, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5023027958, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 21177280083, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7941054541, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4576318042, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-10", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 10, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-10-attempt-1.json.gz", + "SHA256": "bd8068803db7fb0e71695a718e9c2ff8ce432d02540221a06b065527bcf8d81e", + "Size": 51034, + "RawBytes": 133973 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-10-attempt-1.json.gz", + "SHA256": "bd8068803db7fb0e71695a718e9c2ff8ce432d02540221a06b065527bcf8d81e", + "Size": 51034, + "RawBytes": 133973 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-10", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 10, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4443227291, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 524023917, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2144229708, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1255224750, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2290702792, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4821445500, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1996117417, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4522498250, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 568435667, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-50", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 50, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-50-attempt-1.json.gz", + "SHA256": "86689028eb111d5e70f5b8f7a1657e16726771f4ddf5e77bc53ade69e117a971", + "Size": 44574, + "RawBytes": 117137 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-50-attempt-1.json.gz", + "SHA256": "86689028eb111d5e70f5b8f7a1657e16726771f4ddf5e77bc53ade69e117a971", + "Size": 44574, + "RawBytes": 117137 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-50", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 50, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 10169916917, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 174899083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 545585208, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 317074083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 602685917, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4694109542, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 638922833, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4868339083, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 192964500, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-100", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-100-attempt-1.json.gz", + "SHA256": "83ecd2e92f6155facef9dbf40f66bfe6e5fe77e60156027a737edc0d16c1d8d8", + "Size": 44716, + "RawBytes": 117834 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-100-attempt-1.json.gz", + "SHA256": "83ecd2e92f6155facef9dbf40f66bfe6e5fe77e60156027a737edc0d16c1d8d8", + "Size": 44716, + "RawBytes": 117834 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-100", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6510272708, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 120934000, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 211848834, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 247175000, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 486334584, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 8374506834, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 522940667, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4710444833, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 155274042, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-500", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 500, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-500-attempt-1.json.gz", + "SHA256": "4f6dc35c8fa1126bd82efe3cf18189e73ce5b1741887b2f8507898a05d9f12a5", + "Size": 42872, + "RawBytes": 123095 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-500-attempt-1.json.gz", + "SHA256": "4f6dc35c8fa1126bd82efe3cf18189e73ce5b1741887b2f8507898a05d9f12a5", + "Size": 42872, + "RawBytes": 123095 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-500", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 500, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7059296375, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 85045834, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 112395709, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 142081125, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 118002958, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7221146083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 110777166, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6646475791, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 76509000, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-1000", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 1000, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1000-attempt-1.json.gz", + "SHA256": "496e7c8809070bfcf89a108217dccd056fdd14a251665b84c18b604401f214a4", + "Size": 43467, + "RawBytes": 119279 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1000-attempt-1.json.gz", + "SHA256": "496e7c8809070bfcf89a108217dccd056fdd14a251665b84c18b604401f214a4", + "Size": 43467, + "RawBytes": 119279 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-1000", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 1000, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 9558477708, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 73813334, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 88251084, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 82479000, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 108001709, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6154787416, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 75268542, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6377761750, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 81253083, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-payload-1024", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 1024, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-1024-attempt-1.json.gz", + "SHA256": "7d506cdd0fa9213ec046f580abfcddd0cdc9e18a66c482b7aa7a6fa4dea71e04", + "Size": 45343, + "RawBytes": 122984 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-1024-attempt-1.json.gz", + "SHA256": "7d506cdd0fa9213ec046f580abfcddd0cdc9e18a66c482b7aa7a6fa4dea71e04", + "Size": 45343, + "RawBytes": 122984 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-payload-1024", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 1024, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6860924625, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 145515250, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 405773334, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 240222042, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 416228625, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 10519756083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 274197750, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5653551791, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 194738916, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-payload-16384", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 16384, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-16384-attempt-1.json.gz", + "SHA256": "97b12de3c2910c5597671dc829e2aaba7bdbfa0b82e726cb800ad21d372e8810", + "Size": 47666, + "RawBytes": 125082 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-16384-attempt-1.json.gz", + "SHA256": "97b12de3c2910c5597671dc829e2aaba7bdbfa0b82e726cb800ad21d372e8810", + "Size": 47666, + "RawBytes": 125082 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-payload-16384", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 16384, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7016298792, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1083158458, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1063217958, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1005818917, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1115342834, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 13876863708, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1062261500, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 14817980917, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 761372500, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-duplicates-10", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0.1, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-10-attempt-1.json.gz", + "SHA256": "80900cc48ab4fb6757c49d73a06e01fddb511612bfff3d43a1e86bcc4359f357", + "Size": 44909, + "RawBytes": 118441 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-10-attempt-1.json.gz", + "SHA256": "80900cc48ab4fb6757c49d73a06e01fddb511612bfff3d43a1e86bcc4359f357", + "Size": 44909, + "RawBytes": 118441 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-duplicates-10", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.1 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 9249286917, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 115587500, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 301739500, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 211658167, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 376863667, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 5055233334, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 243863375, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 5675436333, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 115246167, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-duplicates-50", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0.5, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-50-attempt-1.json.gz", + "SHA256": "51815d6a908ec42150b867790877a622a195a223add1f5fc9e9e70ecbdff6568", + "Size": 41674, + "RawBytes": 117291 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-50-attempt-1.json.gz", + "SHA256": "51815d6a908ec42150b867790877a622a195a223add1f5fc9e9e70ecbdff6568", + "Size": 41674, + "RawBytes": 117291 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-duplicates-50", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.5 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 4253137959, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 96496833, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 263432583, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 198379834, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 508744500, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 4346176875, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 253285250, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 3998107125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 90732875, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-duplicates-90", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0.9, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-90-attempt-1.json.gz", + "SHA256": "341c52cbb99d94e26e2d595a550793500a3c09da88100323ca2020b0f7c8547b", + "Size": 38722, + "RawBytes": 109991 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-90-attempt-1.json.gz", + "SHA256": "341c52cbb99d94e26e2d595a550793500a3c09da88100323ca2020b0f7c8547b", + "Size": 38722, + "RawBytes": 109991 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-duplicates-90", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.9 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1394084000, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 64458500, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 219283125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 79736375, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 422971917, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 2531024958, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 229405667, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1197924375, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 55914458, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "pipeline-batch-1", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 1, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-1-attempt-1.json.gz", + "SHA256": "72b437440efeee588f61d5e40c318231a73e5f6c50487623d7abd13a760a8936", + "Size": 800613, + "RawBytes": 4781703 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-1-attempt-1.json.gz", + "SHA256": "72b437440efeee588f61d5e40c318231a73e5f6c50487623d7abd13a760a8936", + "Size": 800613, + "RawBytes": 4781703 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-batch-1", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9988, + "AcceptedAfterWindow": 12, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 1353058211, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50443500, + "ObservedEvents": 10000, + "VerificationNS": 56480500, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 51, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10135613375, + "DrainNS": 135613375, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.8, + "PersistedEPS": 986.6201116812035, + "ack_latency": { + "p50_ns": 11422292, + "p95_ns": 17376708, + "p99_ns": 27288292 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 48090000, + "p95_ns": 75820000, + "p99_ns": 89387000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "068881b3244320162bbd7285e7726e2758d2e97d28ed45de9fad6ded47f2210a", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "068881b3244320162bbd7285e7726e2758d2e97d28ed45de9fad6ded47f2210a", + "stored": "068881b3244320162bbd7285e7726e2758d2e97d28ed45de9fad6ded47f2210a" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 9930, + "AttemptedAfterWindow": 19, + "AcceptedInWindow": 9898, + "AcceptedAfterWindow": 51, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 1591715706, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 76064292, + "ObservedEvents": 9949, + "VerificationNS": 54758208, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 9949, + "Accepted": 9949, + "Persisted": 9949, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 51, + "LateSchedules": 28, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 89, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10130414083, + "DrainNS": 130414083, + "PollIntervalNS": 50000000, + "AcceptedEPS": 989.8, + "PersistedEPS": 982.0921354730767, + "ack_latency": { + "p50_ns": 12156666, + "p95_ns": 20527250, + "p99_ns": 40400250 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 52853000, + "p95_ns": 91933000, + "p99_ns": 125752000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "4f791ba34bbcd7950eaba4f09001e6b58da7604f8135313b6ac28396330432cb", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "4f791ba34bbcd7950eaba4f09001e6b58da7604f8135313b6ac28396330432cb", + "stored": "4f791ba34bbcd7950eaba4f09001e6b58da7604f8135313b6ac28396330432cb" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 9377, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9363, + "AcceptedAfterWindow": 14, + "ObserverPolls": 202, + "ObserverQueries": 795, + "ObserverQueryNS": 1526429698, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 57182667, + "ObservedEvents": 9377, + "VerificationNS": 56129667, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 9377, + "Accepted": 9377, + "Persisted": 9377, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 623, + "LateSchedules": 47, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 58, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10138148125, + "DrainNS": 138148125, + "PollIntervalNS": 50000000, + "AcceptedEPS": 936.3, + "PersistedEPS": 924.922370869384, + "ack_latency": { + "p50_ns": 15669500, + "p95_ns": 31922709, + "p99_ns": 181402750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 73935000, + "p95_ns": 239382000, + "p99_ns": 431058000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "7246b15cf5acb6e76ee0494d9e3e1ab6eda310d8fa9020802b4d0b8f1e7b7ed9", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "7246b15cf5acb6e76ee0494d9e3e1ab6eda310d8fa9020802b4d0b8f1e7b7ed9", + "stored": "7246b15cf5acb6e76ee0494d9e3e1ab6eda310d8fa9020802b4d0b8f1e7b7ed9" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-batch-10", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 10, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-10-attempt-1.json.gz", + "SHA256": "2351e2010fd1313b4a26568da7adf74c2d2983fa3c7837f326fa6662a8ecbbdb", + "Size": 282895, + "RawBytes": 1217646 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-10-attempt-1.json.gz", + "SHA256": "2351e2010fd1313b4a26568da7adf74c2d2983fa3c7837f326fa6662a8ecbbdb", + "Size": 282895, + "RawBytes": 1217646 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-batch-10", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 1294513032, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53925375, + "ObservedEvents": 10000, + "VerificationNS": 58723833, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 70, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10142246125, + "DrainNS": 142246125, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 985.9748892654683, + "ack_latency": { + "p50_ns": 15791250, + "p95_ns": 21651458, + "p99_ns": 25110708 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 62252000, + "p95_ns": 97962000, + "p99_ns": 109125000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "0a22636c0784c38b432c72ca780da2cdd10a0df71514e042e4dd37bb0717c437", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "0a22636c0784c38b432c72ca780da2cdd10a0df71514e042e4dd37bb0717c437", + "stored": "0a22636c0784c38b432c72ca780da2cdd10a0df71514e042e4dd37bb0717c437" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 1041027840, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 61022292, + "ObservedEvents": 10000, + "VerificationNS": 63639834, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 5, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 81, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10141243209, + "DrainNS": 141243209, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 986.0723970336643, + "ack_latency": { + "p50_ns": 16032750, + "p95_ns": 21965459, + "p99_ns": 27051083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 65718000, + "p95_ns": 104654000, + "p99_ns": 120674000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6b3b504b5b93ad411bbd90e6e8247e6303d0d27e06a5987d2d620776ded55493", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "6b3b504b5b93ad411bbd90e6e8247e6303d0d27e06a5987d2d620776ded55493", + "stored": "6b3b504b5b93ad411bbd90e6e8247e6303d0d27e06a5987d2d620776ded55493" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 202, + "ObserverQueries": 796, + "ObserverQueryNS": 1101211840, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 57782625, + "ObservedEvents": 10000, + "VerificationNS": 59425250, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 348, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10134065750, + "DrainNS": 134065750, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 986.7707834834208, + "ack_latency": { + "p50_ns": 17307584, + "p95_ns": 118647000, + "p99_ns": 263527125 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 91249000, + "p95_ns": 302325000, + "p99_ns": 452724000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "9d6f57401273ffd819dc8dd98a07933c6837d429197e3043c934fce438274cf0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "9d6f57401273ffd819dc8dd98a07933c6837d429197e3043c934fce438274cf0", + "stored": "9d6f57401273ffd819dc8dd98a07933c6837d429197e3043c934fce438274cf0" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-batch-100", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-100-attempt-1.json.gz", + "SHA256": "962fc7395246b47b002e154dc7b4897dac9fefebd3972a535e4fca49a5ecdfe8", + "Size": 195328, + "RawBytes": 843069 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-100-attempt-1.json.gz", + "SHA256": "962fc7395246b47b002e154dc7b4897dac9fefebd3972a535e4fca49a5ecdfe8", + "Size": 195328, + "RawBytes": 843069 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-batch-100", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 727, + "ObserverQueryNS": 1350840783, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53176583, + "ObservedEvents": 10000, + "VerificationNS": 56095042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10078764708, + "DrainNS": 78764708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 992.1850831642611, + "ack_latency": { + "p50_ns": 29262375, + "p95_ns": 40186750, + "p99_ns": 44646875 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50820000, + "p95_ns": 101614000, + "p99_ns": 107527000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "5f88823872d6d84b302c3f570c8d418c411b9f4294bad23251fd58b7248c1978", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "5f88823872d6d84b302c3f570c8d418c411b9f4294bad23251fd58b7248c1978", + "stored": "5f88823872d6d84b302c3f570c8d418c411b9f4294bad23251fd58b7248c1978" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 723, + "ObserverQueryNS": 1406365339, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 84688167, + "ObservedEvents": 10000, + "VerificationNS": 69563792, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10107531959, + "DrainNS": 107531959, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 989.3612051452134, + "ack_latency": { + "p50_ns": 27935834, + "p95_ns": 41276917, + "p99_ns": 45595041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50954000, + "p95_ns": 103084000, + "p99_ns": 106888000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "d3e309c3f1eb328a3fa8d75613a0c7a1a3ce2be50791096eee1405f58502a54e", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "d3e309c3f1eb328a3fa8d75613a0c7a1a3ce2be50791096eee1405f58502a54e", + "stored": "d3e309c3f1eb328a3fa8d75613a0c7a1a3ce2be50791096eee1405f58502a54e" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 733, + "ObserverQueryNS": 1440745671, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53057000, + "ObservedEvents": 10000, + "VerificationNS": 75260542, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10113643250, + "DrainNS": 113643250, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 988.7633716959514, + "ack_latency": { + "p50_ns": 30018333, + "p95_ns": 42919916, + "p99_ns": 53125875 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50969000, + "p95_ns": 102858000, + "p99_ns": 106166000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a679eb2678d174ff5b878e9ee6eb927c389d6b5a9654d1dc5ee76fd92633ed43", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a679eb2678d174ff5b878e9ee6eb927c389d6b5a9654d1dc5ee76fd92633ed43", + "stored": "a679eb2678d174ff5b878e9ee6eb927c389d6b5a9654d1dc5ee76fd92633ed43" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-rate-100", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 1000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 100, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-100-attempt-1.json.gz", + "SHA256": "d5b8a0a5b13c10871963126b4d6d045b5b984bae9061544e72b6621d61022d8b", + "Size": 15245, + "RawBytes": 154278 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-100-attempt-1.json.gz", + "SHA256": "d5b8a0a5b13c10871963126b4d6d045b5b984bae9061544e72b6621d61022d8b", + "Size": 15245, + "RawBytes": 154278 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-rate-100", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 100, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 616, + "ObserverQueryNS": 1412151791, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53716167, + "ObservedEvents": 1000, + "VerificationNS": 23246792, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10056681458, + "DrainNS": 56681458, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.43638009977029, + "ack_latency": { + "p50_ns": 29306250, + "p95_ns": 57133417, + "p99_ns": 57133417 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 49396000, + "p95_ns": 97180000, + "p99_ns": 97180000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a39baad91259e848cb4bcf925fb71d86dcf297f00fdfce8e3f40b78958dc0700", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a39baad91259e848cb4bcf925fb71d86dcf297f00fdfce8e3f40b78958dc0700", + "stored": "a39baad91259e848cb4bcf925fb71d86dcf297f00fdfce8e3f40b78958dc0700" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 614, + "ObserverQueryNS": 1096637540, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55205667, + "ObservedEvents": 1000, + "VerificationNS": 14449042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10030758458, + "DrainNS": 30758458, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.6933586016572, + "ack_latency": { + "p50_ns": 31437458, + "p95_ns": 53508542, + "p99_ns": 53508542 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 48196000, + "p95_ns": 92489000, + "p99_ns": 92489000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "40e129d1dee9fe95c8070c5f9f5901946d22c1bdd9d89c3882d2499a5c89e45f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "40e129d1dee9fe95c8070c5f9f5901946d22c1bdd9d89c3882d2499a5c89e45f", + "stored": "40e129d1dee9fe95c8070c5f9f5901946d22c1bdd9d89c3882d2499a5c89e45f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 614, + "ObserverQueryNS": 1208049800, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52978417, + "ObservedEvents": 1000, + "VerificationNS": 22623875, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10050236750, + "DrainNS": 50236750, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.5001436160198, + "ack_latency": { + "p50_ns": 45352333, + "p95_ns": 64470875, + "p99_ns": 64470875 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 87878000, + "p95_ns": 95835000, + "p99_ns": 95835000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "99c0f659f3346796cdd12c434ff746210999cb055a8f367ca98d294246850ad2", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "99c0f659f3346796cdd12c434ff746210999cb055a8f367ca98d294246850ad2", + "stored": "99c0f659f3346796cdd12c434ff746210999cb055a8f367ca98d294246850ad2" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-rate-5000", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 50000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 5000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-5000-attempt-1.json.gz", + "SHA256": "7c223db858877cc5ebf8451ff010cba41e7a1adc705573e8c47d622abc077f2d", + "Size": 1024403, + "RawBytes": 4275212 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-5000-attempt-1.json.gz", + "SHA256": "7c223db858877cc5ebf8451ff010cba41e7a1adc705573e8c47d622abc077f2d", + "Size": 1024403, + "RawBytes": 4275212 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-rate-5000", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 5000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 2498268169, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 60602000, + "ObservedEvents": 50000, + "VerificationNS": 269671041, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 340, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10409429541, + "DrainNS": 409429541, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4803.337186064152, + "ack_latency": { + "p50_ns": 22720083, + "p95_ns": 27901208, + "p99_ns": 31580083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 67294000, + "p95_ns": 97646000, + "p99_ns": 112613000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "13cf29fd427ee671f53289b43b26fb3d515e7000c841c808094d3f87b98f1b9b", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "13cf29fd427ee671f53289b43b26fb3d515e7000c841c808094d3f87b98f1b9b", + "stored": "13cf29fd427ee671f53289b43b26fb3d515e7000c841c808094d3f87b98f1b9b" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 2635250948, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 87139334, + "ObservedEvents": 50000, + "VerificationNS": 265332458, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 269, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10403389666, + "DrainNS": 403389666, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4806.125849866826, + "ack_latency": { + "p50_ns": 22725667, + "p95_ns": 27968333, + "p99_ns": 34950916 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 68517000, + "p95_ns": 99180000, + "p99_ns": 113109000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "13ca2e506f40cc1bea89768bd7e1c2a4918c102cf1256a8c2e15f4d0ea198cf0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "13ca2e506f40cc1bea89768bd7e1c2a4918c102cf1256a8c2e15f4d0ea198cf0", + "stored": "13ca2e506f40cc1bea89768bd7e1c2a4918c102cf1256a8c2e15f4d0ea198cf0" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 3031005509, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59013875, + "ObservedEvents": 50000, + "VerificationNS": 280892625, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 467, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10473994916, + "DrainNS": 473994916, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4773.727732445273, + "ack_latency": { + "p50_ns": 23884500, + "p95_ns": 32605250, + "p99_ns": 50233792 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 96633000, + "p95_ns": 177822000, + "p99_ns": 262485000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "517e0fd1ab738307f1396ee1635e36a2727f02155c9d2dd25f5a4bcfd912f6aa", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "517e0fd1ab738307f1396ee1635e36a2727f02155c9d2dd25f5a4bcfd912f6aa", + "stored": "517e0fd1ab738307f1396ee1635e36a2727f02155c9d2dd25f5a4bcfd912f6aa" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-rate-10000", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 100000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 10000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-10000-attempt-1.json.gz", + "SHA256": "25c36e1aead7df226fa50ae19ccaaf852cad122d5d69d916748f52e06bbfea34", + "Size": 2068866, + "RawBytes": 8793012 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-10000-attempt-1.json.gz", + "SHA256": "25c36e1aead7df226fa50ae19ccaaf852cad122d5d69d916748f52e06bbfea34", + "Size": 2068866, + "RawBytes": 8793012 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-rate-10000", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 10000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 4929831872, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 65014375, + "ObservedEvents": 100000, + "VerificationNS": 521306208, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 7, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1071, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10755272917, + "DrainNS": 755272917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9990, + "PersistedEPS": 9297.764991340944, + "ack_latency": { + "p50_ns": 21707416, + "p95_ns": 30596958, + "p99_ns": 37887750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 116567000, + "p95_ns": 156221000, + "p99_ns": 173321000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "031ae9596441400d26ec155766cd1b41d0f3119aa4cf818704341bf55d53f631", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "031ae9596441400d26ec155766cd1b41d0f3119aa4cf818704341bf55d53f631", + "stored": "031ae9596441400d26ec155766cd1b41d0f3119aa4cf818704341bf55d53f631" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 98800, + "AcceptedAfterWindow": 200, + "ObserverPolls": 801, + "ObserverQueries": 2603, + "ObserverQueryNS": 19514360453, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55419500, + "ObservedEvents": 99000, + "VerificationNS": 566624000, + "AmbiguousUnobserved": 1000, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "ambiguous_delivery", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 99000, + "Persisted": 99000, + "Ambiguous": 1000, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 3, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1106, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 40769246709, + "DrainNS": 30769246709, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9880, + "PersistedEPS": 2428.3009373863483, + "ack_latency": { + "p50_ns": 21705834, + "p95_ns": 30252459, + "p99_ns": 189399292 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 119827000, + "p95_ns": 173500000, + "p99_ns": 361948000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "3cc4ab61db661bb749f269f2c82a235bb0d0f7b72d81f2f8293430165dffd67c", + "ambiguous": "59270fa3fb79e3e9a780aa6e856c810436e2703066bf42d468a82b66d16c421b", + "attempted": "f0ef40210d7e15c123dd9e5ba987682141fc10907699b94cf3cd193aef8572a1", + "stored": "3cc4ab61db661bb749f269f2c82a235bb0d0f7b72d81f2f8293430165dffd67c" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 5105126368, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 57199042, + "ObservedEvents": 100000, + "VerificationNS": 539930666, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 4, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 933, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10786179917, + "DrainNS": 786179917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9990, + "PersistedEPS": 9271.122934115989, + "ack_latency": { + "p50_ns": 20515917, + "p95_ns": 27575458, + "p99_ns": 31903166 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 104255000, + "p95_ns": 134913000, + "p99_ns": 146419000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "68e51ff5108c09fc005c043602985515d318bf5e072f7486b897f5e802576536", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "68e51ff5108c09fc005c043602985515d318bf5e072f7486b897f5e802576536", + "stored": "68e51ff5108c09fc005c043602985515d318bf5e072f7486b897f5e802576536" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-payload-1024", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 10, + "PayloadBytes": 1024, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-1024-attempt-1.json.gz", + "SHA256": "01b7d19d8709a090d2c68a0a8ff9414b9e2ee0c65ee3e567528cc39d906a3506", + "Size": 279822, + "RawBytes": 1222115 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-1024-attempt-1.json.gz", + "SHA256": "01b7d19d8709a090d2c68a0a8ff9414b9e2ee0c65ee3e567528cc39d906a3506", + "Size": 279822, + "RawBytes": 1222115 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-payload-1024", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 1024, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 200, + "ObserverQueries": 799, + "ObserverQueryNS": 2315790535, + "ObserverLatePolls": 1, + "ObserverMaxGapNS": 166389792, + "ObservedEvents": 10000, + "VerificationNS": 129220542, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements", + "observer_poll_delays" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 2, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 64, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10209711083, + "DrainNS": 209711083, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 979.4596456946578, + "ack_latency": { + "p50_ns": 17631209, + "p95_ns": 33324167, + "p99_ns": 143688584 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 76401000, + "p95_ns": 130131000, + "p99_ns": 252783000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "1faa545fa91f92394aab9f56717366b7b68b1db3f781abda377e4c384403d664", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "1faa545fa91f92394aab9f56717366b7b68b1db3f781abda377e4c384403d664", + "stored": "1faa545fa91f92394aab9f56717366b7b68b1db3f781abda377e4c384403d664" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 799, + "ObserverQueryNS": 1911043549, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54348667, + "ObservedEvents": 10000, + "VerificationNS": 130668708, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 73, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10210468209, + "DrainNS": 210468209, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 979.3870168642724, + "ack_latency": { + "p50_ns": 18195875, + "p95_ns": 74396584, + "p99_ns": 273341792 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 90939000, + "p95_ns": 255112000, + "p99_ns": 419235000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "ea70823466af37724eec5348d5cd63c51ff4b2e325f173d0c1ae0425df1de14b", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "ea70823466af37724eec5348d5cd63c51ff4b2e325f173d0c1ae0425df1de14b", + "stored": "ea70823466af37724eec5348d5cd63c51ff4b2e325f173d0c1ae0425df1de14b" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 2046380626, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55341792, + "ObservedEvents": 10000, + "VerificationNS": 133545875, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 106, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10267597875, + "DrainNS": 267597875, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 973.9376358270166, + "ack_latency": { + "p50_ns": 17675000, + "p95_ns": 25097625, + "p99_ns": 30296000 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 93973000, + "p95_ns": 129984000, + "p99_ns": 149228000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a26ba381ca144d65b9926371c581a1303107d239964fbff5158b0d3062b63b23", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a26ba381ca144d65b9926371c581a1303107d239964fbff5158b0d3062b63b23", + "stored": "a26ba381ca144d65b9926371c581a1303107d239964fbff5158b0d3062b63b23" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-payload-16384", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 10, + "PayloadBytes": 16384, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-16384-attempt-1.json.gz", + "SHA256": "089fe775ffeff87e6d58c3c74420b6c923eff8418992d77edcdfad35bed3bfe0", + "Size": 277957, + "RawBytes": 1320093 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-16384-attempt-1.json.gz", + "SHA256": "089fe775ffeff87e6d58c3c74420b6c923eff8418992d77edcdfad35bed3bfe0", + "Size": 277957, + "RawBytes": 1320093 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-payload-16384", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 16384, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9980, + "AcceptedAfterWindow": 20, + "ObserverPolls": 203, + "ObserverQueries": 811, + "ObserverQueryNS": 3554249218, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56773291, + "ObservedEvents": 10000, + "VerificationNS": 1537807208, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 155, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 11667406458, + "DrainNS": 1667406458, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998, + "PersistedEPS": 857.0885085728107, + "ack_latency": { + "p50_ns": 32645250, + "p95_ns": 49532834, + "p99_ns": 66846833 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 165908000, + "p95_ns": 251744000, + "p99_ns": 298241000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "bbeaa26980000eb3ed348b61d1bddffc1874a78c407c442d202cfdb4daaac58f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "bbeaa26980000eb3ed348b61d1bddffc1874a78c407c442d202cfdb4daaac58f", + "stored": "bbeaa26980000eb3ed348b61d1bddffc1874a78c407c442d202cfdb4daaac58f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9810, + "AcceptedAfterWindow": 30, + "ObserverPolls": 801, + "ObserverQueries": 2602, + "ObserverQueryNS": 9849943194, + "ObserverLatePolls": 1, + "ObserverMaxGapNS": 104266042, + "ObservedEvents": 9840, + "VerificationNS": 1534999292, + "AmbiguousUnobserved": 160, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "ambiguous_delivery", + "late_acknowledgements", + "observer_poll_delays" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 9840, + "Persisted": 9840, + "Ambiguous": 160, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 105, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 41639454916, + "DrainNS": 31639454916, + "PollIntervalNS": 50000000, + "AcceptedEPS": 981, + "PersistedEPS": 236.31433264077071, + "ack_latency": { + "p50_ns": 30993667, + "p95_ns": 60628667, + "p99_ns": 164553792 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 144310000, + "p95_ns": 270529000, + "p99_ns": 379990000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6e2467c28274a9cb5d48e9f522b4b1ee15fdd462debaf066026807208fe6312a", + "ambiguous": "1e71c64d46ad4e72cc6e4e1aa23fdbc1ca35218c461a9a5345db551f9c1fb871", + "attempted": "b7ff877cae2650875847ab17dc33b8d9f6ec312c66cd757115ddacb2905ec2ad", + "stored": "6e2467c28274a9cb5d48e9f522b4b1ee15fdd462debaf066026807208fe6312a" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9970, + "AcceptedAfterWindow": 30, + "ObserverPolls": 205, + "ObserverQueries": 819, + "ObserverQueryNS": 3118497591, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59763834, + "ObservedEvents": 10000, + "VerificationNS": 1578969209, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 150, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 11816684666, + "DrainNS": 1816684666, + "PollIntervalNS": 50000000, + "AcceptedEPS": 997, + "PersistedEPS": 846.2610522876079, + "ack_latency": { + "p50_ns": 29359708, + "p95_ns": 42912917, + "p99_ns": 74574041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 116596000, + "p95_ns": 179641000, + "p99_ns": 223676000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6bd955c0f288e0c4a455c4f9d1f2ec761e27e257ddb3e382b06ed5e5fce43072", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "6bd955c0f288e0c4a455c4f9d1f2ec761e27e257ddb3e382b06ed5e5fce43072", + "stored": "6bd955c0f288e0c4a455c4f9d1f2ec761e27e257ddb3e382b06ed5e5fce43072" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-burst", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "burst", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-burst-attempt-1.json.gz", + "SHA256": "48d3ec24fe8f514129a24bd406c467fdba04bfc1b4cb91fad05fcd9e8b3a7797", + "Size": 193068, + "RawBytes": 842064 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-burst-attempt-1.json.gz", + "SHA256": "48d3ec24fe8f514129a24bd406c467fdba04bfc1b4cb91fad05fcd9e8b3a7797", + "Size": 193068, + "RawBytes": 842064 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-burst", + "observer_reconnect": false, + "pattern": "burst", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 655, + "ObserverQueryNS": 893192915, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55065375, + "ObservedEvents": 10000, + "VerificationNS": 91235291, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10161531583, + "DrainNS": 161531583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 984.103618467295, + "ack_latency": { + "p50_ns": 22585250, + "p95_ns": 28225541, + "p99_ns": 29166459 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 51454000, + "p95_ns": 78952000, + "p99_ns": 83510000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "feb9e51386fd87ee82d223531384aad30af2c69adf5ca1967b2810debad614c4", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "feb9e51386fd87ee82d223531384aad30af2c69adf5ca1967b2810debad614c4", + "stored": "feb9e51386fd87ee82d223531384aad30af2c69adf5ca1967b2810debad614c4" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 655, + "ObserverQueryNS": 707902496, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 58503584, + "ObservedEvents": 10000, + "VerificationNS": 68302042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10111323167, + "DrainNS": 111323167, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 988.9902473532522, + "ack_latency": { + "p50_ns": 23247875, + "p95_ns": 29194334, + "p99_ns": 32305792 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 54904000, + "p95_ns": 81467000, + "p99_ns": 102517000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "743c47c75169b6a1c14460397e6e5c24b9f00ee23aba5a25ae818244fcb5f2ae", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "743c47c75169b6a1c14460397e6e5c24b9f00ee23aba5a25ae818244fcb5f2ae", + "stored": "743c47c75169b6a1c14460397e6e5c24b9f00ee23aba5a25ae818244fcb5f2ae" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 655, + "ObserverQueryNS": 765793338, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52733209, + "ObservedEvents": 10000, + "VerificationNS": 72164750, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10156372916, + "DrainNS": 156372916, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 984.6034684534225, + "ack_latency": { + "p50_ns": 23469042, + "p95_ns": 28970625, + "p99_ns": 30476958 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 53638000, + "p95_ns": 80472000, + "p99_ns": 100057000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "eadbca0880f03ebebcb91c90e63dd16be101291dfc6a586fa230f25773790573", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "eadbca0880f03ebebcb91c90e63dd16be101291dfc6a586fa230f25773790573", + "stored": "eadbca0880f03ebebcb91c90e63dd16be101291dfc6a586fa230f25773790573" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-concurrency-8", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 1, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 8, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-8-attempt-1.json.gz", + "SHA256": "695927c9bf4a3ba2130b46ba69a70005e86371003907d9bd7e0570e119448986", + "Size": 346758, + "RawBytes": 2306347 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-8-attempt-1.json.gz", + "SHA256": "695927c9bf4a3ba2130b46ba69a70005e86371003907d9bd7e0570e119448986", + "Size": 346758, + "RawBytes": 2306347 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 8, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-concurrency-8", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4664, + "AttemptedAfterWindow": 16, + "AcceptedInWindow": 4656, + "AcceptedAfterWindow": 24, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 868204792, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 57010208, + "ObservedEvents": 4680, + "VerificationNS": 34447959, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 4680, + "Accepted": 4680, + "Persisted": 4680, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5320, + "LateSchedules": 347, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 23, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10103449208, + "DrainNS": 103449208, + "PollIntervalNS": 50000000, + "AcceptedEPS": 465.6, + "PersistedEPS": 463.2081483909807, + "ack_latency": { + "p50_ns": 16892500, + "p95_ns": 20806292, + "p99_ns": 24802458 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 49042000, + "p95_ns": 72651000, + "p99_ns": 78395000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6fb24a230ed9cd1e487b08145cfd6887cce91fbfc93f11a769afba5e3e6fc15f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "6fb24a230ed9cd1e487b08145cfd6887cce91fbfc93f11a769afba5e3e6fc15f", + "stored": "6fb24a230ed9cd1e487b08145cfd6887cce91fbfc93f11a769afba5e3e6fc15f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4629, + "AttemptedAfterWindow": 15, + "AcceptedInWindow": 4621, + "AcceptedAfterWindow": 23, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 921277883, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52856750, + "ObservedEvents": 4644, + "VerificationNS": 39858083, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 4644, + "Accepted": 4644, + "Persisted": 4644, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5356, + "LateSchedules": 319, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 24, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10156855917, + "DrainNS": 156855917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 462.1, + "PersistedEPS": 457.22810660601397, + "ack_latency": { + "p50_ns": 17080416, + "p95_ns": 20865125, + "p99_ns": 24262708 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 47671000, + "p95_ns": 71461000, + "p99_ns": 77511000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a17f07dae4776aa25b6b3b757f2b28cd6517bbaaffbdbd6471ab360bf09e5096", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a17f07dae4776aa25b6b3b757f2b28cd6517bbaaffbdbd6471ab360bf09e5096", + "stored": "a17f07dae4776aa25b6b3b757f2b28cd6517bbaaffbdbd6471ab360bf09e5096" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4476, + "AttemptedAfterWindow": 16, + "AcceptedInWindow": 4468, + "AcceptedAfterWindow": 24, + "ObserverPolls": 202, + "ObserverQueries": 807, + "ObserverQueryNS": 917737375, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 61503584, + "ObservedEvents": 4492, + "VerificationNS": 36307917, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 4492, + "Accepted": 4492, + "Persisted": 4492, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5508, + "LateSchedules": 557, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 19, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10100649917, + "DrainNS": 100649917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 446.8, + "PersistedEPS": 444.7238580598358, + "ack_latency": { + "p50_ns": 17256666, + "p95_ns": 22242750, + "p99_ns": 29948041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50507000, + "p95_ns": 90682000, + "p99_ns": 161448000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "c58f176dbe884911af66aa0d19ff8a87b10fd90c835924b63f673b8319fcc8f6", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "c58f176dbe884911af66aa0d19ff8a87b10fd90c835924b63f673b8319fcc8f6", + "stored": "c58f176dbe884911af66aa0d19ff8a87b10fd90c835924b63f673b8319fcc8f6" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-concurrency-64", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 1, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 64, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-64-attempt-1.json.gz", + "SHA256": "3b4805c791406fa04b7cf7cc97aadb767f2221e3e164138be68353eef6b27b34", + "Size": 805253, + "RawBytes": 4883440 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-64-attempt-1.json.gz", + "SHA256": "3b4805c791406fa04b7cf7cc97aadb767f2221e3e164138be68353eef6b27b34", + "Size": 805253, + "RawBytes": 4883440 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 64, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-concurrency-64", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9992, + "AcceptedAfterWindow": 8, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 1059498763, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50568542, + "ObservedEvents": 10000, + "VerificationNS": 54987750, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 16, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 92, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10127980292, + "DrainNS": 127980292, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999.2, + "PersistedEPS": 987.3636906559652, + "ack_latency": { + "p50_ns": 11952208, + "p95_ns": 19577250, + "p99_ns": 33015084 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50189000, + "p95_ns": 86181000, + "p99_ns": 112698000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "38e6d6aaf51193e81bf2fae24476cc7e429e5bdfdd90e477c63dd8e7084ddb7a", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "38e6d6aaf51193e81bf2fae24476cc7e429e5bdfdd90e477c63dd8e7084ddb7a", + "stored": "38e6d6aaf51193e81bf2fae24476cc7e429e5bdfdd90e477c63dd8e7084ddb7a" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9991, + "AcceptedAfterWindow": 9, + "ObserverPolls": 199, + "ObserverQueries": 797, + "ObserverQueryNS": 1299098215, + "ObserverLatePolls": 1, + "ObserverMaxGapNS": 204300834, + "ObservedEvents": 10000, + "VerificationNS": 61925541, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements", + "observer_poll_delays" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 2, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 96, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10146946333, + "DrainNS": 146946333, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999.1, + "PersistedEPS": 985.5181718541173, + "ack_latency": { + "p50_ns": 12832167, + "p95_ns": 21195000, + "p99_ns": 34648917 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 60236000, + "p95_ns": 109429000, + "p99_ns": 205870000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a4bb69d5d379579fb6c54e54200a5de260163ea2a16d3af29ca07ace9c00524e", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a4bb69d5d379579fb6c54e54200a5de260163ea2a16d3af29ca07ace9c00524e", + "stored": "a4bb69d5d379579fb6c54e54200a5de260163ea2a16d3af29ca07ace9c00524e" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 9938, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9930, + "AcceptedAfterWindow": 8, + "ObserverPolls": 202, + "ObserverQueries": 799, + "ObserverQueryNS": 1273894953, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50724416, + "ObservedEvents": 9938, + "VerificationNS": 60112792, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 9938, + "Accepted": 9938, + "Persisted": 9938, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 62, + "LateSchedules": 3, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 59, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10133823375, + "DrainNS": 133823375, + "PollIntervalNS": 50000000, + "AcceptedEPS": 993, + "PersistedEPS": 980.6762593195483, + "ack_latency": { + "p50_ns": 16366458, + "p95_ns": 37419042, + "p99_ns": 194021750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 80078000, + "p95_ns": 225583000, + "p99_ns": 347265000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "42d0510b084ce598cbb558e990c188aa75792be709fbec0a45369e7d85a62ad1", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "42d0510b084ce598cbb558e990c188aa75792be709fbec0a45369e7d85a62ad1", + "stored": "42d0510b084ce598cbb558e990c188aa75792be709fbec0a45369e7d85a62ad1" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "recovery-database", + "Kind": "recovery", + "Recovery": "database", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 7500, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 500, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 15000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 3000000000, + "RestoreAt": 8000000000 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-database-attempt-1.json.gz", + "SHA256": "ccd4ac476583ca53ef0987d3ba2916d8eaf2251cf7191df20a9ddd180e689828", + "Size": 154715, + "RawBytes": 710547 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-database-attempt-1.json.gz", + "SHA256": "ccd4ac476583ca53ef0987d3ba2916d8eaf2251cf7191df20a9ddd180e689828", + "Size": 154715, + "RawBytes": 710547 + } + } + ], + "Summary": { + "Kind": "database", + "Runs": [ + { + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3002409542, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:00:46.144311Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 4277792167, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:00:47.419693Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8003307875, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:00:51.145207Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8907949250, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:00:52.049848Z" + } + ], + "Pipeline": { + "ObserverOutages": 106, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 656, + "ObserverQueryNS": 1583766246, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 63554583, + "ObservedEvents": 7500, + "VerificationNS": 43808042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 1, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15061655042, + "DrainNS": 61655042, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.9532447852486, + "ack_latency": { + "p50_ns": 29510709, + "p95_ns": 55691500, + "p99_ns": 73152458 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 91341000, + "p95_ns": 4659266000, + "p99_ns": 5259990000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "79fee54214110d3516816c4bc0044f5db5f50775c0175957b9f2dcc86388b1da", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "79fee54214110d3516816c4bc0044f5db5f50775c0175957b9f2dcc86388b1da", + "stored": "79fee54214110d3516816c4bc0044f5db5f50775c0175957b9f2dcc86388b1da" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3002153250, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:01.318026Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3887184750, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:02.203058Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8004299042, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:01:06.32017Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8800094042, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:01:07.115964Z" + } + ], + "Pipeline": { + "ObserverOutages": 106, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 643, + "ObserverQueryNS": 1704823506, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55428500, + "ObservedEvents": 7500, + "VerificationNS": 61648417, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 2, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15095050042, + "DrainNS": 95050042, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 496.8516155383541, + "ack_latency": { + "p50_ns": 30175833, + "p95_ns": 52860208, + "p99_ns": 67618708 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 104940000, + "p95_ns": 6652309000, + "p99_ns": 7199234000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "b36f39db12a5716ff22b6ad1f1487eab0ab2f01db0b0296f8aebc5926178497d", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "b36f39db12a5716ff22b6ad1f1487eab0ab2f01db0b0296f8aebc5926178497d", + "stored": "b36f39db12a5716ff22b6ad1f1487eab0ab2f01db0b0296f8aebc5926178497d" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3002071958, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:16.525348Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 4029136875, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:17.552413Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8001195125, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:01:21.524469Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8912095333, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:01:22.435369Z" + } + ], + "Pipeline": { + "ObserverOutages": 106, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 648, + "ObserverQueryNS": 1443504755, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54056459, + "ObservedEvents": 7500, + "VerificationNS": 56885125, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 3, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15097772708, + "DrainNS": 97772708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 496.76201550086284, + "ack_latency": { + "p50_ns": 27669625, + "p95_ns": 51285500, + "p99_ns": 53406375 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 89619000, + "p95_ns": 5001118000, + "p99_ns": 5390681000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "523827722d7636042b394c3df0626a6bd95f7d83a15d0370ee8d3c293315bad1", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "523827722d7636042b394c3df0626a6bd95f7d83a15d0370ee8d3c293315bad1", + "stored": "523827722d7636042b394c3df0626a6bd95f7d83a15d0370ee8d3c293315bad1" + }, + "backlog": null, + "correct": true + } + } + ], + "Notes": [ + "Availability experiment; not a capacity estimate. Actual control timestamps and reconciled ID sets are retained.", + "A forced consumer kill does not claim to land in every database/offset commit window; the deterministic crash regression remains separate." + ] + } + }, + { + "Case": { + "ID": "recovery-consumer", + "Kind": "recovery", + "Recovery": "consumer", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 7500, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 500, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 15000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 3000000000, + "RestoreAt": 5000000000 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-consumer-attempt-1.json.gz", + "SHA256": "488d6e2d1297fe33509dbd92de24152a92758eceba0b0bebc65973c808b36146", + "Size": 149845, + "RawBytes": 722652 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-consumer-attempt-1.json.gz", + "SHA256": "488d6e2d1297fe33509dbd92de24152a92758eceba0b0bebc65973c808b36146", + "Size": 149845, + "RawBytes": 722652 + } + } + ], + "Summary": { + "Kind": "consumer", + "Runs": [ + { + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3000828166, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:34.566924Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3776849208, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:35.342945Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 5002222333, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:01:36.568317Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 7655887916, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:01:39.221982Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 941, + "ObserverQueryNS": 1763761370, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55528334, + "ObservedEvents": 7500, + "VerificationNS": 59759625, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15098734083, + "DrainNS": 98734083, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 496.7303853933302, + "ack_latency": { + "p50_ns": 27365209, + "p95_ns": 49788000, + "p99_ns": 87591750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2599833000, + "p95_ns": 9301563000, + "p99_ns": 9903359000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "ecb94a216ac397c123c1b8145d517c82c7c7fbe7c644930976bff9ff86372646", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "ecb94a216ac397c123c1b8145d517c82c7c7fbe7c644930976bff9ff86372646", + "stored": "ecb94a216ac397c123c1b8145d517c82c7c7fbe7c644930976bff9ff86372646" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3001287417, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:49.789925Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3799946917, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:50.588584Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 5002330083, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:01:51.790966Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 7760282333, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:01:54.548918Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 939, + "ObserverQueryNS": 1694091881, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52461250, + "ObservedEvents": 7500, + "VerificationNS": 41648583, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15067593583, + "DrainNS": 67593583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.7569881140057, + "ack_latency": { + "p50_ns": 26456125, + "p95_ns": 48078916, + "p99_ns": 58318125 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2598574000, + "p95_ns": 9302351000, + "p99_ns": 9903396000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "2f56ccea9892c5857df332bad3d80547df690032ca18e1856aeee7b5f7426695", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "2f56ccea9892c5857df332bad3d80547df690032ca18e1856aeee7b5f7426695", + "stored": "2f56ccea9892c5857df332bad3d80547df690032ca18e1856aeee7b5f7426695" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3000689791, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:02:04.968056Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3817526375, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:02:05.784892Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 5002106000, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:02:06.969471Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 7776916125, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:02:09.74428Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 940, + "ObserverQueryNS": 1623068167, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54497000, + "ObservedEvents": 7500, + "VerificationNS": 52271500, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15076663041, + "DrainNS": 76663041, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.45755938195606, + "ack_latency": { + "p50_ns": 26974000, + "p95_ns": 44132750, + "p99_ns": 67358000 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2603715000, + "p95_ns": 9302912000, + "p99_ns": 9904452000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "3f74231e17e3aacc8a1a7b040f6759acefe66c8647c1e5c1cd45215f1d1ccf32", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "3f74231e17e3aacc8a1a7b040f6759acefe66c8647c1e5c1cd45215f1d1ccf32", + "stored": "3f74231e17e3aacc8a1a7b040f6759acefe66c8647c1e5c1cd45215f1d1ccf32" + }, + "backlog": null, + "correct": true + } + } + ], + "Notes": [ + "Availability experiment; not a capacity estimate. Actual control timestamps and reconciled ID sets are retained.", + "A forced consumer kill does not claim to land in every database/offset commit window; the deterministic crash regression remains separate." + ] + } + }, + { + "Case": { + "ID": "recovery-outbox", + "Kind": "recovery", + "Recovery": "outbox", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 100, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 8000000000 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-outbox-attempt-1.json.gz", + "SHA256": "1aa212d094807e13e955b79c7c8f131ea189bcbe4dd7af0f8868d0a6c5133b48", + "Size": 8574, + "RawBytes": 39472 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-outbox-attempt-1.json.gz", + "SHA256": "1aa212d094807e13e955b79c7c8f131ea189bcbe4dd7af0f8868d0a6c5133b48", + "Size": 8574, + "RawBytes": 39472 + } + } + ], + "Summary": { + "Kind": "outbox", + "Runs": [ + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5103591833, + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 166, + "PlannedNS": 0, + "At": "2026-11-03T23:02:20.021896Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 1037246500, + "PlannedNS": 0, + "At": "2026-11-03T23:02:21.059142Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 9039442125, + "PlannedNS": 9037256083, + "At": "2026-11-03T23:02:29.064652Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 9800852541, + "PlannedNS": 0, + "At": "2026-11-03T23:02:29.826365Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 1037253708, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 6140916750, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 12810712458, + "Pending": 0, + "Acknowledged": 100 + } + ] + }, + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5094561083, + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 167, + "PlannedNS": 0, + "At": "2026-11-03T23:02:40.513924Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 840562042, + "PlannedNS": 0, + "At": "2026-11-03T23:02:41.354645Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8842522042, + "PlannedNS": 8840572709, + "At": "2026-11-03T23:02:49.357764Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 9624146542, + "PlannedNS": 0, + "At": "2026-11-03T23:02:50.139472Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 840568000, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 5935157292, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 10561121459, + "Pending": 0, + "Acknowledged": 100 + } + ] + }, + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5104990458, + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 166, + "PlannedNS": 0, + "At": "2026-11-03T23:03:00.716783Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 861221666, + "PlannedNS": 0, + "At": "2026-11-03T23:03:01.57805Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8863575916, + "PlannedNS": 8861236791, + "At": "2026-11-03T23:03:09.580727Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 9664142416, + "PlannedNS": 0, + "At": "2026-11-03T23:03:10.381316Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 861233083, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 5966276500, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 12688371000, + "Pending": 0, + "Acknowledged": 100 + } + ] + } + ], + "Notes": [ + "One untimed warm-up order before three measured broker outages.100 pending local events per repetition; the first one-attempt dispatch exceeds the broker publish timeout.", + "Pending-local samples are observations after commands, not exact transition times. HTTP ACK still precedes PostgreSQL persistence." + ] + } + } + ], + "Notes": [ + "Smoke runs verify correctness only. Full runs retain every configured repetition; limited outcomes are not capacity claims.", + "Raw captures contain empirical samples and UUID population indices (or explicit outbox UUIDs); gzip mtime=0 with SHA256. Submitted IDs regenerate from namespace/seed/index.", + "Failed and interrupted attempts remain in case History. A resumed incomplete case restarts all three repetitions on a fresh owned stack; completed captures are immutable." + ] +} diff --git a/benchmarks/results/selfhost-2026-11-04/journal.json b/benchmarks/results/selfhost-2026-11-04/journal.json new file mode 100644 index 0000000..45b5712 --- /dev/null +++ b/benchmarks/results/selfhost-2026-11-04/journal.json @@ -0,0 +1,5241 @@ +{ + "Status": "complete", + "ExecutionAttempts": 1, + "MetadataArtifacts": [ + { + "Codec": "json", + "Path": "manifest-1.json", + "SHA256": "0ce0a588fea23e93241c9429f410ffcbc480fb652a7306df4acc61102d9da566", + "Size": 14173, + "RawBytes": 14173 + } + ], + "ManifestFiles": [ + "manifest-1.json" + ], + "Resources": [ + { + "Codec": "gzip", + "Path": "resources-1.json.gz", + "SHA256": "094e95ac94ff6a4f18ace2a09b1aa42220b8dfb46f5514bfaf94e7f3bdb46cdf", + "Size": 24659, + "RawBytes": 483396 + } + ], + "Schema": 1, + "Identity": { + "SourceSHA": "213e4cc50523882f0d0cf7533d064494387d3207", + "SourceFingerprint": "26d4ffc91f5fe2d520fc9c1db07a7a75a480539a898dd4b16fe2b6917aabe1ec", + "ControlsFingerprint": "48c89aca641858936a3ae61db38c6683c1e3ec590b3c447c2548cbf4c2f9e318", + "ImagesFingerprint": "5c671c388095ad2d8824c81b887f50aba9e3ec46670be9e2b49a2b062dcbb501", + "ConfigFingerprint": "adb4f8dbf754b2e2b5e2de4d6ee3b92af55c55d2f7ea0e90bf218c045898b242", + "Mode": "full", + "Seed": 42, + "SourceDirty": false + }, + "RunNamespace": "a966020c-1625-4bea-a08d-b0a83bf05c46", + "Cases": { + "db-batch-1": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1-attempt-1.json.gz", + "SHA256": "1a159a2e21dfb85d2b5476daca25f8e87dfccb2c3478723259775b2019a1925d", + "Size": 130640, + "RawBytes": 342505 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-1", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 1, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4936232209, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5088313167, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 22681047542, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5244822500, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 21302178625, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5023027958, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 21177280083, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7941054541, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4576318042, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1-attempt-1.json.gz", + "SHA256": "1a159a2e21dfb85d2b5476daca25f8e87dfccb2c3478723259775b2019a1925d", + "Size": 130640, + "RawBytes": 342505 + } + } + ], + "ErrorClass": "" + }, + "db-batch-10": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-10-attempt-1.json.gz", + "SHA256": "bd8068803db7fb0e71695a718e9c2ff8ce432d02540221a06b065527bcf8d81e", + "Size": 51034, + "RawBytes": 133973 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-10", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 10, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4443227291, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 524023917, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2144229708, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1255224750, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2290702792, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4821445500, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1996117417, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4522498250, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 568435667, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-10-attempt-1.json.gz", + "SHA256": "bd8068803db7fb0e71695a718e9c2ff8ce432d02540221a06b065527bcf8d81e", + "Size": 51034, + "RawBytes": 133973 + } + } + ], + "ErrorClass": "" + }, + "db-batch-100": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-100-attempt-1.json.gz", + "SHA256": "83ecd2e92f6155facef9dbf40f66bfe6e5fe77e60156027a737edc0d16c1d8d8", + "Size": 44716, + "RawBytes": 117834 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-100", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6510272708, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 120934000, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 211848834, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 247175000, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 486334584, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 8374506834, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 522940667, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4710444833, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 155274042, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-100-attempt-1.json.gz", + "SHA256": "83ecd2e92f6155facef9dbf40f66bfe6e5fe77e60156027a737edc0d16c1d8d8", + "Size": 44716, + "RawBytes": 117834 + } + } + ], + "ErrorClass": "" + }, + "db-batch-1000": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1000-attempt-1.json.gz", + "SHA256": "496e7c8809070bfcf89a108217dccd056fdd14a251665b84c18b604401f214a4", + "Size": 43467, + "RawBytes": 119279 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-1000", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 1000, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 9558477708, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 73813334, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 88251084, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 82479000, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 108001709, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6154787416, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 75268542, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6377761750, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 81253083, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1000-attempt-1.json.gz", + "SHA256": "496e7c8809070bfcf89a108217dccd056fdd14a251665b84c18b604401f214a4", + "Size": 43467, + "RawBytes": 119279 + } + } + ], + "ErrorClass": "" + }, + "db-batch-50": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-50-attempt-1.json.gz", + "SHA256": "86689028eb111d5e70f5b8f7a1657e16726771f4ddf5e77bc53ade69e117a971", + "Size": 44574, + "RawBytes": 117137 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-50", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 50, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 10169916917, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 174899083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 545585208, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 317074083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 602685917, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4694109542, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 638922833, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4868339083, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 192964500, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-50-attempt-1.json.gz", + "SHA256": "86689028eb111d5e70f5b8f7a1657e16726771f4ddf5e77bc53ade69e117a971", + "Size": 44574, + "RawBytes": 117137 + } + } + ], + "ErrorClass": "" + }, + "db-batch-500": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-500-attempt-1.json.gz", + "SHA256": "4f6dc35c8fa1126bd82efe3cf18189e73ce5b1741887b2f8507898a05d9f12a5", + "Size": 42872, + "RawBytes": 123095 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-batch-500", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 500, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7059296375, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 85045834, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 112395709, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 142081125, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 118002958, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7221146083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 110777166, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6646475791, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 76509000, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-500-attempt-1.json.gz", + "SHA256": "4f6dc35c8fa1126bd82efe3cf18189e73ce5b1741887b2f8507898a05d9f12a5", + "Size": 42872, + "RawBytes": 123095 + } + } + ], + "ErrorClass": "" + }, + "db-duplicates-10": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-10-attempt-1.json.gz", + "SHA256": "80900cc48ab4fb6757c49d73a06e01fddb511612bfff3d43a1e86bcc4359f357", + "Size": 44909, + "RawBytes": 118441 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-duplicates-10", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.1 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 9249286917, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 115587500, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 301739500, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 211658167, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 376863667, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 5055233334, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 243863375, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 5675436333, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 115246167, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-10-attempt-1.json.gz", + "SHA256": "80900cc48ab4fb6757c49d73a06e01fddb511612bfff3d43a1e86bcc4359f357", + "Size": 44909, + "RawBytes": 118441 + } + } + ], + "ErrorClass": "" + }, + "db-duplicates-50": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-50-attempt-1.json.gz", + "SHA256": "51815d6a908ec42150b867790877a622a195a223add1f5fc9e9e70ecbdff6568", + "Size": 41674, + "RawBytes": 117291 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-duplicates-50", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.5 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 4253137959, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 96496833, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 263432583, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 198379834, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 508744500, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 4346176875, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 253285250, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 3998107125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 90732875, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-50-attempt-1.json.gz", + "SHA256": "51815d6a908ec42150b867790877a622a195a223add1f5fc9e9e70ecbdff6568", + "Size": 41674, + "RawBytes": 117291 + } + } + ], + "ErrorClass": "" + }, + "db-duplicates-90": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-90-attempt-1.json.gz", + "SHA256": "341c52cbb99d94e26e2d595a550793500a3c09da88100323ca2020b0f7c8547b", + "Size": 38722, + "RawBytes": 109991 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-duplicates-90", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.9 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1394084000, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 64458500, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 219283125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 79736375, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 422971917, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 2531024958, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 229405667, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1197924375, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 55914458, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-90-attempt-1.json.gz", + "SHA256": "341c52cbb99d94e26e2d595a550793500a3c09da88100323ca2020b0f7c8547b", + "Size": 38722, + "RawBytes": 109991 + } + } + ], + "ErrorClass": "" + }, + "db-payload-1024": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-1024-attempt-1.json.gz", + "SHA256": "7d506cdd0fa9213ec046f580abfcddd0cdc9e18a66c482b7aa7a6fa4dea71e04", + "Size": 45343, + "RawBytes": 122984 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-payload-1024", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 1024, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6860924625, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 145515250, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 405773334, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 240222042, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 416228625, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 10519756083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 274197750, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5653551791, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 194738916, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-1024-attempt-1.json.gz", + "SHA256": "7d506cdd0fa9213ec046f580abfcddd0cdc9e18a66c482b7aa7a6fa4dea71e04", + "Size": 45343, + "RawBytes": 122984 + } + } + ], + "ErrorClass": "" + }, + "db-payload-16384": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-16384-attempt-1.json.gz", + "SHA256": "97b12de3c2910c5597671dc829e2aaba7bdbfa0b82e726cb800ad21d372e8810", + "Size": 47666, + "RawBytes": 125082 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/db-payload-16384", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 16384, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7016298792, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1083158458, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1063217958, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1005818917, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1115342834, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 13876863708, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1062261500, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 14817980917, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 761372500, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-16384-attempt-1.json.gz", + "SHA256": "97b12de3c2910c5597671dc829e2aaba7bdbfa0b82e726cb800ad21d372e8810", + "Size": 47666, + "RawBytes": 125082 + } + } + ], + "ErrorClass": "" + }, + "pipeline-batch-1": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-1-attempt-1.json.gz", + "SHA256": "72b437440efeee588f61d5e40c318231a73e5f6c50487623d7abd13a760a8936", + "Size": 800613, + "RawBytes": 4781703 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-batch-1", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9988, + "AcceptedAfterWindow": 12, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 1353058211, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50443500, + "ObservedEvents": 10000, + "VerificationNS": 56480500, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 51, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10135613375, + "DrainNS": 135613375, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.8, + "PersistedEPS": 986.6201116812035, + "ack_latency": { + "p50_ns": 11422292, + "p95_ns": 17376708, + "p99_ns": 27288292 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 48090000, + "p95_ns": 75820000, + "p99_ns": 89387000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "068881b3244320162bbd7285e7726e2758d2e97d28ed45de9fad6ded47f2210a", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "068881b3244320162bbd7285e7726e2758d2e97d28ed45de9fad6ded47f2210a", + "stored": "068881b3244320162bbd7285e7726e2758d2e97d28ed45de9fad6ded47f2210a" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 9930, + "AttemptedAfterWindow": 19, + "AcceptedInWindow": 9898, + "AcceptedAfterWindow": 51, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 1591715706, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 76064292, + "ObservedEvents": 9949, + "VerificationNS": 54758208, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 9949, + "Accepted": 9949, + "Persisted": 9949, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 51, + "LateSchedules": 28, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 89, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10130414083, + "DrainNS": 130414083, + "PollIntervalNS": 50000000, + "AcceptedEPS": 989.8, + "PersistedEPS": 982.0921354730767, + "ack_latency": { + "p50_ns": 12156666, + "p95_ns": 20527250, + "p99_ns": 40400250 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 52853000, + "p95_ns": 91933000, + "p99_ns": 125752000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "4f791ba34bbcd7950eaba4f09001e6b58da7604f8135313b6ac28396330432cb", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "4f791ba34bbcd7950eaba4f09001e6b58da7604f8135313b6ac28396330432cb", + "stored": "4f791ba34bbcd7950eaba4f09001e6b58da7604f8135313b6ac28396330432cb" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 9377, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9363, + "AcceptedAfterWindow": 14, + "ObserverPolls": 202, + "ObserverQueries": 795, + "ObserverQueryNS": 1526429698, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 57182667, + "ObservedEvents": 9377, + "VerificationNS": 56129667, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 9377, + "Accepted": 9377, + "Persisted": 9377, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 623, + "LateSchedules": 47, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 58, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10138148125, + "DrainNS": 138148125, + "PollIntervalNS": 50000000, + "AcceptedEPS": 936.3, + "PersistedEPS": 924.922370869384, + "ack_latency": { + "p50_ns": 15669500, + "p95_ns": 31922709, + "p99_ns": 181402750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 73935000, + "p95_ns": 239382000, + "p99_ns": 431058000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "7246b15cf5acb6e76ee0494d9e3e1ab6eda310d8fa9020802b4d0b8f1e7b7ed9", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "7246b15cf5acb6e76ee0494d9e3e1ab6eda310d8fa9020802b4d0b8f1e7b7ed9", + "stored": "7246b15cf5acb6e76ee0494d9e3e1ab6eda310d8fa9020802b4d0b8f1e7b7ed9" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-1-attempt-1.json.gz", + "SHA256": "72b437440efeee588f61d5e40c318231a73e5f6c50487623d7abd13a760a8936", + "Size": 800613, + "RawBytes": 4781703 + } + } + ], + "ErrorClass": "" + }, + "pipeline-batch-10": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-10-attempt-1.json.gz", + "SHA256": "2351e2010fd1313b4a26568da7adf74c2d2983fa3c7837f326fa6662a8ecbbdb", + "Size": 282895, + "RawBytes": 1217646 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-batch-10", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 1294513032, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53925375, + "ObservedEvents": 10000, + "VerificationNS": 58723833, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 70, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10142246125, + "DrainNS": 142246125, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 985.9748892654683, + "ack_latency": { + "p50_ns": 15791250, + "p95_ns": 21651458, + "p99_ns": 25110708 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 62252000, + "p95_ns": 97962000, + "p99_ns": 109125000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "0a22636c0784c38b432c72ca780da2cdd10a0df71514e042e4dd37bb0717c437", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "0a22636c0784c38b432c72ca780da2cdd10a0df71514e042e4dd37bb0717c437", + "stored": "0a22636c0784c38b432c72ca780da2cdd10a0df71514e042e4dd37bb0717c437" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 1041027840, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 61022292, + "ObservedEvents": 10000, + "VerificationNS": 63639834, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 5, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 81, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10141243209, + "DrainNS": 141243209, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 986.0723970336643, + "ack_latency": { + "p50_ns": 16032750, + "p95_ns": 21965459, + "p99_ns": 27051083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 65718000, + "p95_ns": 104654000, + "p99_ns": 120674000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6b3b504b5b93ad411bbd90e6e8247e6303d0d27e06a5987d2d620776ded55493", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "6b3b504b5b93ad411bbd90e6e8247e6303d0d27e06a5987d2d620776ded55493", + "stored": "6b3b504b5b93ad411bbd90e6e8247e6303d0d27e06a5987d2d620776ded55493" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 202, + "ObserverQueries": 796, + "ObserverQueryNS": 1101211840, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 57782625, + "ObservedEvents": 10000, + "VerificationNS": 59425250, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 348, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10134065750, + "DrainNS": 134065750, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 986.7707834834208, + "ack_latency": { + "p50_ns": 17307584, + "p95_ns": 118647000, + "p99_ns": 263527125 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 91249000, + "p95_ns": 302325000, + "p99_ns": 452724000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "9d6f57401273ffd819dc8dd98a07933c6837d429197e3043c934fce438274cf0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "9d6f57401273ffd819dc8dd98a07933c6837d429197e3043c934fce438274cf0", + "stored": "9d6f57401273ffd819dc8dd98a07933c6837d429197e3043c934fce438274cf0" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-10-attempt-1.json.gz", + "SHA256": "2351e2010fd1313b4a26568da7adf74c2d2983fa3c7837f326fa6662a8ecbbdb", + "Size": 282895, + "RawBytes": 1217646 + } + } + ], + "ErrorClass": "" + }, + "pipeline-batch-100": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-100-attempt-1.json.gz", + "SHA256": "962fc7395246b47b002e154dc7b4897dac9fefebd3972a535e4fca49a5ecdfe8", + "Size": 195328, + "RawBytes": 843069 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-batch-100", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 727, + "ObserverQueryNS": 1350840783, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53176583, + "ObservedEvents": 10000, + "VerificationNS": 56095042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10078764708, + "DrainNS": 78764708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 992.1850831642611, + "ack_latency": { + "p50_ns": 29262375, + "p95_ns": 40186750, + "p99_ns": 44646875 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50820000, + "p95_ns": 101614000, + "p99_ns": 107527000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "5f88823872d6d84b302c3f570c8d418c411b9f4294bad23251fd58b7248c1978", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "5f88823872d6d84b302c3f570c8d418c411b9f4294bad23251fd58b7248c1978", + "stored": "5f88823872d6d84b302c3f570c8d418c411b9f4294bad23251fd58b7248c1978" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 723, + "ObserverQueryNS": 1406365339, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 84688167, + "ObservedEvents": 10000, + "VerificationNS": 69563792, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10107531959, + "DrainNS": 107531959, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 989.3612051452134, + "ack_latency": { + "p50_ns": 27935834, + "p95_ns": 41276917, + "p99_ns": 45595041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50954000, + "p95_ns": 103084000, + "p99_ns": 106888000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "d3e309c3f1eb328a3fa8d75613a0c7a1a3ce2be50791096eee1405f58502a54e", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "d3e309c3f1eb328a3fa8d75613a0c7a1a3ce2be50791096eee1405f58502a54e", + "stored": "d3e309c3f1eb328a3fa8d75613a0c7a1a3ce2be50791096eee1405f58502a54e" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 733, + "ObserverQueryNS": 1440745671, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53057000, + "ObservedEvents": 10000, + "VerificationNS": 75260542, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10113643250, + "DrainNS": 113643250, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 988.7633716959514, + "ack_latency": { + "p50_ns": 30018333, + "p95_ns": 42919916, + "p99_ns": 53125875 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50969000, + "p95_ns": 102858000, + "p99_ns": 106166000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a679eb2678d174ff5b878e9ee6eb927c389d6b5a9654d1dc5ee76fd92633ed43", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a679eb2678d174ff5b878e9ee6eb927c389d6b5a9654d1dc5ee76fd92633ed43", + "stored": "a679eb2678d174ff5b878e9ee6eb927c389d6b5a9654d1dc5ee76fd92633ed43" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-100-attempt-1.json.gz", + "SHA256": "962fc7395246b47b002e154dc7b4897dac9fefebd3972a535e4fca49a5ecdfe8", + "Size": 195328, + "RawBytes": 843069 + } + } + ], + "ErrorClass": "" + }, + "pipeline-burst": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-burst-attempt-1.json.gz", + "SHA256": "48d3ec24fe8f514129a24bd406c467fdba04bfc1b4cb91fad05fcd9e8b3a7797", + "Size": 193068, + "RawBytes": 842064 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-burst", + "observer_reconnect": false, + "pattern": "burst", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 655, + "ObserverQueryNS": 893192915, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55065375, + "ObservedEvents": 10000, + "VerificationNS": 91235291, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10161531583, + "DrainNS": 161531583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 984.103618467295, + "ack_latency": { + "p50_ns": 22585250, + "p95_ns": 28225541, + "p99_ns": 29166459 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 51454000, + "p95_ns": 78952000, + "p99_ns": 83510000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "feb9e51386fd87ee82d223531384aad30af2c69adf5ca1967b2810debad614c4", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "feb9e51386fd87ee82d223531384aad30af2c69adf5ca1967b2810debad614c4", + "stored": "feb9e51386fd87ee82d223531384aad30af2c69adf5ca1967b2810debad614c4" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 655, + "ObserverQueryNS": 707902496, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 58503584, + "ObservedEvents": 10000, + "VerificationNS": 68302042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10111323167, + "DrainNS": 111323167, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 988.9902473532522, + "ack_latency": { + "p50_ns": 23247875, + "p95_ns": 29194334, + "p99_ns": 32305792 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 54904000, + "p95_ns": 81467000, + "p99_ns": 102517000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "743c47c75169b6a1c14460397e6e5c24b9f00ee23aba5a25ae818244fcb5f2ae", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "743c47c75169b6a1c14460397e6e5c24b9f00ee23aba5a25ae818244fcb5f2ae", + "stored": "743c47c75169b6a1c14460397e6e5c24b9f00ee23aba5a25ae818244fcb5f2ae" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 655, + "ObserverQueryNS": 765793338, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52733209, + "ObservedEvents": 10000, + "VerificationNS": 72164750, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10156372916, + "DrainNS": 156372916, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 984.6034684534225, + "ack_latency": { + "p50_ns": 23469042, + "p95_ns": 28970625, + "p99_ns": 30476958 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 53638000, + "p95_ns": 80472000, + "p99_ns": 100057000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "eadbca0880f03ebebcb91c90e63dd16be101291dfc6a586fa230f25773790573", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "eadbca0880f03ebebcb91c90e63dd16be101291dfc6a586fa230f25773790573", + "stored": "eadbca0880f03ebebcb91c90e63dd16be101291dfc6a586fa230f25773790573" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-burst-attempt-1.json.gz", + "SHA256": "48d3ec24fe8f514129a24bd406c467fdba04bfc1b4cb91fad05fcd9e8b3a7797", + "Size": 193068, + "RawBytes": 842064 + } + } + ], + "ErrorClass": "" + }, + "pipeline-concurrency-64": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-64-attempt-1.json.gz", + "SHA256": "3b4805c791406fa04b7cf7cc97aadb767f2221e3e164138be68353eef6b27b34", + "Size": 805253, + "RawBytes": 4883440 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 64, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-concurrency-64", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9992, + "AcceptedAfterWindow": 8, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 1059498763, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50568542, + "ObservedEvents": 10000, + "VerificationNS": 54987750, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 16, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 92, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10127980292, + "DrainNS": 127980292, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999.2, + "PersistedEPS": 987.3636906559652, + "ack_latency": { + "p50_ns": 11952208, + "p95_ns": 19577250, + "p99_ns": 33015084 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50189000, + "p95_ns": 86181000, + "p99_ns": 112698000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "38e6d6aaf51193e81bf2fae24476cc7e429e5bdfdd90e477c63dd8e7084ddb7a", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "38e6d6aaf51193e81bf2fae24476cc7e429e5bdfdd90e477c63dd8e7084ddb7a", + "stored": "38e6d6aaf51193e81bf2fae24476cc7e429e5bdfdd90e477c63dd8e7084ddb7a" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9991, + "AcceptedAfterWindow": 9, + "ObserverPolls": 199, + "ObserverQueries": 797, + "ObserverQueryNS": 1299098215, + "ObserverLatePolls": 1, + "ObserverMaxGapNS": 204300834, + "ObservedEvents": 10000, + "VerificationNS": 61925541, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements", + "observer_poll_delays" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 2, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 96, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10146946333, + "DrainNS": 146946333, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999.1, + "PersistedEPS": 985.5181718541173, + "ack_latency": { + "p50_ns": 12832167, + "p95_ns": 21195000, + "p99_ns": 34648917 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 60236000, + "p95_ns": 109429000, + "p99_ns": 205870000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a4bb69d5d379579fb6c54e54200a5de260163ea2a16d3af29ca07ace9c00524e", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a4bb69d5d379579fb6c54e54200a5de260163ea2a16d3af29ca07ace9c00524e", + "stored": "a4bb69d5d379579fb6c54e54200a5de260163ea2a16d3af29ca07ace9c00524e" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 9938, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9930, + "AcceptedAfterWindow": 8, + "ObserverPolls": 202, + "ObserverQueries": 799, + "ObserverQueryNS": 1273894953, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50724416, + "ObservedEvents": 9938, + "VerificationNS": 60112792, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 9938, + "Accepted": 9938, + "Persisted": 9938, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 62, + "LateSchedules": 3, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 59, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10133823375, + "DrainNS": 133823375, + "PollIntervalNS": 50000000, + "AcceptedEPS": 993, + "PersistedEPS": 980.6762593195483, + "ack_latency": { + "p50_ns": 16366458, + "p95_ns": 37419042, + "p99_ns": 194021750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 80078000, + "p95_ns": 225583000, + "p99_ns": 347265000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "42d0510b084ce598cbb558e990c188aa75792be709fbec0a45369e7d85a62ad1", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "42d0510b084ce598cbb558e990c188aa75792be709fbec0a45369e7d85a62ad1", + "stored": "42d0510b084ce598cbb558e990c188aa75792be709fbec0a45369e7d85a62ad1" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-64-attempt-1.json.gz", + "SHA256": "3b4805c791406fa04b7cf7cc97aadb767f2221e3e164138be68353eef6b27b34", + "Size": 805253, + "RawBytes": 4883440 + } + } + ], + "ErrorClass": "" + }, + "pipeline-concurrency-8": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-8-attempt-1.json.gz", + "SHA256": "695927c9bf4a3ba2130b46ba69a70005e86371003907d9bd7e0570e119448986", + "Size": 346758, + "RawBytes": 2306347 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 8, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-concurrency-8", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4664, + "AttemptedAfterWindow": 16, + "AcceptedInWindow": 4656, + "AcceptedAfterWindow": 24, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 868204792, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 57010208, + "ObservedEvents": 4680, + "VerificationNS": 34447959, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 4680, + "Accepted": 4680, + "Persisted": 4680, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5320, + "LateSchedules": 347, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 23, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10103449208, + "DrainNS": 103449208, + "PollIntervalNS": 50000000, + "AcceptedEPS": 465.6, + "PersistedEPS": 463.2081483909807, + "ack_latency": { + "p50_ns": 16892500, + "p95_ns": 20806292, + "p99_ns": 24802458 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 49042000, + "p95_ns": 72651000, + "p99_ns": 78395000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6fb24a230ed9cd1e487b08145cfd6887cce91fbfc93f11a769afba5e3e6fc15f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "6fb24a230ed9cd1e487b08145cfd6887cce91fbfc93f11a769afba5e3e6fc15f", + "stored": "6fb24a230ed9cd1e487b08145cfd6887cce91fbfc93f11a769afba5e3e6fc15f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4629, + "AttemptedAfterWindow": 15, + "AcceptedInWindow": 4621, + "AcceptedAfterWindow": 23, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 921277883, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52856750, + "ObservedEvents": 4644, + "VerificationNS": 39858083, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 4644, + "Accepted": 4644, + "Persisted": 4644, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5356, + "LateSchedules": 319, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 24, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10156855917, + "DrainNS": 156855917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 462.1, + "PersistedEPS": 457.22810660601397, + "ack_latency": { + "p50_ns": 17080416, + "p95_ns": 20865125, + "p99_ns": 24262708 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 47671000, + "p95_ns": 71461000, + "p99_ns": 77511000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a17f07dae4776aa25b6b3b757f2b28cd6517bbaaffbdbd6471ab360bf09e5096", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a17f07dae4776aa25b6b3b757f2b28cd6517bbaaffbdbd6471ab360bf09e5096", + "stored": "a17f07dae4776aa25b6b3b757f2b28cd6517bbaaffbdbd6471ab360bf09e5096" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4476, + "AttemptedAfterWindow": 16, + "AcceptedInWindow": 4468, + "AcceptedAfterWindow": 24, + "ObserverPolls": 202, + "ObserverQueries": 807, + "ObserverQueryNS": 917737375, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 61503584, + "ObservedEvents": 4492, + "VerificationNS": 36307917, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 4492, + "Accepted": 4492, + "Persisted": 4492, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5508, + "LateSchedules": 557, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 19, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10100649917, + "DrainNS": 100649917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 446.8, + "PersistedEPS": 444.7238580598358, + "ack_latency": { + "p50_ns": 17256666, + "p95_ns": 22242750, + "p99_ns": 29948041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50507000, + "p95_ns": 90682000, + "p99_ns": 161448000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "c58f176dbe884911af66aa0d19ff8a87b10fd90c835924b63f673b8319fcc8f6", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "c58f176dbe884911af66aa0d19ff8a87b10fd90c835924b63f673b8319fcc8f6", + "stored": "c58f176dbe884911af66aa0d19ff8a87b10fd90c835924b63f673b8319fcc8f6" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-8-attempt-1.json.gz", + "SHA256": "695927c9bf4a3ba2130b46ba69a70005e86371003907d9bd7e0570e119448986", + "Size": 346758, + "RawBytes": 2306347 + } + } + ], + "ErrorClass": "" + }, + "pipeline-payload-1024": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-1024-attempt-1.json.gz", + "SHA256": "01b7d19d8709a090d2c68a0a8ff9414b9e2ee0c65ee3e567528cc39d906a3506", + "Size": 279822, + "RawBytes": 1222115 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-payload-1024", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 1024, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 200, + "ObserverQueries": 799, + "ObserverQueryNS": 2315790535, + "ObserverLatePolls": 1, + "ObserverMaxGapNS": 166389792, + "ObservedEvents": 10000, + "VerificationNS": 129220542, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements", + "observer_poll_delays" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 2, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 64, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10209711083, + "DrainNS": 209711083, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 979.4596456946578, + "ack_latency": { + "p50_ns": 17631209, + "p95_ns": 33324167, + "p99_ns": 143688584 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 76401000, + "p95_ns": 130131000, + "p99_ns": 252783000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "1faa545fa91f92394aab9f56717366b7b68b1db3f781abda377e4c384403d664", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "1faa545fa91f92394aab9f56717366b7b68b1db3f781abda377e4c384403d664", + "stored": "1faa545fa91f92394aab9f56717366b7b68b1db3f781abda377e4c384403d664" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 799, + "ObserverQueryNS": 1911043549, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54348667, + "ObservedEvents": 10000, + "VerificationNS": 130668708, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 73, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10210468209, + "DrainNS": 210468209, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 979.3870168642724, + "ack_latency": { + "p50_ns": 18195875, + "p95_ns": 74396584, + "p99_ns": 273341792 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 90939000, + "p95_ns": 255112000, + "p99_ns": 419235000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "ea70823466af37724eec5348d5cd63c51ff4b2e325f173d0c1ae0425df1de14b", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "ea70823466af37724eec5348d5cd63c51ff4b2e325f173d0c1ae0425df1de14b", + "stored": "ea70823466af37724eec5348d5cd63c51ff4b2e325f173d0c1ae0425df1de14b" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 2046380626, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55341792, + "ObservedEvents": 10000, + "VerificationNS": 133545875, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 106, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10267597875, + "DrainNS": 267597875, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 973.9376358270166, + "ack_latency": { + "p50_ns": 17675000, + "p95_ns": 25097625, + "p99_ns": 30296000 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 93973000, + "p95_ns": 129984000, + "p99_ns": 149228000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a26ba381ca144d65b9926371c581a1303107d239964fbff5158b0d3062b63b23", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a26ba381ca144d65b9926371c581a1303107d239964fbff5158b0d3062b63b23", + "stored": "a26ba381ca144d65b9926371c581a1303107d239964fbff5158b0d3062b63b23" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-1024-attempt-1.json.gz", + "SHA256": "01b7d19d8709a090d2c68a0a8ff9414b9e2ee0c65ee3e567528cc39d906a3506", + "Size": 279822, + "RawBytes": 1222115 + } + } + ], + "ErrorClass": "" + }, + "pipeline-payload-16384": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-16384-attempt-1.json.gz", + "SHA256": "089fe775ffeff87e6d58c3c74420b6c923eff8418992d77edcdfad35bed3bfe0", + "Size": 277957, + "RawBytes": 1320093 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-payload-16384", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 16384, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9980, + "AcceptedAfterWindow": 20, + "ObserverPolls": 203, + "ObserverQueries": 811, + "ObserverQueryNS": 3554249218, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56773291, + "ObservedEvents": 10000, + "VerificationNS": 1537807208, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 155, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 11667406458, + "DrainNS": 1667406458, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998, + "PersistedEPS": 857.0885085728107, + "ack_latency": { + "p50_ns": 32645250, + "p95_ns": 49532834, + "p99_ns": 66846833 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 165908000, + "p95_ns": 251744000, + "p99_ns": 298241000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "bbeaa26980000eb3ed348b61d1bddffc1874a78c407c442d202cfdb4daaac58f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "bbeaa26980000eb3ed348b61d1bddffc1874a78c407c442d202cfdb4daaac58f", + "stored": "bbeaa26980000eb3ed348b61d1bddffc1874a78c407c442d202cfdb4daaac58f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9810, + "AcceptedAfterWindow": 30, + "ObserverPolls": 801, + "ObserverQueries": 2602, + "ObserverQueryNS": 9849943194, + "ObserverLatePolls": 1, + "ObserverMaxGapNS": 104266042, + "ObservedEvents": 9840, + "VerificationNS": 1534999292, + "AmbiguousUnobserved": 160, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "ambiguous_delivery", + "late_acknowledgements", + "observer_poll_delays" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 9840, + "Persisted": 9840, + "Ambiguous": 160, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 105, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 41639454916, + "DrainNS": 31639454916, + "PollIntervalNS": 50000000, + "AcceptedEPS": 981, + "PersistedEPS": 236.31433264077071, + "ack_latency": { + "p50_ns": 30993667, + "p95_ns": 60628667, + "p99_ns": 164553792 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 144310000, + "p95_ns": 270529000, + "p99_ns": 379990000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6e2467c28274a9cb5d48e9f522b4b1ee15fdd462debaf066026807208fe6312a", + "ambiguous": "1e71c64d46ad4e72cc6e4e1aa23fdbc1ca35218c461a9a5345db551f9c1fb871", + "attempted": "b7ff877cae2650875847ab17dc33b8d9f6ec312c66cd757115ddacb2905ec2ad", + "stored": "6e2467c28274a9cb5d48e9f522b4b1ee15fdd462debaf066026807208fe6312a" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9970, + "AcceptedAfterWindow": 30, + "ObserverPolls": 205, + "ObserverQueries": 819, + "ObserverQueryNS": 3118497591, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59763834, + "ObservedEvents": 10000, + "VerificationNS": 1578969209, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 150, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 11816684666, + "DrainNS": 1816684666, + "PollIntervalNS": 50000000, + "AcceptedEPS": 997, + "PersistedEPS": 846.2610522876079, + "ack_latency": { + "p50_ns": 29359708, + "p95_ns": 42912917, + "p99_ns": 74574041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 116596000, + "p95_ns": 179641000, + "p99_ns": 223676000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6bd955c0f288e0c4a455c4f9d1f2ec761e27e257ddb3e382b06ed5e5fce43072", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "6bd955c0f288e0c4a455c4f9d1f2ec761e27e257ddb3e382b06ed5e5fce43072", + "stored": "6bd955c0f288e0c4a455c4f9d1f2ec761e27e257ddb3e382b06ed5e5fce43072" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-16384-attempt-1.json.gz", + "SHA256": "089fe775ffeff87e6d58c3c74420b6c923eff8418992d77edcdfad35bed3bfe0", + "Size": 277957, + "RawBytes": 1320093 + } + } + ], + "ErrorClass": "" + }, + "pipeline-rate-100": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-100-attempt-1.json.gz", + "SHA256": "d5b8a0a5b13c10871963126b4d6d045b5b984bae9061544e72b6621d61022d8b", + "Size": 15245, + "RawBytes": 154278 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-rate-100", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 100, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 616, + "ObserverQueryNS": 1412151791, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53716167, + "ObservedEvents": 1000, + "VerificationNS": 23246792, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10056681458, + "DrainNS": 56681458, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.43638009977029, + "ack_latency": { + "p50_ns": 29306250, + "p95_ns": 57133417, + "p99_ns": 57133417 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 49396000, + "p95_ns": 97180000, + "p99_ns": 97180000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a39baad91259e848cb4bcf925fb71d86dcf297f00fdfce8e3f40b78958dc0700", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a39baad91259e848cb4bcf925fb71d86dcf297f00fdfce8e3f40b78958dc0700", + "stored": "a39baad91259e848cb4bcf925fb71d86dcf297f00fdfce8e3f40b78958dc0700" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 614, + "ObserverQueryNS": 1096637540, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55205667, + "ObservedEvents": 1000, + "VerificationNS": 14449042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10030758458, + "DrainNS": 30758458, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.6933586016572, + "ack_latency": { + "p50_ns": 31437458, + "p95_ns": 53508542, + "p99_ns": 53508542 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 48196000, + "p95_ns": 92489000, + "p99_ns": 92489000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "40e129d1dee9fe95c8070c5f9f5901946d22c1bdd9d89c3882d2499a5c89e45f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "40e129d1dee9fe95c8070c5f9f5901946d22c1bdd9d89c3882d2499a5c89e45f", + "stored": "40e129d1dee9fe95c8070c5f9f5901946d22c1bdd9d89c3882d2499a5c89e45f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 614, + "ObserverQueryNS": 1208049800, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52978417, + "ObservedEvents": 1000, + "VerificationNS": 22623875, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10050236750, + "DrainNS": 50236750, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.5001436160198, + "ack_latency": { + "p50_ns": 45352333, + "p95_ns": 64470875, + "p99_ns": 64470875 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 87878000, + "p95_ns": 95835000, + "p99_ns": 95835000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "99c0f659f3346796cdd12c434ff746210999cb055a8f367ca98d294246850ad2", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "99c0f659f3346796cdd12c434ff746210999cb055a8f367ca98d294246850ad2", + "stored": "99c0f659f3346796cdd12c434ff746210999cb055a8f367ca98d294246850ad2" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-100-attempt-1.json.gz", + "SHA256": "d5b8a0a5b13c10871963126b4d6d045b5b984bae9061544e72b6621d61022d8b", + "Size": 15245, + "RawBytes": 154278 + } + } + ], + "ErrorClass": "" + }, + "pipeline-rate-10000": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-10000-attempt-1.json.gz", + "SHA256": "25c36e1aead7df226fa50ae19ccaaf852cad122d5d69d916748f52e06bbfea34", + "Size": 2068866, + "RawBytes": 8793012 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-rate-10000", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 10000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 4929831872, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 65014375, + "ObservedEvents": 100000, + "VerificationNS": 521306208, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 7, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1071, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10755272917, + "DrainNS": 755272917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9990, + "PersistedEPS": 9297.764991340944, + "ack_latency": { + "p50_ns": 21707416, + "p95_ns": 30596958, + "p99_ns": 37887750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 116567000, + "p95_ns": 156221000, + "p99_ns": 173321000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "031ae9596441400d26ec155766cd1b41d0f3119aa4cf818704341bf55d53f631", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "031ae9596441400d26ec155766cd1b41d0f3119aa4cf818704341bf55d53f631", + "stored": "031ae9596441400d26ec155766cd1b41d0f3119aa4cf818704341bf55d53f631" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 98800, + "AcceptedAfterWindow": 200, + "ObserverPolls": 801, + "ObserverQueries": 2603, + "ObserverQueryNS": 19514360453, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55419500, + "ObservedEvents": 99000, + "VerificationNS": 566624000, + "AmbiguousUnobserved": 1000, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "ambiguous_delivery", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 99000, + "Persisted": 99000, + "Ambiguous": 1000, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 3, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1106, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 40769246709, + "DrainNS": 30769246709, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9880, + "PersistedEPS": 2428.3009373863483, + "ack_latency": { + "p50_ns": 21705834, + "p95_ns": 30252459, + "p99_ns": 189399292 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 119827000, + "p95_ns": 173500000, + "p99_ns": 361948000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "3cc4ab61db661bb749f269f2c82a235bb0d0f7b72d81f2f8293430165dffd67c", + "ambiguous": "59270fa3fb79e3e9a780aa6e856c810436e2703066bf42d468a82b66d16c421b", + "attempted": "f0ef40210d7e15c123dd9e5ba987682141fc10907699b94cf3cd193aef8572a1", + "stored": "3cc4ab61db661bb749f269f2c82a235bb0d0f7b72d81f2f8293430165dffd67c" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 5105126368, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 57199042, + "ObservedEvents": 100000, + "VerificationNS": 539930666, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 4, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 933, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10786179917, + "DrainNS": 786179917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9990, + "PersistedEPS": 9271.122934115989, + "ack_latency": { + "p50_ns": 20515917, + "p95_ns": 27575458, + "p99_ns": 31903166 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 104255000, + "p95_ns": 134913000, + "p99_ns": 146419000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "68e51ff5108c09fc005c043602985515d318bf5e072f7486b897f5e802576536", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "68e51ff5108c09fc005c043602985515d318bf5e072f7486b897f5e802576536", + "stored": "68e51ff5108c09fc005c043602985515d318bf5e072f7486b897f5e802576536" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-10000-attempt-1.json.gz", + "SHA256": "25c36e1aead7df226fa50ae19ccaaf852cad122d5d69d916748f52e06bbfea34", + "Size": 2068866, + "RawBytes": 8793012 + } + } + ], + "ErrorClass": "" + }, + "pipeline-rate-5000": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-5000-attempt-1.json.gz", + "SHA256": "7c223db858877cc5ebf8451ff010cba41e7a1adc705573e8c47d622abc077f2d", + "Size": 1024403, + "RawBytes": 4275212 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "a966020c-1625-4bea-a08d-b0a83bf05c46/pipeline-rate-5000", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 5000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 2498268169, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 60602000, + "ObservedEvents": 50000, + "VerificationNS": 269671041, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 340, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10409429541, + "DrainNS": 409429541, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4803.337186064152, + "ack_latency": { + "p50_ns": 22720083, + "p95_ns": 27901208, + "p99_ns": 31580083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 67294000, + "p95_ns": 97646000, + "p99_ns": 112613000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "13cf29fd427ee671f53289b43b26fb3d515e7000c841c808094d3f87b98f1b9b", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "13cf29fd427ee671f53289b43b26fb3d515e7000c841c808094d3f87b98f1b9b", + "stored": "13cf29fd427ee671f53289b43b26fb3d515e7000c841c808094d3f87b98f1b9b" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 2635250948, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 87139334, + "ObservedEvents": 50000, + "VerificationNS": 265332458, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 269, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10403389666, + "DrainNS": 403389666, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4806.125849866826, + "ack_latency": { + "p50_ns": 22725667, + "p95_ns": 27968333, + "p99_ns": 34950916 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 68517000, + "p95_ns": 99180000, + "p99_ns": 113109000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "13ca2e506f40cc1bea89768bd7e1c2a4918c102cf1256a8c2e15f4d0ea198cf0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "13ca2e506f40cc1bea89768bd7e1c2a4918c102cf1256a8c2e15f4d0ea198cf0", + "stored": "13ca2e506f40cc1bea89768bd7e1c2a4918c102cf1256a8c2e15f4d0ea198cf0" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 3031005509, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59013875, + "ObservedEvents": 50000, + "VerificationNS": 280892625, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 467, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10473994916, + "DrainNS": 473994916, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4773.727732445273, + "ack_latency": { + "p50_ns": 23884500, + "p95_ns": 32605250, + "p99_ns": 50233792 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 96633000, + "p95_ns": 177822000, + "p99_ns": 262485000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "517e0fd1ab738307f1396ee1635e36a2727f02155c9d2dd25f5a4bcfd912f6aa", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "517e0fd1ab738307f1396ee1635e36a2727f02155c9d2dd25f5a4bcfd912f6aa", + "stored": "517e0fd1ab738307f1396ee1635e36a2727f02155c9d2dd25f5a4bcfd912f6aa" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-5000-attempt-1.json.gz", + "SHA256": "7c223db858877cc5ebf8451ff010cba41e7a1adc705573e8c47d622abc077f2d", + "Size": 1024403, + "RawBytes": 4275212 + } + } + ], + "ErrorClass": "" + }, + "recovery-consumer": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-consumer-attempt-1.json.gz", + "SHA256": "488d6e2d1297fe33509dbd92de24152a92758eceba0b0bebc65973c808b36146", + "Size": 149845, + "RawBytes": 722652 + }, + "Summary": { + "Kind": "consumer", + "Runs": [ + { + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3000828166, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:34.566924Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3776849208, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:35.342945Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 5002222333, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:01:36.568317Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 7655887916, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:01:39.221982Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 941, + "ObserverQueryNS": 1763761370, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55528334, + "ObservedEvents": 7500, + "VerificationNS": 59759625, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15098734083, + "DrainNS": 98734083, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 496.7303853933302, + "ack_latency": { + "p50_ns": 27365209, + "p95_ns": 49788000, + "p99_ns": 87591750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2599833000, + "p95_ns": 9301563000, + "p99_ns": 9903359000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "ecb94a216ac397c123c1b8145d517c82c7c7fbe7c644930976bff9ff86372646", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "ecb94a216ac397c123c1b8145d517c82c7c7fbe7c644930976bff9ff86372646", + "stored": "ecb94a216ac397c123c1b8145d517c82c7c7fbe7c644930976bff9ff86372646" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3001287417, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:49.789925Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3799946917, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:50.588584Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 5002330083, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:01:51.790966Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 7760282333, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:01:54.548918Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 939, + "ObserverQueryNS": 1694091881, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52461250, + "ObservedEvents": 7500, + "VerificationNS": 41648583, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15067593583, + "DrainNS": 67593583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.7569881140057, + "ack_latency": { + "p50_ns": 26456125, + "p95_ns": 48078916, + "p99_ns": 58318125 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2598574000, + "p95_ns": 9302351000, + "p99_ns": 9903396000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "2f56ccea9892c5857df332bad3d80547df690032ca18e1856aeee7b5f7426695", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "2f56ccea9892c5857df332bad3d80547df690032ca18e1856aeee7b5f7426695", + "stored": "2f56ccea9892c5857df332bad3d80547df690032ca18e1856aeee7b5f7426695" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3000689791, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:02:04.968056Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3817526375, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:02:05.784892Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 5002106000, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:02:06.969471Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 7776916125, + "PlannedNS": 5000000000, + "At": "2026-11-03T23:02:09.74428Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 940, + "ObserverQueryNS": 1623068167, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54497000, + "ObservedEvents": 7500, + "VerificationNS": 52271500, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15076663041, + "DrainNS": 76663041, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.45755938195606, + "ack_latency": { + "p50_ns": 26974000, + "p95_ns": 44132750, + "p99_ns": 67358000 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2603715000, + "p95_ns": 9302912000, + "p99_ns": 9904452000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "3f74231e17e3aacc8a1a7b040f6759acefe66c8647c1e5c1cd45215f1d1ccf32", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "3f74231e17e3aacc8a1a7b040f6759acefe66c8647c1e5c1cd45215f1d1ccf32", + "stored": "3f74231e17e3aacc8a1a7b040f6759acefe66c8647c1e5c1cd45215f1d1ccf32" + }, + "backlog": null, + "correct": true + } + } + ], + "Notes": [ + "Availability experiment; not a capacity estimate. Actual control timestamps and reconciled ID sets are retained.", + "A forced consumer kill does not claim to land in every database/offset commit window; the deterministic crash regression remains separate." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-consumer-attempt-1.json.gz", + "SHA256": "488d6e2d1297fe33509dbd92de24152a92758eceba0b0bebc65973c808b36146", + "Size": 149845, + "RawBytes": 722652 + } + } + ], + "ErrorClass": "" + }, + "recovery-database": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-database-attempt-1.json.gz", + "SHA256": "ccd4ac476583ca53ef0987d3ba2916d8eaf2251cf7191df20a9ddd180e689828", + "Size": 154715, + "RawBytes": 710547 + }, + "Summary": { + "Kind": "database", + "Runs": [ + { + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3002409542, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:00:46.144311Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 4277792167, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:00:47.419693Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8003307875, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:00:51.145207Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8907949250, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:00:52.049848Z" + } + ], + "Pipeline": { + "ObserverOutages": 106, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 656, + "ObserverQueryNS": 1583766246, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 63554583, + "ObservedEvents": 7500, + "VerificationNS": 43808042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 1, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15061655042, + "DrainNS": 61655042, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.9532447852486, + "ack_latency": { + "p50_ns": 29510709, + "p95_ns": 55691500, + "p99_ns": 73152458 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 91341000, + "p95_ns": 4659266000, + "p99_ns": 5259990000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "79fee54214110d3516816c4bc0044f5db5f50775c0175957b9f2dcc86388b1da", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "79fee54214110d3516816c4bc0044f5db5f50775c0175957b9f2dcc86388b1da", + "stored": "79fee54214110d3516816c4bc0044f5db5f50775c0175957b9f2dcc86388b1da" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3002153250, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:01.318026Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3887184750, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:02.203058Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8004299042, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:01:06.32017Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8800094042, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:01:07.115964Z" + } + ], + "Pipeline": { + "ObserverOutages": 106, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 643, + "ObserverQueryNS": 1704823506, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55428500, + "ObservedEvents": 7500, + "VerificationNS": 61648417, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 2, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15095050042, + "DrainNS": 95050042, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 496.8516155383541, + "ack_latency": { + "p50_ns": 30175833, + "p95_ns": 52860208, + "p99_ns": 67618708 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 104940000, + "p95_ns": 6652309000, + "p99_ns": 7199234000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "b36f39db12a5716ff22b6ad1f1487eab0ab2f01db0b0296f8aebc5926178497d", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "b36f39db12a5716ff22b6ad1f1487eab0ab2f01db0b0296f8aebc5926178497d", + "stored": "b36f39db12a5716ff22b6ad1f1487eab0ab2f01db0b0296f8aebc5926178497d" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3002071958, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:16.525348Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 4029136875, + "PlannedNS": 3000000000, + "At": "2026-11-03T23:01:17.552413Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8001195125, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:01:21.524469Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8912095333, + "PlannedNS": 8000000000, + "At": "2026-11-03T23:01:22.435369Z" + } + ], + "Pipeline": { + "ObserverOutages": 106, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 648, + "ObserverQueryNS": 1443504755, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54056459, + "ObservedEvents": 7500, + "VerificationNS": 56885125, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 3, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15097772708, + "DrainNS": 97772708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 496.76201550086284, + "ack_latency": { + "p50_ns": 27669625, + "p95_ns": 51285500, + "p99_ns": 53406375 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 89619000, + "p95_ns": 5001118000, + "p99_ns": 5390681000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "523827722d7636042b394c3df0626a6bd95f7d83a15d0370ee8d3c293315bad1", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "523827722d7636042b394c3df0626a6bd95f7d83a15d0370ee8d3c293315bad1", + "stored": "523827722d7636042b394c3df0626a6bd95f7d83a15d0370ee8d3c293315bad1" + }, + "backlog": null, + "correct": true + } + } + ], + "Notes": [ + "Availability experiment; not a capacity estimate. Actual control timestamps and reconciled ID sets are retained.", + "A forced consumer kill does not claim to land in every database/offset commit window; the deterministic crash regression remains separate." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-database-attempt-1.json.gz", + "SHA256": "ccd4ac476583ca53ef0987d3ba2916d8eaf2251cf7191df20a9ddd180e689828", + "Size": 154715, + "RawBytes": 710547 + } + } + ], + "ErrorClass": "" + }, + "recovery-outbox": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-outbox-attempt-1.json.gz", + "SHA256": "1aa212d094807e13e955b79c7c8f131ea189bcbe4dd7af0f8868d0a6c5133b48", + "Size": 8574, + "RawBytes": 39472 + }, + "Summary": { + "Kind": "outbox", + "Runs": [ + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5103591833, + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 166, + "PlannedNS": 0, + "At": "2026-11-03T23:02:20.021896Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 1037246500, + "PlannedNS": 0, + "At": "2026-11-03T23:02:21.059142Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 9039442125, + "PlannedNS": 9037256083, + "At": "2026-11-03T23:02:29.064652Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 9800852541, + "PlannedNS": 0, + "At": "2026-11-03T23:02:29.826365Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 1037253708, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 6140916750, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 12810712458, + "Pending": 0, + "Acknowledged": 100 + } + ] + }, + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5094561083, + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 167, + "PlannedNS": 0, + "At": "2026-11-03T23:02:40.513924Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 840562042, + "PlannedNS": 0, + "At": "2026-11-03T23:02:41.354645Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8842522042, + "PlannedNS": 8840572709, + "At": "2026-11-03T23:02:49.357764Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 9624146542, + "PlannedNS": 0, + "At": "2026-11-03T23:02:50.139472Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 840568000, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 5935157292, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 10561121459, + "Pending": 0, + "Acknowledged": 100 + } + ] + }, + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5104990458, + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 166, + "PlannedNS": 0, + "At": "2026-11-03T23:03:00.716783Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 861221666, + "PlannedNS": 0, + "At": "2026-11-03T23:03:01.57805Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8863575916, + "PlannedNS": 8861236791, + "At": "2026-11-03T23:03:09.580727Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 9664142416, + "PlannedNS": 0, + "At": "2026-11-03T23:03:10.381316Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 861233083, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 5966276500, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 12688371000, + "Pending": 0, + "Acknowledged": 100 + } + ] + } + ], + "Notes": [ + "One untimed warm-up order before three measured broker outages.100 pending local events per repetition; the first one-attempt dispatch exceeds the broker publish timeout.", + "Pending-local samples are observations after commands, not exact transition times. HTTP ACK still precedes PostgreSQL persistence." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-outbox-attempt-1.json.gz", + "SHA256": "1aa212d094807e13e955b79c7c8f131ea189bcbe4dd7af0f8868d0a6c5133b48", + "Size": 8574, + "RawBytes": 39472 + } + } + ], + "ErrorClass": "" + } + } +} diff --git a/benchmarks/results/selfhost-2026-11-04/manifest-1.json b/benchmarks/results/selfhost-2026-11-04/manifest-1.json new file mode 100644 index 0000000..8931e05 --- /dev/null +++ b/benchmarks/results/selfhost-2026-11-04/manifest-1.json @@ -0,0 +1,64 @@ +{ + "broker_fsync_bypass": false, + "captured_at": "2026-11-03T22:47:37.763437Z", + "source_sha": "213e4cc50523882f0d0cf7533d064494387d3207", + "source_dirty": false, + "host": { + "architecture": "arm64", + "compose": "Docker Compose version v5.5.0", + "cpu": "Apple M1 Max", + "disk_space": "Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on\n/dev/disk3s5 971350180 804179840 102108224 89% 5247824 1021082240 1% /System/Volumes/Data", + "docker": "{\"Platform\":{\"Name\":\"Docker Engine - Community\"},\"Version\":\"29.8.2\",\"ApiVersion\":\"1.56\",\"MinAPIVersion\":\"1.40\",\"Os\":\"linux\",\"Arch\":\"arm64\",\"Components\":[{\"Name\":\"Engine\",\"Version\":\"29.8.2\",\"Details\":{\"ApiVersion\":\"1.56\",\"Arch\":\"arm64\",\"BuildTime\":\"Wed Sep 30 19:32:49 2026\",\"Experimental\":\"true\",\"GitCommit\":\"8af9fe3\",\"GoVersion\":\"go1.26.8\",\"KernelVersion\":\"7.2.12-orbstack-00394-gbecdd6130068\",\"MinAPIVersion\":\"1.40\",\"Module\":\"github.com/moby/moby/v2\",\"ModuleVersion\":\"v2.0.0+unknown\",\"Os\":\"linux\"}},{\"Name\":\"containerd\",\"Version\":\"v2.3.6\",\"Details\":{\"GitCommit\":\"ee2735368117d2eb259779949d5e75cdafec9761\"}},{\"Name\":\"runc\",\"Version\":\"1.5.2\",\"Details\":{\"GitCommit\":\"29dd3dc2b13b4123162e5fe132504bb4b15569f1\"}},{\"Name\":\"docker-init\",\"Version\":\"0.19.0\",\"Details\":{\"GitCommit\":\"de40ad0\"}}],\"GitCommit\":\"8af9fe3\",\"GoVersion\":\"go1.26.8\",\"KernelVersion\":\"7.2.12-orbstack-00394-gbecdd6130068\",\"Experimental\":true,\"BuildTime\":\"2026-09-30T19:32:49.000000000+00:00\"}", + "docker_vm": "CPUs=10 MemoryBytes=16818991104 StorageDriver=overlayfs Kernel=7.2.12-orbstack-00394-gbecdd6130068 OS=OrbStack", + "generator_logical_cpus": "10", + "go": "go1.26.5", + "kernel": "Darwin 25.5.0", + "memory_bytes": "68719476736", + "os": "darwin", + "os_version": "ProductName:\t\tmacOS\nProductVersion:\t\t26.5.2\nBuildVersion:\t\t25F84" + }, + "database": { + "fsync": "on", + "full_page_writes": "on", + "indexes": "CREATE UNIQUE INDEX events_pkey ON ingestkit.events USING btree (tenant_id, event_id)\nCREATE INDEX events_received_at ON ingestkit.events USING btree (received_at)", + "max_connections": "100", + "server_version": "18.6", + "synchronous_commit": "on", + "wal_level": "replica" + }, + "Images": "sha256:d4ee09665e8dd58e9f9a894eeca74466ba658b62c8776a43aa7e73ee5dc6773b [\"ingestkit-study-bf5ffffa-consumer@sha256:d4ee09665e8dd58e9f9a894eeca74466ba658b62c8776a43aa7e73ee5dc6773b\"]\nsha256:76cc2074cb6642631f34a898ced71e6aeaa6b1a4d78c4daa743275a22e0c5be7 [\"migrate/migrate@sha256:76cc2074cb6642631f34a898ced71e6aeaa6b1a4d78c4daa743275a22e0c5be7\"]\nsha256:8b1076e0d61bfceb66594dc01536427ce0b529f8ead35fdab9763ab6085891ce [\"docker.redpanda.com/redpandadata/redpanda@sha256:8b1076e0d61bfceb66594dc01536427ce0b529f8ead35fdab9763ab6085891ce\"]\nsha256:e70b164da81ef698b3ad19af799ea6086ce6d9e48ed4079eb9fe26f6fbf14ee5 [\"caddy@sha256:e70b164da81ef698b3ad19af799ea6086ce6d9e48ed4079eb9fe26f6fbf14ee5\"]\nsha256:10a5c69a83035ab5239f5620d708520e8b28f5aa1f2b20143e6024532edadfb5 [\"postgres@sha256:10a5c69a83035ab5239f5620d708520e8b28f5aa1f2b20143e6024532edadfb5\"]\nsha256:99555a32c8fcbea66494170e16f8875b9547b35a54b8e7f1fdeeea96d289da69 [\"ingestkit-study-bf5ffffa-api@sha256:99555a32c8fcbea66494170e16f8875b9547b35a54b8e7f1fdeeea96d289da69\"]\n", + "TopicConfiguration": "SUMMARY\n=======\nNAME ingestkit.events\nPARTITIONS 3\nREPLICAS 1\n\nCONFIGS\n=======\nKEY VALUE SOURCE\ncleanup.policy delete DEFAULT_CONFIG\ncompression.type producer DEFAULT_CONFIG\ndelete.retention.ms -1 DEFAULT_CONFIG\nflush.bytes 262144 DEFAULT_CONFIG\nflush.ms 100 DEFAULT_CONFIG\ninitial.retention.local.target.bytes -1 DEFAULT_CONFIG\ninitial.retention.local.target.ms -1 DEFAULT_CONFIG\nmax.compaction.lag.ms 9223372036854 DEFAULT_CONFIG\nmax.message.bytes 524288 DYNAMIC_TOPIC_CONFIG\nmessage.timestamp.after.max.ms 3600000 DEFAULT_CONFIG\nmessage.timestamp.before.max.ms 9223372036854 DEFAULT_CONFIG\nmessage.timestamp.type CreateTime DEFAULT_CONFIG\nmin.cleanable.dirty.ratio 0.5 DEFAULT_CONFIG\nmin.compaction.lag.ms 0 DEFAULT_CONFIG\nredpanda.iceberg.mode disabled DEFAULT_CONFIG\nredpanda.leaders.preference none DEFAULT_CONFIG\nredpanda.remote.allowgaps false DEFAULT_CONFIG\nredpanda.remote.delete true DEFAULT_CONFIG\nredpanda.remote.read false DEFAULT_CONFIG\nredpanda.remote.write false DEFAULT_CONFIG\nredpanda.schema.registry.context . DEFAULT_CONFIG\nredpanda.storage.mode unset DEFAULT_CONFIG\nredpanda.storage.mode.impl unset DEFAULT_CONFIG\nretention.bytes -1 DEFAULT_CONFIG\nretention.local.target.bytes -1 DEFAULT_CONFIG\nretention.local.target.ms 86400000 DEFAULT_CONFIG\nretention.ms 604800000 DYNAMIC_TOPIC_CONFIG\nsegment.bytes 134217728 DEFAULT_CONFIG\nsegment.ms 1209600000 DEFAULT_CONFIG\nwrite.caching false DYNAMIC_TOPIC_CONFIG\n\nKEY VALUE SOURCE\ncleanup.policy delete DEFAULT_CONFIG\ncompression.type producer DEFAULT_CONFIG\ndelete.retention.ms -1 DEFAULT_CONFIG\nflush.bytes 262144 DEFAULT_CONFIG\nflush.ms 100 DEFAULT_CONFIG\ninitial.retention.local.target.bytes -1 DEFAULT_CONFIG\ninitial.retention.local.target.ms -1 DEFAULT_CONFIG\nmax.compaction.lag.ms 9223372036854 DEFAULT_CONFIG\nmax.message.bytes 524288 DYNAMIC_TOPIC_CONFIG\nmessage.timestamp.after.max.ms 3600000 DEFAULT_CONFIG\nmessage.timestamp.before.max.ms 9223372036854 DEFAULT_CONFIG\nmessage.timestamp.type CreateTime DEFAULT_CONFIG\nmin.cleanable.dirty.ratio 0.5 DEFAULT_CONFIG\nmin.compaction.lag.ms 0 DEFAULT_CONFIG\nredpanda.iceberg.mode disabled DEFAULT_CONFIG\nredpanda.leaders.preference none DEFAULT_CONFIG\nredpanda.remote.allowgaps false DEFAULT_CONFIG\nredpanda.remote.delete true DEFAULT_CONFIG\nredpanda.remote.read false DEFAULT_CONFIG\nredpanda.remote.write false DEFAULT_CONFIG\nredpanda.schema.registry.context . DEFAULT_CONFIG\nredpanda.storage.mode unset DEFAULT_CONFIG\nredpanda.storage.mode.impl unset DEFAULT_CONFIG\nretention.bytes -1 DEFAULT_CONFIG\nretention.local.target.bytes -1 DEFAULT_CONFIG\nretention.local.target.ms 86400000 DEFAULT_CONFIG\nretention.ms 604800000 DYNAMIC_TOPIC_CONFIG\nsegment.bytes 134217728 DEFAULT_CONFIG\nsegment.ms 1209600000 DEFAULT_CONFIG\nwrite.caching false DYNAMIC_TOPIC_CONFIG\n\nSUMMARY\n=======\nNAME ingestkit.dlq\nPARTITIONS 1\nREPLICAS 1\n\nCONFIGS\n=======\nKEY VALUE SOURCE\ncleanup.policy delete DEFAULT_CONFIG\ncompression.type producer DEFAULT_CONFIG\ndelete.retention.ms -1 DEFAULT_CONFIG\nflush.bytes 262144 DEFAULT_CONFIG\nflush.ms 100 DEFAULT_CONFIG\ninitial.retention.local.target.bytes -1 DEFAULT_CONFIG\ninitial.retention.local.target.ms -1 DEFAULT_CONFIG\nmax.compaction.lag.ms 9223372036854 DEFAULT_CONFIG\nmax.message.bytes 2097152 DYNAMIC_TOPIC_CONFIG\nmessage.timestamp.after.max.ms 3600000 DEFAULT_CONFIG\nmessage.timestamp.before.max.ms 9223372036854 DEFAULT_CONFIG\nmessage.timestamp.type CreateTime DEFAULT_CONFIG\nmin.cleanable.dirty.ratio 0.5 DEFAULT_CONFIG\nmin.compaction.lag.ms 0 DEFAULT_CONFIG\nredpanda.iceberg.mode disabled DEFAULT_CONFIG\nredpanda.leaders.preference none DEFAULT_CONFIG\nredpanda.remote.allowgaps false DEFAULT_CONFIG\nredpanda.remote.delete true DEFAULT_CONFIG\nredpanda.remote.read false DEFAULT_CONFIG\nredpanda.remote.write false DEFAULT_CONFIG\nredpanda.schema.registry.context . DEFAULT_CONFIG\nredpanda.storage.mode unset DEFAULT_CONFIG\nredpanda.storage.mode.impl unset DEFAULT_CONFIG\nretention.bytes -1 DEFAULT_CONFIG\nretention.local.target.bytes -1 DEFAULT_CONFIG\nretention.local.target.ms 86400000 DEFAULT_CONFIG\nretention.ms 604800000 DYNAMIC_TOPIC_CONFIG\nsegment.bytes 134217728 DEFAULT_CONFIG\nsegment.ms 1209600000 DEFAULT_CONFIG\nwrite.caching false DYNAMIC_TOPIC_CONFIG\n\nKEY VALUE SOURCE\ncleanup.policy delete DEFAULT_CONFIG\ncompression.type producer DEFAULT_CONFIG\ndelete.retention.ms -1 DEFAULT_CONFIG\nflush.bytes 262144 DEFAULT_CONFIG\nflush.ms 100 DEFAULT_CONFIG\ninitial.retention.local.target.bytes -1 DEFAULT_CONFIG\ninitial.retention.local.target.ms -1 DEFAULT_CONFIG\nmax.compaction.lag.ms 9223372036854 DEFAULT_CONFIG\nmax.message.bytes 2097152 DYNAMIC_TOPIC_CONFIG\nmessage.timestamp.after.max.ms 3600000 DEFAULT_CONFIG\nmessage.timestamp.before.max.ms 9223372036854 DEFAULT_CONFIG\nmessage.timestamp.type CreateTime DEFAULT_CONFIG\nmin.cleanable.dirty.ratio 0.5 DEFAULT_CONFIG\nmin.compaction.lag.ms 0 DEFAULT_CONFIG\nredpanda.iceberg.mode disabled DEFAULT_CONFIG\nredpanda.leaders.preference none DEFAULT_CONFIG\nredpanda.remote.allowgaps false DEFAULT_CONFIG\nredpanda.remote.delete true DEFAULT_CONFIG\nredpanda.remote.read false DEFAULT_CONFIG\nredpanda.remote.write false DEFAULT_CONFIG\nredpanda.schema.registry.context . DEFAULT_CONFIG\nredpanda.storage.mode unset DEFAULT_CONFIG\nredpanda.storage.mode.impl unset DEFAULT_CONFIG\nretention.bytes -1 DEFAULT_CONFIG\nretention.local.target.bytes -1 DEFAULT_CONFIG\nretention.local.target.ms 86400000 DEFAULT_CONFIG\nretention.ms 604800000 DYNAMIC_TOPIC_CONFIG\nsegment.bytes 134217728 DEFAULT_CONFIG\nsegment.ms 1209600000 DEFAULT_CONFIG\nwrite.caching false DYNAMIC_TOPIC_CONFIG\n\n", + "settings": { + "api_internal_port": 8080, + "api_log_level": "info", + "api_rate_limit_rps": 10000, + "api_route": "https_gateway", + "api_tls": true, + "consumer_max_poll_records": 500, + "consumer_processing_deadline_ns": 15000000000, + "consumer_rebalance_timeout_ns": 60000000000, + "consumer_session_timeout_ns": 10000000000, + "database_write_method": "batch-insert", + "http_protocol": "HTTP/1.1", + "http_request_timeout_ns": 8000000000, + "producer_ack": "all ISR; idempotent", + "producer_buffer_bytes": 67108864, + "producer_buffer_records": 1000, + "producer_compression_preference": "snappy, none (pinned franz-go source default)", + "provenance": "CPU/memory/fsync from broker process; API rate/log/port from allowlisted container environment; remaining source defaults at source_sha", + "publish_timeout_ns": 5000000000, + "redpanda_memory": "1G", + "redpanda_smp": 1, + "source_cleanliness": "Git status excludes only the owned output directory; actual source-file fingerprint is checked again after execution", + "tls_version": "TLS 1.3", + "topology": "one broker; one database; one API; one consumer", + "visibility_clock": "API receipt and PostgreSQL observation share the deployment clock; host time schedules load" + }, + "caveats": [ + "Local Docker VM; generator and SQL observer run on the same physical host as services and compete for resources.", + "Single broker, replication factor one. Disk-flush configuration does not establish tolerance of broker disk/host loss.", + "Topic and database settings are captured below. Source defaults at the recorded revision define remaining client settings.", + "Host filesystem reported by df is not a calibrated Docker VM disk specification. No dedicated disk latency or cloud cost measurement.", + "Resource samples are coarse Docker snapshots, not isolation or proof of a particular bottleneck." + ] +} diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-batch-1-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-1-attempt-1.json.gz new file mode 100644 index 0000000..9683ca1 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-1-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-batch-10-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-10-attempt-1.json.gz new file mode 100644 index 0000000..79ed8be Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-10-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-batch-100-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-100-attempt-1.json.gz new file mode 100644 index 0000000..b637d58 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-100-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-batch-1000-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-1000-attempt-1.json.gz new file mode 100644 index 0000000..1ed63f5 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-1000-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-batch-50-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-50-attempt-1.json.gz new file mode 100644 index 0000000..9d3675a Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-50-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-batch-500-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-500-attempt-1.json.gz new file mode 100644 index 0000000..4820a5c Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-batch-500-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-duplicates-10-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-duplicates-10-attempt-1.json.gz new file mode 100644 index 0000000..5dd071b Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-duplicates-10-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-duplicates-50-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-duplicates-50-attempt-1.json.gz new file mode 100644 index 0000000..ca07e72 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-duplicates-50-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-duplicates-90-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-duplicates-90-attempt-1.json.gz new file mode 100644 index 0000000..4923406 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-duplicates-90-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-payload-1024-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-payload-1024-attempt-1.json.gz new file mode 100644 index 0000000..9b7d860 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-payload-1024-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/db-payload-16384-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/db-payload-16384-attempt-1.json.gz new file mode 100644 index 0000000..c21fd8f Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/db-payload-16384-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-batch-1-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-batch-1-attempt-1.json.gz new file mode 100644 index 0000000..7892a58 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-batch-1-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-batch-10-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-batch-10-attempt-1.json.gz new file mode 100644 index 0000000..33bf01a Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-batch-10-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-batch-100-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-batch-100-attempt-1.json.gz new file mode 100644 index 0000000..5266a83 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-batch-100-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-burst-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-burst-attempt-1.json.gz new file mode 100644 index 0000000..7648efc Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-burst-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-concurrency-64-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-concurrency-64-attempt-1.json.gz new file mode 100644 index 0000000..4c7ce6f Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-concurrency-64-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-concurrency-8-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-concurrency-8-attempt-1.json.gz new file mode 100644 index 0000000..4560fdc Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-concurrency-8-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-payload-1024-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-payload-1024-attempt-1.json.gz new file mode 100644 index 0000000..c5f3c19 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-payload-1024-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-payload-16384-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-payload-16384-attempt-1.json.gz new file mode 100644 index 0000000..c50442c Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-payload-16384-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-rate-100-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-rate-100-attempt-1.json.gz new file mode 100644 index 0000000..ab2500a Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-rate-100-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-rate-10000-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-rate-10000-attempt-1.json.gz new file mode 100644 index 0000000..d87df31 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-rate-10000-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/pipeline-rate-5000-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-rate-5000-attempt-1.json.gz new file mode 100644 index 0000000..5c2ee5d Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/pipeline-rate-5000-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/recovery-consumer-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/recovery-consumer-attempt-1.json.gz new file mode 100644 index 0000000..b514bd1 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/recovery-consumer-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/recovery-database-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/recovery-database-attempt-1.json.gz new file mode 100644 index 0000000..2a0deef Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/recovery-database-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/raw/recovery-outbox-attempt-1.json.gz b/benchmarks/results/selfhost-2026-11-04/raw/recovery-outbox-attempt-1.json.gz new file mode 100644 index 0000000..e4e6373 Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/raw/recovery-outbox-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/resources-1.json.gz b/benchmarks/results/selfhost-2026-11-04/resources-1.json.gz new file mode 100644 index 0000000..873215f Binary files /dev/null and b/benchmarks/results/selfhost-2026-11-04/resources-1.json.gz differ diff --git a/benchmarks/results/selfhost-2026-11-04/summary.csv b/benchmarks/results/selfhost-2026-11-04/summary.csv new file mode 100644 index 0000000..34315ad --- /dev/null +++ b/benchmarks/results/selfhost-2026-11-04/summary.csv @@ -0,0 +1,26 @@ +case,kind,status,attempt,completed_repetitions,artifact,sha256 +db-batch-1,database,complete,1,3,raw/db-batch-1-attempt-1.json.gz,1a159a2e21dfb85d2b5476daca25f8e87dfccb2c3478723259775b2019a1925d +db-batch-10,database,complete,1,3,raw/db-batch-10-attempt-1.json.gz,bd8068803db7fb0e71695a718e9c2ff8ce432d02540221a06b065527bcf8d81e +db-batch-50,database,complete,1,3,raw/db-batch-50-attempt-1.json.gz,86689028eb111d5e70f5b8f7a1657e16726771f4ddf5e77bc53ade69e117a971 +db-batch-100,database,complete,1,3,raw/db-batch-100-attempt-1.json.gz,83ecd2e92f6155facef9dbf40f66bfe6e5fe77e60156027a737edc0d16c1d8d8 +db-batch-500,database,complete,1,3,raw/db-batch-500-attempt-1.json.gz,4f6dc35c8fa1126bd82efe3cf18189e73ce5b1741887b2f8507898a05d9f12a5 +db-batch-1000,database,complete,1,3,raw/db-batch-1000-attempt-1.json.gz,496e7c8809070bfcf89a108217dccd056fdd14a251665b84c18b604401f214a4 +db-payload-1024,database,complete,1,3,raw/db-payload-1024-attempt-1.json.gz,7d506cdd0fa9213ec046f580abfcddd0cdc9e18a66c482b7aa7a6fa4dea71e04 +db-payload-16384,database,complete,1,3,raw/db-payload-16384-attempt-1.json.gz,97b12de3c2910c5597671dc829e2aaba7bdbfa0b82e726cb800ad21d372e8810 +db-duplicates-10,database,complete,1,3,raw/db-duplicates-10-attempt-1.json.gz,80900cc48ab4fb6757c49d73a06e01fddb511612bfff3d43a1e86bcc4359f357 +db-duplicates-50,database,complete,1,3,raw/db-duplicates-50-attempt-1.json.gz,51815d6a908ec42150b867790877a622a195a223add1f5fc9e9e70ecbdff6568 +db-duplicates-90,database,complete,1,3,raw/db-duplicates-90-attempt-1.json.gz,341c52cbb99d94e26e2d595a550793500a3c09da88100323ca2020b0f7c8547b +pipeline-batch-1,pipeline,limited,1,3,raw/pipeline-batch-1-attempt-1.json.gz,72b437440efeee588f61d5e40c318231a73e5f6c50487623d7abd13a760a8936 +pipeline-batch-10,pipeline,limited,1,3,raw/pipeline-batch-10-attempt-1.json.gz,2351e2010fd1313b4a26568da7adf74c2d2983fa3c7837f326fa6662a8ecbbdb +pipeline-batch-100,pipeline,complete,1,3,raw/pipeline-batch-100-attempt-1.json.gz,962fc7395246b47b002e154dc7b4897dac9fefebd3972a535e4fca49a5ecdfe8 +pipeline-rate-100,pipeline,complete,1,3,raw/pipeline-rate-100-attempt-1.json.gz,d5b8a0a5b13c10871963126b4d6d045b5b984bae9061544e72b6621d61022d8b +pipeline-rate-5000,pipeline,limited,1,3,raw/pipeline-rate-5000-attempt-1.json.gz,7c223db858877cc5ebf8451ff010cba41e7a1adc705573e8c47d622abc077f2d +pipeline-rate-10000,pipeline,limited,1,3,raw/pipeline-rate-10000-attempt-1.json.gz,25c36e1aead7df226fa50ae19ccaaf852cad122d5d69d916748f52e06bbfea34 +pipeline-payload-1024,pipeline,limited,1,3,raw/pipeline-payload-1024-attempt-1.json.gz,01b7d19d8709a090d2c68a0a8ff9414b9e2ee0c65ee3e567528cc39d906a3506 +pipeline-payload-16384,pipeline,limited,1,3,raw/pipeline-payload-16384-attempt-1.json.gz,089fe775ffeff87e6d58c3c74420b6c923eff8418992d77edcdfad35bed3bfe0 +pipeline-burst,pipeline,complete,1,3,raw/pipeline-burst-attempt-1.json.gz,48d3ec24fe8f514129a24bd406c467fdba04bfc1b4cb91fad05fcd9e8b3a7797 +pipeline-concurrency-8,pipeline,limited,1,3,raw/pipeline-concurrency-8-attempt-1.json.gz,695927c9bf4a3ba2130b46ba69a70005e86371003907d9bd7e0570e119448986 +pipeline-concurrency-64,pipeline,limited,1,3,raw/pipeline-concurrency-64-attempt-1.json.gz,3b4805c791406fa04b7cf7cc97aadb767f2221e3e164138be68353eef6b27b34 +recovery-database,recovery,limited,1,3,raw/recovery-database-attempt-1.json.gz,ccd4ac476583ca53ef0987d3ba2916d8eaf2251cf7191df20a9ddd180e689828 +recovery-consumer,recovery,complete,1,3,raw/recovery-consumer-attempt-1.json.gz,488d6e2d1297fe33509dbd92de24152a92758eceba0b0bebc65973c808b36146 +recovery-outbox,recovery,complete,1,3,raw/recovery-outbox-attempt-1.json.gz,1aa212d094807e13e955b79c7c8f131ea189bcbe4dd7af0f8868d0a6c5133b48 diff --git a/benchmarks/results/selfhost-copy-2026-11-04/README.md b/benchmarks/results/selfhost-copy-2026-11-04/README.md new file mode 100644 index 0000000..90c9d83 --- /dev/null +++ b/benchmarks/results/selfhost-copy-2026-11-04/README.md @@ -0,0 +1,33 @@ +# COPY-writer reference study + +Completed 4 November 2026 from clean source `dccf4b3`. This is the first corrected +self-hosted HTTPS study, before the evidence-driven switch of the deployed writer +to batch INSERT. Keep these captures as a reference; the final writer study is +[recorded separately](../selfhost-2026-11-04/README.md). + +All 25 registered cases completed: 99 database method/repetition rows, 33 pipeline +windows and 9 recovery repetitions. Nine cases are explicitly limited. Independent +Python checks reconciled raw samples, nearest-rank percentiles, request/ID +populations, rates, summaries, immutable checksums, registered controls and runtime +durability/HTTPS settings. An exact scan against this owned run’s generated +credentials passed. Each case uses three measured repetitions; all accepted event +IDs reconciled with independently verified content. Limits are retained in index +and raw captures and do not establish maximum capacity. + +Batch INSERT had the lower median elapsed time than COPY/staging/merge in all +11 database configurations. This motivates the separate writer change and new +measurements; it does not make a universal claim about PostgreSQL COPY. + +Source and actual image/runtime/host controls are in [manifest-1.json](manifest-1.json). +The generator and SQL observer shared an M1 Max physical host with the Docker VM +and existing workloads. Only owned containers were controlled. PostgreSQL fsync +and synchronous commit were on; the broker’s process bypass was false and topic +write caching was false. One broker/replica is not protection from host/disk loss. +Local private-CA HTTPS was verified; public certificate issuance was not tested. + +Read [index.json](index.json) for all case controls, summaries, limits and raw +artifact references, [summary.csv](summary.csv) for the case listing, and +[journal.json](journal.json) for progress history. Run `python3 +benchmarks/audit_study.py benchmarks/results/selfhost-copy-2026-11-04` from the +repository root for a read-only independent audit. Raw gzip files have zero +timestamps and SHA-256 references; no failed/limited cases were discarded. diff --git a/benchmarks/results/selfhost-copy-2026-11-04/index.json b/benchmarks/results/selfhost-copy-2026-11-04/index.json new file mode 100644 index 0000000..6af523a --- /dev/null +++ b/benchmarks/results/selfhost-copy-2026-11-04/index.json @@ -0,0 +1,5589 @@ +{ + "MetadataArtifacts": [ + { + "Codec": "json", + "Path": "manifest-1.json", + "SHA256": "ab89359ae672b5a26618aedc6fec10664f469f90e296bb134c482a9c1a14b0cb", + "Size": 14128, + "RawBytes": 14128 + } + ], + "Schema": 1, + "Status": "complete", + "Identity": { + "SourceSHA": "dccf4b3783a83010a86cceb5f318fc0b23645b56", + "SourceFingerprint": "25e4030c4039e03531efcbabdc8da836aa97fe5cdeabbfdd94b15fb48008ce68", + "ControlsFingerprint": "48c89aca641858936a3ae61db38c6683c1e3ec590b3c447c2548cbf4c2f9e318", + "ImagesFingerprint": "46058c0c246a346a73a5980052ca2595e385b37ed18966f80d3e6a189016c0bd", + "ConfigFingerprint": "738367cf2d26017bbe811849d3aacaedeb4891091f61e7e3c50904733a855cfe", + "Mode": "full", + "Seed": 42, + "SourceDirty": false + }, + "RunNamespace": "ae237e04-731d-4320-af54-3ff38d8ae65f", + "ManifestFiles": [ + "manifest-1.json" + ], + "Resources": [ + { + "Codec": "gzip", + "Path": "resources-1.json.gz", + "SHA256": "ff96e4b4af6ab093a8d3e97eeec74151af67aba10d95c1dd83a4fc751bf383ac", + "Size": 25335, + "RawBytes": 505001 + } + ], + "Cases": [ + { + "Case": { + "ID": "db-batch-1", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 1, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1-attempt-1.json.gz", + "SHA256": "369bca674073b33284fe19c594e52d757dc35b7ec1b0277e9eada7781dcd2f56", + "Size": 130752, + "RawBytes": 342879 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1-attempt-1.json.gz", + "SHA256": "369bca674073b33284fe19c594e52d757dc35b7ec1b0277e9eada7781dcd2f56", + "Size": 130752, + "RawBytes": 342879 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-1", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 1, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5451552417, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4945587042, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 23787816500, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4698216541, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 22270728125, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4769635625, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 20999593167, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7943784875, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4443313042, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-10", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 10, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-10-attempt-1.json.gz", + "SHA256": "30e74d69c56dfb4f9a9abcaa766bdf6ba38b6f34e125a11c263588f71ca56c46", + "Size": 52983, + "RawBytes": 139114 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-10-attempt-1.json.gz", + "SHA256": "30e74d69c56dfb4f9a9abcaa766bdf6ba38b6f34e125a11c263588f71ca56c46", + "Size": 52983, + "RawBytes": 139114 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-10", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 10, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4868561042, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 677020042, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2791043417, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1647866083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2883055375, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5296327458, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2405385708, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 8848153458, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 500646333, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-50", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 50, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-50-attempt-1.json.gz", + "SHA256": "2631dd527972d301f38274a089361f12f72e9066bd682d5a44db5a949e1b9481", + "Size": 45158, + "RawBytes": 120934 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-50-attempt-1.json.gz", + "SHA256": "2631dd527972d301f38274a089361f12f72e9066bd682d5a44db5a949e1b9481", + "Size": 45158, + "RawBytes": 120934 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-50", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 50, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4533726209, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 170107625, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 581224916, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 330741292, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 541003333, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6550575958, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 524224167, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6138724000, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 202138834, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-100", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-100-attempt-1.json.gz", + "SHA256": "6a7837588b8bd8e687d9ac3290c16c4a9fd38789596132203930d5d5493c34ce", + "Size": 44383, + "RawBytes": 118372 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-100-attempt-1.json.gz", + "SHA256": "6a7837588b8bd8e687d9ac3290c16c4a9fd38789596132203930d5d5493c34ce", + "Size": 44383, + "RawBytes": 118372 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-100", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6252412291, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 131458625, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 293925125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 259989833, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 435312792, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 8931380875, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 287726625, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4922131084, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 158938208, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-500", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 500, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-500-attempt-1.json.gz", + "SHA256": "907403528ed1fdbc1c4eea24f3517026f7b78799ff83320b6c42b45e981fb188", + "Size": 42663, + "RawBytes": 121453 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-500-attempt-1.json.gz", + "SHA256": "907403528ed1fdbc1c4eea24f3517026f7b78799ff83320b6c42b45e981fb188", + "Size": 42663, + "RawBytes": 121453 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-500", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 500, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6120738125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 97039375, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 104231416, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 129472125, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 119877958, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6334902125, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 90675500, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6171369250, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 76679292, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-batch-1000", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 1000, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1000-attempt-1.json.gz", + "SHA256": "80469d563341738d16ce5cf11f48db82469d27982104abec7a872431e2c4611f", + "Size": 43863, + "RawBytes": 119033 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1000-attempt-1.json.gz", + "SHA256": "80469d563341738d16ce5cf11f48db82469d27982104abec7a872431e2c4611f", + "Size": 43863, + "RawBytes": 119033 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-1000", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 1000, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 9971811333, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 73004667, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 91250875, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 94170041, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 90251167, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6222443792, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 81666875, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6220183875, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 78067833, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-payload-1024", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 1024, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-1024-attempt-1.json.gz", + "SHA256": "e63d2e2f4ad5284a71f8e48c095509ff5d6806f16f095911d9941b1ec54c6636", + "Size": 45348, + "RawBytes": 121865 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-1024-attempt-1.json.gz", + "SHA256": "e63d2e2f4ad5284a71f8e48c095509ff5d6806f16f095911d9941b1ec54c6636", + "Size": 45348, + "RawBytes": 121865 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-payload-1024", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 1024, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6808433458, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 210348917, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 524147625, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 231698791, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 453167834, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 9562879291, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 306062833, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5816228125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 256530875, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-payload-16384", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 16384, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-16384-attempt-1.json.gz", + "SHA256": "9e1d5fb267e80f82dc5545f7d2c36179a692860d2d75fe8b009b6b33dc0a36dc", + "Size": 48591, + "RawBytes": 125472 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-16384-attempt-1.json.gz", + "SHA256": "9e1d5fb267e80f82dc5545f7d2c36179a692860d2d75fe8b009b6b33dc0a36dc", + "Size": 48591, + "RawBytes": 125472 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-payload-16384", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 16384, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 14687461042, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1097110709, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1527117292, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1283645875, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1359904709, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 14272579542, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1197085209, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 15618113041, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 946918750, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-duplicates-10", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0.1, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-10-attempt-1.json.gz", + "SHA256": "924be0c894d2b9220312c5fc71726a70a3e1d44d6a3134cfc8c6828d14fd8aed", + "Size": 43114, + "RawBytes": 116290 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-10-attempt-1.json.gz", + "SHA256": "924be0c894d2b9220312c5fc71726a70a3e1d44d6a3134cfc8c6828d14fd8aed", + "Size": 43114, + "RawBytes": 116290 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-duplicates-10", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.1 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 4523910458, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 128403750, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 299802667, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 192726792, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 377546333, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 4831851792, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 243185291, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 5630481709, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 149752458, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-duplicates-50", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0.5, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-50-attempt-1.json.gz", + "SHA256": "3bbd6b9501484547f600f99bee631186635f0c800da55b97b6175623214aed0e", + "Size": 42624, + "RawBytes": 116502 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-50-attempt-1.json.gz", + "SHA256": "3bbd6b9501484547f600f99bee631186635f0c800da55b97b6175623214aed0e", + "Size": 42624, + "RawBytes": 116502 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-duplicates-50", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.5 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 4308531667, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 105259084, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 356780958, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 218304708, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 475505500, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 6885547292, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 304966000, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 3604732000, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 158724625, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "db-duplicates-90", + "Kind": "database", + "Recovery": "", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 5000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0.9, + "Window": 0, + "Warmup": 0, + "Drain": 0, + "Poll": 0, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-90-attempt-1.json.gz", + "SHA256": "48a0e237918e20300979db0a31127097631c9a1a13a49b7cbeddad222cca85ad", + "Size": 39317, + "RawBytes": 111273 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-90-attempt-1.json.gz", + "SHA256": "48a0e237918e20300979db0a31127097631c9a1a13a49b7cbeddad222cca85ad", + "Size": 39317, + "RawBytes": 111273 + } + } + ], + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-duplicates-90", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.9 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1883489250, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 78453250, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 382714791, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 100039250, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 453156084, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1478754459, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 262018166, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1357953750, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 63792791, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + } + }, + { + "Case": { + "ID": "pipeline-batch-1", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 1, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-1-attempt-1.json.gz", + "SHA256": "9b2a39ac29a9a1b706f62eab35fc6edc02c895c2b6ca2e024e7a9525d3712170", + "Size": 804807, + "RawBytes": 4810274 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-1-attempt-1.json.gz", + "SHA256": "9b2a39ac29a9a1b706f62eab35fc6edc02c895c2b6ca2e024e7a9525d3712170", + "Size": 804807, + "RawBytes": 4810274 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-batch-1", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9989, + "AcceptedAfterWindow": 11, + "ObserverPolls": 203, + "ObserverQueries": 812, + "ObserverQueryNS": 1377441001, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 51255583, + "ObservedEvents": 10000, + "VerificationNS": 58771708, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 92, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10194055917, + "DrainNS": 194055917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.9, + "PersistedEPS": 980.9638167006339, + "ack_latency": { + "p50_ns": 12383041, + "p95_ns": 18663708, + "p99_ns": 24394000 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 85364000, + "p95_ns": 122868000, + "p99_ns": 152523000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "28d0fcd3609452304692b5def184c293f4825ce8d5b3d7ad3fd98d7bcafb1ef9", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "28d0fcd3609452304692b5def184c293f4825ce8d5b3d7ad3fd98d7bcafb1ef9", + "stored": "28d0fcd3609452304692b5def184c293f4825ce8d5b3d7ad3fd98d7bcafb1ef9" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 9466, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9449, + "AcceptedAfterWindow": 17, + "ObserverPolls": 203, + "ObserverQueries": 800, + "ObserverQueryNS": 1368076030, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50765291, + "ObservedEvents": 9466, + "VerificationNS": 52158542, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 9466, + "Accepted": 9466, + "Persisted": 9466, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 534, + "LateSchedules": 22, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 90, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10182052250, + "DrainNS": 182052250, + "PollIntervalNS": 50000000, + "AcceptedEPS": 944.9, + "PersistedEPS": 929.6750564209685, + "ack_latency": { + "p50_ns": 12732958, + "p95_ns": 23652083, + "p99_ns": 65023292 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 83314000, + "p95_ns": 177539000, + "p99_ns": 486214000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "1c4b2b933b3a983b1a4d6ed4184f6ff2cc65058c5cea59a888150a9163e9838b", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "1c4b2b933b3a983b1a4d6ed4184f6ff2cc65058c5cea59a888150a9163e9838b", + "stored": "1c4b2b933b3a983b1a4d6ed4184f6ff2cc65058c5cea59a888150a9163e9838b" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9983, + "AcceptedAfterWindow": 17, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 1576483460, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50502291, + "ObservedEvents": 10000, + "VerificationNS": 55478166, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 96, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10133476916, + "DrainNS": 133476916, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.3, + "PersistedEPS": 986.8281225578903, + "ack_latency": { + "p50_ns": 14255166, + "p95_ns": 21135834, + "p99_ns": 24498250 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 86632000, + "p95_ns": 118017000, + "p99_ns": 131092000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "39459f687870f205295b9b59b3146f17ed54ec3738c0d9f90705232d5bbda2a4", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "39459f687870f205295b9b59b3146f17ed54ec3738c0d9f90705232d5bbda2a4", + "stored": "39459f687870f205295b9b59b3146f17ed54ec3738c0d9f90705232d5bbda2a4" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-batch-10", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 10, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-10-attempt-1.json.gz", + "SHA256": "eabe032e9145789c7ea3ef879048266e74f6a45dddbb789e5a28c001be50c3e8", + "Size": 270405, + "RawBytes": 1221356 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-10-attempt-1.json.gz", + "SHA256": "eabe032e9145789c7ea3ef879048266e74f6a45dddbb789e5a28c001be50c3e8", + "Size": 270405, + "RawBytes": 1221356 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-batch-10", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 1065330545, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56193583, + "ObservedEvents": 10000, + "VerificationNS": 54267625, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 2, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 95, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10129323834, + "DrainNS": 129323834, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 987.2327278583085, + "ack_latency": { + "p50_ns": 16320250, + "p95_ns": 21827291, + "p99_ns": 26217041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 86364000, + "p95_ns": 116573000, + "p99_ns": 131375000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "2308f929bbe4618d9fff677d91c7e7ff182b2ba6ea512b30e06512052bfe23d5", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "2308f929bbe4618d9fff677d91c7e7ff182b2ba6ea512b30e06512052bfe23d5", + "stored": "2308f929bbe4618d9fff677d91c7e7ff182b2ba6ea512b30e06512052bfe23d5" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 804, + "ObserverQueryNS": 1104503993, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55482541, + "ObservedEvents": 10000, + "VerificationNS": 57927792, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 100, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10134078500, + "DrainNS": 134078500, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 986.7695419963443, + "ack_latency": { + "p50_ns": 16227166, + "p95_ns": 28102666, + "p99_ns": 176825667 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 93098000, + "p95_ns": 160529000, + "p99_ns": 322554000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "04a3e6cc5ded1c8cfd3df11d3a60f47f6eece0555ab514fe0383305558fa336f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "04a3e6cc5ded1c8cfd3df11d3a60f47f6eece0555ab514fe0383305558fa336f", + "stored": "04a3e6cc5ded1c8cfd3df11d3a60f47f6eece0555ab514fe0383305558fa336f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 1109773911, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53328500, + "ObservedEvents": 10000, + "VerificationNS": 69103042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 88, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10199933875, + "DrainNS": 199933875, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 980.3985126325144, + "ack_latency": { + "p50_ns": 15924083, + "p95_ns": 21203833, + "p99_ns": 24105417 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 84546000, + "p95_ns": 114733000, + "p99_ns": 126936000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "9d57209e1f3abbc3a335b225d1cee5ab6eee642d1026d50130f0db4c54823cba", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "9d57209e1f3abbc3a335b225d1cee5ab6eee642d1026d50130f0db4c54823cba", + "stored": "9d57209e1f3abbc3a335b225d1cee5ab6eee642d1026d50130f0db4c54823cba" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-batch-100", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-100-attempt-1.json.gz", + "SHA256": "67189037495f6b6c21c6ce624b4d5f3cff6579ced93603d95804eb0cf25b1e0a", + "Size": 195702, + "RawBytes": 843832 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-100-attempt-1.json.gz", + "SHA256": "67189037495f6b6c21c6ce624b4d5f3cff6579ced93603d95804eb0cf25b1e0a", + "Size": 195702, + "RawBytes": 843832 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-batch-100", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 744, + "ObserverQueryNS": 1320043757, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54871667, + "ObservedEvents": 10000, + "VerificationNS": 70612833, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10106381583, + "DrainNS": 106381583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 989.4738208599856, + "ack_latency": { + "p50_ns": 26848833, + "p95_ns": 35775750, + "p99_ns": 41297750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50916000, + "p95_ns": 102740000, + "p99_ns": 108909000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "cd405735e752334cc4de0c1a4fa5c0efa093ea81bce76f07ef4ce745179a3a40", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "cd405735e752334cc4de0c1a4fa5c0efa093ea81bce76f07ef4ce745179a3a40", + "stored": "cd405735e752334cc4de0c1a4fa5c0efa093ea81bce76f07ef4ce745179a3a40" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 742, + "ObserverQueryNS": 1215422754, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53499583, + "ObservedEvents": 10000, + "VerificationNS": 70658750, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 34, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10103019708, + "DrainNS": 103019708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 989.8030775968472, + "ack_latency": { + "p50_ns": 27208917, + "p95_ns": 35683167, + "p99_ns": 45575542 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 51126000, + "p95_ns": 101067000, + "p99_ns": 104082000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "3f5d1782f6cc8cad9a9a58cb387050eb3ac75e018f4cd1fc8bd4e841de5b9100", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "3f5d1782f6cc8cad9a9a58cb387050eb3ac75e018f4cd1fc8bd4e841de5b9100", + "stored": "3f5d1782f6cc8cad9a9a58cb387050eb3ac75e018f4cd1fc8bd4e841de5b9100" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 738, + "ObserverQueryNS": 1320513923, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52057375, + "ObservedEvents": 10000, + "VerificationNS": 63698500, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 35, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10093028542, + "DrainNS": 93028542, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 990.782891219134, + "ack_latency": { + "p50_ns": 27612459, + "p95_ns": 34361667, + "p99_ns": 36536833 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 51367000, + "p95_ns": 102529000, + "p99_ns": 104402000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "c334c4f73a3eb52422cc5b1b5331cfcca73fbd344fb2343d5bedcbed9dd01b6a", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "c334c4f73a3eb52422cc5b1b5331cfcca73fbd344fb2343d5bedcbed9dd01b6a", + "stored": "c334c4f73a3eb52422cc5b1b5331cfcca73fbd344fb2343d5bedcbed9dd01b6a" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-rate-100", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 1000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 100, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-100-attempt-1.json.gz", + "SHA256": "372bfca0da475c3912cc8a67af0ed499ee0856291d185e754b134896c53cd578", + "Size": 15268, + "RawBytes": 154562 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-100-attempt-1.json.gz", + "SHA256": "372bfca0da475c3912cc8a67af0ed499ee0856291d185e754b134896c53cd578", + "Size": 15268, + "RawBytes": 154562 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-rate-100", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 100, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 618, + "ObserverQueryNS": 1074059039, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59419625, + "ObservedEvents": 1000, + "VerificationNS": 19795041, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10044123875, + "DrainNS": 44123875, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.56069961353398, + "ack_latency": { + "p50_ns": 33858792, + "p95_ns": 51856084, + "p99_ns": 51856084 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 90649000, + "p95_ns": 101067000, + "p99_ns": 102858000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "8f3b19e8b3afcdea06b998fda90cedcd38d5a9642d30f49f4d6296ba4ce94cf5", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "8f3b19e8b3afcdea06b998fda90cedcd38d5a9642d30f49f4d6296ba4ce94cf5", + "stored": "8f3b19e8b3afcdea06b998fda90cedcd38d5a9642d30f49f4d6296ba4ce94cf5" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 618, + "ObserverQueryNS": 1143264174, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55731875, + "ObservedEvents": 1000, + "VerificationNS": 15749708, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10040247459, + "DrainNS": 40247459, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.5991387745735, + "ack_latency": { + "p50_ns": 27940333, + "p95_ns": 54502708, + "p99_ns": 54502708 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50675000, + "p95_ns": 104645000, + "p99_ns": 104645000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "9adc3c6f41c2095289e0fd763eb7a5a23e0a59dcdbfe2576fbc34f7823807cb5", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "9adc3c6f41c2095289e0fd763eb7a5a23e0a59dcdbfe2576fbc34f7823807cb5", + "stored": "9adc3c6f41c2095289e0fd763eb7a5a23e0a59dcdbfe2576fbc34f7823807cb5" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 615, + "ObserverQueryNS": 1078898453, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52047084, + "ObservedEvents": 1000, + "VerificationNS": 8478625, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10019273333, + "DrainNS": 19273333, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.80763741681226, + "ack_latency": { + "p50_ns": 48528958, + "p95_ns": 57843083, + "p99_ns": 57843083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 83883000, + "p95_ns": 98151000, + "p99_ns": 98576000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "e00af1e3676b8a1a601bcd1b638c0833ad2e6a7473d8d38bbb55d412495964a0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "e00af1e3676b8a1a601bcd1b638c0833ad2e6a7473d8d38bbb55d412495964a0", + "stored": "e00af1e3676b8a1a601bcd1b638c0833ad2e6a7473d8d38bbb55d412495964a0" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-rate-5000", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 50000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 5000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-5000-attempt-1.json.gz", + "SHA256": "270de12e779611ee90d18f3d727f6fc78a4e8da498d12f9e8432f1c51e813449", + "Size": 1024934, + "RawBytes": 4347076 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-5000-attempt-1.json.gz", + "SHA256": "270de12e779611ee90d18f3d727f6fc78a4e8da498d12f9e8432f1c51e813449", + "Size": 1024934, + "RawBytes": 4347076 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-rate-5000", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 5000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 2597232328, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55266916, + "ObservedEvents": 50000, + "VerificationNS": 267020958, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 472, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10407074791, + "DrainNS": 407074791, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4804.424010024394, + "ack_latency": { + "p50_ns": 22864417, + "p95_ns": 27299083, + "p99_ns": 35871125 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 107443000, + "p95_ns": 142696000, + "p99_ns": 160172000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "f2b32199e53b2bb5b1c807bd80168468c75338d3e1a5055d88fc340c4b3118a8", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "f2b32199e53b2bb5b1c807bd80168468c75338d3e1a5055d88fc340c4b3118a8", + "stored": "f2b32199e53b2bb5b1c807bd80168468c75338d3e1a5055d88fc340c4b3118a8" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 2607684502, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59507583, + "ObservedEvents": 50000, + "VerificationNS": 277525417, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 463, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10418984625, + "DrainNS": 418984625, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4798.9321224283885, + "ack_latency": { + "p50_ns": 22941750, + "p95_ns": 26967584, + "p99_ns": 29952959 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 108116000, + "p95_ns": 139877000, + "p99_ns": 151984000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "56cf9957ddc42750ec06d0809ec2c6368a3758384482d2975ce56e044ab44cba", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "56cf9957ddc42750ec06d0809ec2c6368a3758384482d2975ce56e044ab44cba", + "stored": "56cf9957ddc42750ec06d0809ec2c6368a3758384482d2975ce56e044ab44cba" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 3027386629, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 66680208, + "ObservedEvents": 50000, + "VerificationNS": 284472917, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 469, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10478080750, + "DrainNS": 478080750, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4771.866259954143, + "ack_latency": { + "p50_ns": 23289708, + "p95_ns": 28194167, + "p99_ns": 35505083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 110738000, + "p95_ns": 147120000, + "p99_ns": 158948000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "11c964cd9aae5904dba238ff9d5b36d9b3239554fcc4380329dea9e6adc9c7b0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "11c964cd9aae5904dba238ff9d5b36d9b3239554fcc4380329dea9e6adc9c7b0", + "stored": "11c964cd9aae5904dba238ff9d5b36d9b3239554fcc4380329dea9e6adc9c7b0" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-rate-10000", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 100000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 10000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-10000-attempt-1.json.gz", + "SHA256": "d6b1b248af9bec8ae81e1995009f79ecaa51ecfef789c7eee05efad5994be766", + "Size": 2085683, + "RawBytes": 8795472 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-10000-attempt-1.json.gz", + "SHA256": "d6b1b248af9bec8ae81e1995009f79ecaa51ecfef789c7eee05efad5994be766", + "Size": 2085683, + "RawBytes": 8795472 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-rate-10000", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 10000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99800, + "AcceptedAfterWindow": 200, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 4796400950, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56014458, + "ObservedEvents": 100000, + "VerificationNS": 565229166, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1400, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10846931666, + "DrainNS": 846931666, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9980, + "PersistedEPS": 9219.19701158003, + "ack_latency": { + "p50_ns": 22179416, + "p95_ns": 32202209, + "p99_ns": 49580333 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 144594000, + "p95_ns": 210130000, + "p99_ns": 262606000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "fc81800426f61675305e326aee326fcc196a7afe95756f5f6f76143e9222b592", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "fc81800426f61675305e326aee326fcc196a7afe95756f5f6f76143e9222b592", + "stored": "fc81800426f61675305e326aee326fcc196a7afe95756f5f6f76143e9222b592" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99800, + "AcceptedAfterWindow": 200, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 5029455718, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 64391667, + "ObservedEvents": 100000, + "VerificationNS": 548898125, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1193, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10831766833, + "DrainNS": 831766833, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9980, + "PersistedEPS": 9232.10419331965, + "ack_latency": { + "p50_ns": 22752000, + "p95_ns": 31133250, + "p99_ns": 37125917 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 152171000, + "p95_ns": 212488000, + "p99_ns": 243332000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "4941b0538cd8e8421d428671e975816e08d4ddb351bdec63dd477abb837edd06", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "4941b0538cd8e8421d428671e975816e08d4ddb351bdec63dd477abb837edd06", + "stored": "4941b0538cd8e8421d428671e975816e08d4ddb351bdec63dd477abb837edd06" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99700, + "AcceptedAfterWindow": 300, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 5989808288, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 60892125, + "ObservedEvents": 100000, + "VerificationNS": 577729917, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1600, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10889437542, + "DrainNS": 889437542, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9970, + "PersistedEPS": 9183.210759445117, + "ack_latency": { + "p50_ns": 22685333, + "p95_ns": 31826500, + "p99_ns": 43007583 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 160447000, + "p95_ns": 243959000, + "p99_ns": 312562000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "18bc0d91061ff51628b111bd731f42f62e6085f3cff7efe6219e2306dbe39003", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "18bc0d91061ff51628b111bd731f42f62e6085f3cff7efe6219e2306dbe39003", + "stored": "18bc0d91061ff51628b111bd731f42f62e6085f3cff7efe6219e2306dbe39003" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-payload-1024", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 10, + "PayloadBytes": 1024, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-1024-attempt-1.json.gz", + "SHA256": "397ce2694350ca1a34e1772b3f83d0373f8eb06a0db821c2fd0c78e4fcffbb4d", + "Size": 280475, + "RawBytes": 1236068 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-1024-attempt-1.json.gz", + "SHA256": "397ce2694350ca1a34e1772b3f83d0373f8eb06a0db821c2fd0c78e4fcffbb4d", + "Size": 280475, + "RawBytes": 1236068 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-payload-1024", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 1024, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9980, + "AcceptedAfterWindow": 20, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 3597504962, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56024792, + "ObservedEvents": 10000, + "VerificationNS": 138009125, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 2, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 82, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10229256417, + "DrainNS": 229256417, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998, + "PersistedEPS": 977.5881640214826, + "ack_latency": { + "p50_ns": 18146000, + "p95_ns": 27231041, + "p99_ns": 46701041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 114867000, + "p95_ns": 157276000, + "p99_ns": 198771000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "0985bb9abccdfdd3fd1f84fc6990ca87d2055f46866644f86364c26f84b95a5f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "0985bb9abccdfdd3fd1f84fc6990ca87d2055f46866644f86364c26f84b95a5f", + "stored": "0985bb9abccdfdd3fd1f84fc6990ca87d2055f46866644f86364c26f84b95a5f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 203, + "ObserverQueries": 812, + "ObserverQueryNS": 3981094658, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56225709, + "ObservedEvents": 10000, + "VerificationNS": 127120500, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 104, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10263751791, + "DrainNS": 263751791, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 974.3025945706056, + "ack_latency": { + "p50_ns": 17752375, + "p95_ns": 24166750, + "p99_ns": 27432750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 116026000, + "p95_ns": 155159000, + "p99_ns": 174721000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "acba6dff3020e1dd7c11ce0fe2b6a63af42ecc5c5d7f887f3749ce7421707667", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "acba6dff3020e1dd7c11ce0fe2b6a63af42ecc5c5d7f887f3749ce7421707667", + "stored": "acba6dff3020e1dd7c11ce0fe2b6a63af42ecc5c5d7f887f3749ce7421707667" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 203, + "ObserverQueries": 812, + "ObserverQueryNS": 4159555708, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 70576125, + "ObservedEvents": 10000, + "VerificationNS": 134417083, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 99, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10273409083, + "DrainNS": 273409083, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 973.3867228695851, + "ack_latency": { + "p50_ns": 17884458, + "p95_ns": 25757708, + "p99_ns": 45971458 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 115907000, + "p95_ns": 164124000, + "p99_ns": 203020000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a27a83e5d681e871ac6f371a8a47d72e7c88deba762abfa888f689a367ff179d", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a27a83e5d681e871ac6f371a8a47d72e7c88deba762abfa888f689a367ff179d", + "stored": "a27a83e5d681e871ac6f371a8a47d72e7c88deba762abfa888f689a367ff179d" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-payload-16384", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 10, + "PayloadBytes": 16384, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-16384-attempt-1.json.gz", + "SHA256": "b895d591e4a0b402a0f39919092064c8a37878dbc3ab5b8d0c6d04993ed584a1", + "Size": 286427, + "RawBytes": 1403772 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-16384-attempt-1.json.gz", + "SHA256": "b895d591e4a0b402a0f39919092064c8a37878dbc3ab5b8d0c6d04993ed584a1", + "Size": 286427, + "RawBytes": 1403772 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-payload-16384", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 16384, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9980, + "AcceptedAfterWindow": 20, + "ObserverPolls": 204, + "ObserverQueries": 814, + "ObserverQueryNS": 3876978750, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 62161042, + "ObservedEvents": 10000, + "VerificationNS": 1535059250, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 152, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 11714064417, + "DrainNS": 1714064417, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998, + "PersistedEPS": 853.6746635512377, + "ack_latency": { + "p50_ns": 29415583, + "p95_ns": 44987500, + "p99_ns": 58049958 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 168864000, + "p95_ns": 244177000, + "p99_ns": 323207000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "8caa3772efb09ce636b61213327ea00e1fd2b0fb49b97ae60db3c648a0bd5810", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "8caa3772efb09ce636b61213327ea00e1fd2b0fb49b97ae60db3c648a0bd5810", + "stored": "8caa3772efb09ce636b61213327ea00e1fd2b0fb49b97ae60db3c648a0bd5810" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9820, + "AcceptedAfterWindow": 30, + "ObserverPolls": 802, + "ObserverQueries": 2604, + "ObserverQueryNS": 7865304321, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 74407250, + "ObservedEvents": 9850, + "VerificationNS": 1552880416, + "AmbiguousUnobserved": 150, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "ambiguous_delivery", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 9850, + "Persisted": 9850, + "Ambiguous": 150, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 160, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 41649846583, + "DrainNS": 31649846583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 982, + "PersistedEPS": 236.49546896579503, + "ack_latency": { + "p50_ns": 29832541, + "p95_ns": 51331458, + "p99_ns": 82149459 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 166955000, + "p95_ns": 359498000, + "p99_ns": 449689000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6a0708e350562057a13c792f3bb263c33580f735500a00ca7fbbc03e73e1cc21", + "ambiguous": "11d76c206b89452eee668d6e622acb5a785b5bf465a568563329e1a395ff630b", + "attempted": "39103419a74c7fa1e638eba45ca7176dafe5a11b2bc941912571dccb0825d38d", + "stored": "6a0708e350562057a13c792f3bb263c33580f735500a00ca7fbbc03e73e1cc21" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9880, + "AcceptedAfterWindow": 20, + "ObserverPolls": 801, + "ObserverQueries": 2601, + "ObserverQueryNS": 6894226753, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 68243625, + "ObservedEvents": 9930, + "VerificationNS": 1618706417, + "AmbiguousUnobserved": 70, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "ambiguous_delivery", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 9900, + "Persisted": 9930, + "Ambiguous": 100, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 30, + "BacklogAtWindowEnd": 186, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 41687026041, + "DrainNS": 31687026041, + "PollIntervalNS": 50000000, + "AcceptedEPS": 988, + "PersistedEPS": 238.2036077659666, + "ack_latency": { + "p50_ns": 30214250, + "p95_ns": 49266917, + "p99_ns": 127602958 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 175904000, + "p95_ns": 279029000, + "p99_ns": 326704000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "2aa645511c05a258e183efd1953260f2d82e341f02fa32c41fde4a54fa56da6e", + "ambiguous": "69ea7eb5e915f3d8376e2178f6b3bb638783121de1e7c5b3ccfb91e3911bfc5c", + "attempted": "1a85afba0a6b49ad82dde0d3acd62a82de92ee58cb5cc85371bb9012950651c3", + "stored": "91f6d17b7d42e380d6c7910f1a2230705989b47474aa137e85deef1eaacb8d83" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-burst", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "burst", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-burst-attempt-1.json.gz", + "SHA256": "acad81044bdd9ae2c87ee49c4bb14ba76d36c3254ccd9971595bd0807b634511", + "Size": 194413, + "RawBytes": 855025 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-burst-attempt-1.json.gz", + "SHA256": "acad81044bdd9ae2c87ee49c4bb14ba76d36c3254ccd9971595bd0807b634511", + "Size": 194413, + "RawBytes": 855025 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-burst", + "observer_reconnect": false, + "pattern": "burst", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 655, + "ObserverQueryNS": 790644409, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54010333, + "ObservedEvents": 10000, + "VerificationNS": 71223084, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10141911000, + "DrainNS": 141911000, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 986.0074694009837, + "ack_latency": { + "p50_ns": 21952958, + "p95_ns": 25375791, + "p99_ns": 29855167 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 100949000, + "p95_ns": 127782000, + "p99_ns": 151369000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "acc3874608663ee94b9d13dfa4e4ac56e48e284659a7b6d49a2f773e41006b58", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "acc3874608663ee94b9d13dfa4e4ac56e48e284659a7b6d49a2f773e41006b58", + "stored": "acc3874608663ee94b9d13dfa4e4ac56e48e284659a7b6d49a2f773e41006b58" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 656, + "ObserverQueryNS": 830966748, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59821250, + "ObservedEvents": 10000, + "VerificationNS": 60462416, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10084280208, + "DrainNS": 84280208, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 991.642417082665, + "ack_latency": { + "p50_ns": 22483417, + "p95_ns": 27473333, + "p99_ns": 30710916 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 76517000, + "p95_ns": 102238000, + "p99_ns": 110723000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "44414eb17bacc96c7f6f371430576c4fdf1033d61ff3ee5dc7eacc3118902222", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "44414eb17bacc96c7f6f371430576c4fdf1033d61ff3ee5dc7eacc3118902222", + "stored": "44414eb17bacc96c7f6f371430576c4fdf1033d61ff3ee5dc7eacc3118902222" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 656, + "ObserverQueryNS": 852735297, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55860958, + "ObservedEvents": 10000, + "VerificationNS": 78949750, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10141259167, + "DrainNS": 141259167, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 986.0708453778933, + "ack_latency": { + "p50_ns": 22226834, + "p95_ns": 29102458, + "p99_ns": 36543500 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 100745000, + "p95_ns": 147218000, + "p99_ns": 176147000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "46f6c754ed779f568d7d3d4d32255ce195e514db9cc2a49606b0d57a1b6819b7", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "46f6c754ed779f568d7d3d4d32255ce195e514db9cc2a49606b0d57a1b6819b7", + "stored": "46f6c754ed779f568d7d3d4d32255ce195e514db9cc2a49606b0d57a1b6819b7" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-concurrency-8", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 1, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 8, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-8-attempt-1.json.gz", + "SHA256": "872f2edeff22fc8d16e66045a0acf3746d7fca55dfab7f461005afba10c9ed00", + "Size": 343413, + "RawBytes": 2278200 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-8-attempt-1.json.gz", + "SHA256": "872f2edeff22fc8d16e66045a0acf3746d7fca55dfab7f461005afba10c9ed00", + "Size": 343413, + "RawBytes": 2278200 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 8, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-concurrency-8", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4616, + "AttemptedAfterWindow": 16, + "AcceptedInWindow": 4608, + "AcceptedAfterWindow": 24, + "ObserverPolls": 203, + "ObserverQueries": 810, + "ObserverQueryNS": 866202913, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52714375, + "ObservedEvents": 4632, + "VerificationNS": 34658542, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 4632, + "Accepted": 4632, + "Persisted": 4632, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5368, + "LateSchedules": 278, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 38, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10154143583, + "DrainNS": 154143583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 460.8, + "PersistedEPS": 456.168455974452, + "ack_latency": { + "p50_ns": 16674042, + "p95_ns": 20257875, + "p99_ns": 27406083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 81797000, + "p95_ns": 114918000, + "p99_ns": 191979000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "64f4a10228490c2df17c11342467f8adb9b8d736f094b031d67e59693955b52f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "64f4a10228490c2df17c11342467f8adb9b8d736f094b031d67e59693955b52f", + "stored": "64f4a10228490c2df17c11342467f8adb9b8d736f094b031d67e59693955b52f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4568, + "AttemptedAfterWindow": 16, + "AcceptedInWindow": 4560, + "AcceptedAfterWindow": 24, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 791862958, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53887375, + "ObservedEvents": 4584, + "VerificationNS": 37994042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 4584, + "Accepted": 4584, + "Persisted": 4584, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5416, + "LateSchedules": 304, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 33, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10156235708, + "DrainNS": 156235708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 456, + "PersistedEPS": 451.34832745061374, + "ack_latency": { + "p50_ns": 17359583, + "p95_ns": 21130875, + "p99_ns": 23426875 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 88217000, + "p95_ns": 117375000, + "p99_ns": 130501000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a007efc750935b7e5df7dc1f9f3c0e7b65003422d9ad7a40064be2944a86fd38", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a007efc750935b7e5df7dc1f9f3c0e7b65003422d9ad7a40064be2944a86fd38", + "stored": "a007efc750935b7e5df7dc1f9f3c0e7b65003422d9ad7a40064be2944a86fd38" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4385, + "AttemptedAfterWindow": 13, + "AcceptedInWindow": 4377, + "AcceptedAfterWindow": 21, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 838142834, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 60472083, + "ObservedEvents": 4398, + "VerificationNS": 38787417, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 4398, + "Accepted": 4398, + "Persisted": 4398, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5602, + "LateSchedules": 390, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 37, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10156614583, + "DrainNS": 156614583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 437.7, + "PersistedEPS": 433.0183019213224, + "ack_latency": { + "p50_ns": 18018916, + "p95_ns": 22055583, + "p99_ns": 26228500 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 91806000, + "p95_ns": 123814000, + "p99_ns": 135075000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "f2af14351a9822b64a96adf09e434a8cfd4c26d3f4e595b3c348eadc2534716a", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "f2af14351a9822b64a96adf09e434a8cfd4c26d3f4e595b3c348eadc2534716a", + "stored": "f2af14351a9822b64a96adf09e434a8cfd4c26d3f4e595b3c348eadc2534716a" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "pipeline-concurrency-64", + "Kind": "pipeline", + "Recovery": "", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 10000, + "BatchSize": 1, + "PayloadBytes": 256, + "Rate": 1000, + "Concurrency": 64, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 10000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 0 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-64-attempt-1.json.gz", + "SHA256": "ab20868f676a0e5e4f2e9388591e34be49a5cc66e7227e7c17cf7ce693711435", + "Size": 809129, + "RawBytes": 4901624 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-64-attempt-1.json.gz", + "SHA256": "ab20868f676a0e5e4f2e9388591e34be49a5cc66e7227e7c17cf7ce693711435", + "Size": 809129, + "RawBytes": 4901624 + } + } + ], + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 64, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-concurrency-64", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9989, + "AcceptedAfterWindow": 11, + "ObserverPolls": 203, + "ObserverQueries": 810, + "ObserverQueryNS": 1024408171, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50345292, + "ObservedEvents": 10000, + "VerificationNS": 60949083, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 3, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 86, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10185377250, + "DrainNS": 185377250, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.9, + "PersistedEPS": 981.7996677540834, + "ack_latency": { + "p50_ns": 12507708, + "p95_ns": 21818833, + "p99_ns": 62487791 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 80283000, + "p95_ns": 140772000, + "p99_ns": 270584000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "4fef9f4d0e5eae011ddfa0a0d16b6600315023c378488070cf7920cbe7317706", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "4fef9f4d0e5eae011ddfa0a0d16b6600315023c378488070cf7920cbe7317706", + "stored": "4fef9f4d0e5eae011ddfa0a0d16b6600315023c378488070cf7920cbe7317706" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9989, + "AcceptedAfterWindow": 11, + "ObserverPolls": 199, + "ObserverQueries": 796, + "ObserverQueryNS": 1619755052, + "ObserverLatePolls": 1, + "ObserverMaxGapNS": 208736167, + "ObservedEvents": 10000, + "VerificationNS": 55045417, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements", + "observer_poll_delays" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 63, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 87, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10127520250, + "DrainNS": 127520250, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.9, + "PersistedEPS": 987.4085415924002, + "ack_latency": { + "p50_ns": 15550541, + "p95_ns": 42710542, + "p99_ns": 84716250 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 94290000, + "p95_ns": 167797000, + "p99_ns": 302013000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "8ea0ea59e91dd074730ff4bffc1a50698e61af3683495a65e2432d2c6a7e29f9", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "8ea0ea59e91dd074730ff4bffc1a50698e61af3683495a65e2432d2c6a7e29f9", + "stored": "8ea0ea59e91dd074730ff4bffc1a50698e61af3683495a65e2432d2c6a7e29f9" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9987, + "AcceptedAfterWindow": 13, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 1387337663, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50409000, + "ObservedEvents": 10000, + "VerificationNS": 58813708, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 84, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10183333833, + "DrainNS": 183333833, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.7, + "PersistedEPS": 981.9966784938455, + "ack_latency": { + "p50_ns": 15008708, + "p95_ns": 24771333, + "p99_ns": 37338583 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 93741000, + "p95_ns": 136232000, + "p99_ns": 166268000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a26dfa856a3769137ed94e9fd11b25db79a6e5860df2b3354f32b72c8ac19418", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a26dfa856a3769137ed94e9fd11b25db79a6e5860df2b3354f32b72c8ac19418", + "stored": "a26dfa856a3769137ed94e9fd11b25db79a6e5860df2b3354f32b72c8ac19418" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + } + }, + { + "Case": { + "ID": "recovery-database", + "Kind": "recovery", + "Recovery": "database", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 7500, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 500, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 15000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 3000000000, + "RestoreAt": 8000000000 + }, + "Status": "limited", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-database-attempt-1.json.gz", + "SHA256": "04b716e0460bb18b75ded351395233776f321835aaf90f185712728a1773c570", + "Size": 154279, + "RawBytes": 713104 + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-database-attempt-1.json.gz", + "SHA256": "04b716e0460bb18b75ded351395233776f321835aaf90f185712728a1773c570", + "Size": 154279, + "RawBytes": 713104 + } + } + ], + "Summary": { + "Kind": "database", + "Runs": [ + { + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3001948416, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:35:29.786325Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 4201047416, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:35:30.98542Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8002119875, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:35:34.786481Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8979710916, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:35:35.764069Z" + } + ], + "Pipeline": { + "ObserverOutages": 108, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 638, + "ObserverQueryNS": 1406738582, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 58872833, + "ObservedEvents": 7500, + "VerificationNS": 49764125, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 1, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15117661000, + "DrainNS": 117661000, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 496.10849191551523, + "ack_latency": { + "p50_ns": 28212209, + "p95_ns": 48452917, + "p99_ns": 55638542 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 101946000, + "p95_ns": 6703691000, + "p99_ns": 7249316000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "269fb048d9e5ef16def41d920edbab24e93773b9b2b43deaf12dc2eb03b68f86", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "269fb048d9e5ef16def41d920edbab24e93773b9b2b43deaf12dc2eb03b68f86", + "stored": "269fb048d9e5ef16def41d920edbab24e93773b9b2b43deaf12dc2eb03b68f86" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3002000125, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:35:45.038146Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 4004943625, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:35:46.041085Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8001898542, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:35:50.038027Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8805051375, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:35:50.841178Z" + } + ], + "Pipeline": { + "ObserverOutages": 104, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 663, + "ObserverQueryNS": 1327145886, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 62936292, + "ObservedEvents": 7500, + "VerificationNS": 57254875, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 2, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15081202750, + "DrainNS": 81202750, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.3078158504301, + "ack_latency": { + "p50_ns": 27864500, + "p95_ns": 47399584, + "p99_ns": 62102417 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 95059000, + "p95_ns": 5196935000, + "p99_ns": 5650990000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "3c37a20a3ba8ca6c40ab373c3d7325801ce45e0af5d5b796e712c1ab050008d0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "3c37a20a3ba8ca6c40ab373c3d7325801ce45e0af5d5b796e712c1ab050008d0", + "stored": "3c37a20a3ba8ca6c40ab373c3d7325801ce45e0af5d5b796e712c1ab050008d0" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3006794209, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:00.234632Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3962677209, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:01.190512Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8001769084, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:36:05.229591Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8869215834, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:36:06.097035Z" + } + ], + "Pipeline": { + "ObserverOutages": 106, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 648, + "ObserverQueryNS": 1614690879, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54749291, + "ObservedEvents": 7500, + "VerificationNS": 44161292, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 3, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15064425334, + "DrainNS": 64425334, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.86167302862214, + "ack_latency": { + "p50_ns": 32365750, + "p95_ns": 55137917, + "p99_ns": 63149167 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 103483000, + "p95_ns": 6651924000, + "p99_ns": 7205274000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "b1a0304e4f22fb1165c2067a18238eb1404c3c1e056e9c99d2b06a99d43f1912", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "b1a0304e4f22fb1165c2067a18238eb1404c3c1e056e9c99d2b06a99d43f1912", + "stored": "b1a0304e4f22fb1165c2067a18238eb1404c3c1e056e9c99d2b06a99d43f1912" + }, + "backlog": null, + "correct": true + } + } + ], + "Notes": [ + "Availability experiment; not a capacity estimate. Actual control timestamps and reconciled ID sets are retained.", + "A forced consumer kill does not claim to land in every database/offset commit window; the deterministic crash regression remains separate." + ] + } + }, + { + "Case": { + "ID": "recovery-consumer", + "Kind": "recovery", + "Recovery": "consumer", + "Pattern": "steady", + "PayloadProfile": "varied", + "Count": 7500, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 500, + "Concurrency": 32, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 15000000000, + "Warmup": 2000000000, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 3000000000, + "RestoreAt": 5000000000 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-consumer-attempt-1.json.gz", + "SHA256": "d1b207ce92acf905019a30d2a5a2767e02513f491850103650e77e16c4728ad0", + "Size": 149806, + "RawBytes": 722509 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-consumer-attempt-1.json.gz", + "SHA256": "d1b207ce92acf905019a30d2a5a2767e02513f491850103650e77e16c4728ad0", + "Size": 149806, + "RawBytes": 722509 + } + } + ], + "Summary": { + "Kind": "consumer", + "Runs": [ + { + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3001409042, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:18.219466Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3780615125, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:18.998669Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 5000500208, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:20.218551Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 7753107917, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:22.97115Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 940, + "ObserverQueryNS": 1537933802, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53558250, + "ObservedEvents": 7500, + "VerificationNS": 48869958, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15067714125, + "DrainNS": 67714125, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.75300604861985, + "ack_latency": { + "p50_ns": 27111500, + "p95_ns": 46578666, + "p99_ns": 54702042 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2598904000, + "p95_ns": 9300123000, + "p99_ns": 9902755000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "e7f4e6af5c3d0260cce3d14b8675cdbfba8638a321ca95076b27338de25b1c9c", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "e7f4e6af5c3d0260cce3d14b8675cdbfba8638a321ca95076b27338de25b1c9c", + "stored": "e7f4e6af5c3d0260cce3d14b8675cdbfba8638a321ca95076b27338de25b1c9c" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3002930333, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:33.39871Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3786349667, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:34.182127Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 5001432958, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:35.397206Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 7665722000, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:38.061488Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 942, + "ObserverQueryNS": 1678882665, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 60056500, + "ObservedEvents": 7500, + "VerificationNS": 54793167, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15087642333, + "DrainNS": 87642333, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.09555903216545, + "ack_latency": { + "p50_ns": 28258875, + "p95_ns": 49599584, + "p99_ns": 52790375 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2601031000, + "p95_ns": 9298460000, + "p99_ns": 9898746000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "dc5da53cc08b696f2b6ca93e06beedab8c111059717cbbf0ddb6ce921bd658a1", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "dc5da53cc08b696f2b6ca93e06beedab8c111059717cbbf0ddb6ce921bd658a1", + "stored": "dc5da53cc08b696f2b6ca93e06beedab8c111059717cbbf0ddb6ce921bd658a1" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3002307166, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:48.609982Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3772501458, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:49.380174Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 5001161375, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:50.60883Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 7675560500, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:53.283221Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 947, + "ObserverQueryNS": 1676620996, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56847000, + "ObservedEvents": 7500, + "VerificationNS": 43331916, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15068301708, + "DrainNS": 68301708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.7335963493571, + "ack_latency": { + "p50_ns": 28240333, + "p95_ns": 48629000, + "p99_ns": 54380791 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2648372000, + "p95_ns": 9346650000, + "p99_ns": 9947871000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "be610edd352d53b52d74587a65635f876d534f625922e0e0e66e2e5ca73aa08c", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "be610edd352d53b52d74587a65635f876d534f625922e0e0e66e2e5ca73aa08c", + "stored": "be610edd352d53b52d74587a65635f876d534f625922e0e0e66e2e5ca73aa08c" + }, + "backlog": null, + "correct": true + } + } + ], + "Notes": [ + "Availability experiment; not a capacity estimate. Actual control timestamps and reconciled ID sets are retained.", + "A forced consumer kill does not claim to land in every database/offset commit window; the deterministic crash regression remains separate." + ] + } + }, + { + "Case": { + "ID": "recovery-outbox", + "Kind": "recovery", + "Recovery": "outbox", + "Pattern": "", + "PayloadProfile": "varied", + "Count": 100, + "BatchSize": 100, + "PayloadBytes": 256, + "Rate": 0, + "Concurrency": 0, + "Repetitions": 3, + "DuplicateFraction": 0, + "Window": 0, + "Warmup": 0, + "Drain": 30000000000, + "Poll": 50000000, + "FaultAt": 0, + "RestoreAt": 8000000000 + }, + "Status": "complete", + "Attempt": 1, + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-outbox-attempt-1.json.gz", + "SHA256": "ed1018de8e098cc6acfd927391656cc543c9f08ce7249ce50154ea8ffa52139c", + "Size": 8533, + "RawBytes": 39469 + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-outbox-attempt-1.json.gz", + "SHA256": "ed1018de8e098cc6acfd927391656cc543c9f08ce7249ce50154ea8ffa52139c", + "Size": 8533, + "RawBytes": 39469 + } + } + ], + "Summary": { + "Kind": "outbox", + "Runs": [ + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5117990125, + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 125, + "PlannedNS": 0, + "At": "2026-11-03T22:37:03.61828Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 967424875, + "PlannedNS": 0, + "At": "2026-11-03T22:37:04.585703Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8969845708, + "PlannedNS": 8967432917, + "At": "2026-11-03T22:37:12.588105Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 9818350792, + "PlannedNS": 0, + "At": "2026-11-03T22:37:13.436601Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 967428750, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 6085495542, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 15070022458, + "Pending": 0, + "Acknowledged": 100 + } + ] + }, + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5095342792, + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 333, + "PlannedNS": 0, + "At": "2026-11-03T22:37:24.131524Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 847263416, + "PlannedNS": 0, + "At": "2026-11-03T22:37:24.978785Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8851715791, + "PlannedNS": 8847285125, + "At": "2026-11-03T22:37:32.983213Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 9588275541, + "PlannedNS": 0, + "At": "2026-11-03T22:37:33.71977Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 847278875, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 5942647166, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 12503463750, + "Pending": 0, + "Acknowledged": 100 + } + ] + }, + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5112679375, + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 208, + "PlannedNS": 0, + "At": "2026-11-03T22:37:44.287129Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 886253250, + "PlannedNS": 0, + "At": "2026-11-03T22:37:45.173379Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8888072916, + "PlannedNS": 8886264375, + "At": "2026-11-03T22:37:53.175174Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 9624534750, + "PlannedNS": 0, + "At": "2026-11-03T22:37:53.911634Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 886261750, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 5999003250, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 13131595125, + "Pending": 0, + "Acknowledged": 100 + } + ] + } + ], + "Notes": [ + "One untimed warm-up order before three measured broker outages.100 pending local events per repetition; the first one-attempt dispatch exceeds the broker publish timeout.", + "Pending-local samples are observations after commands, not exact transition times. HTTP ACK still precedes PostgreSQL persistence." + ] + } + } + ], + "Notes": [ + "Smoke runs verify correctness only. Full runs retain every configured repetition; limited outcomes are not capacity claims.", + "Raw captures contain empirical samples and UUID population indices (or explicit outbox UUIDs); gzip mtime=0 with SHA256. Submitted IDs regenerate from namespace/seed/index.", + "Failed and interrupted attempts remain in case History. A resumed incomplete case restarts all three repetitions on a fresh owned stack; completed captures are immutable." + ] +} diff --git a/benchmarks/results/selfhost-copy-2026-11-04/journal.json b/benchmarks/results/selfhost-copy-2026-11-04/journal.json new file mode 100644 index 0000000..37abeff --- /dev/null +++ b/benchmarks/results/selfhost-copy-2026-11-04/journal.json @@ -0,0 +1,5235 @@ +{ + "Status": "complete", + "ExecutionAttempts": 1, + "MetadataArtifacts": [ + { + "Codec": "json", + "Path": "manifest-1.json", + "SHA256": "ab89359ae672b5a26618aedc6fec10664f469f90e296bb134c482a9c1a14b0cb", + "Size": 14128, + "RawBytes": 14128 + } + ], + "ManifestFiles": [ + "manifest-1.json" + ], + "Resources": [ + { + "Codec": "gzip", + "Path": "resources-1.json.gz", + "SHA256": "ff96e4b4af6ab093a8d3e97eeec74151af67aba10d95c1dd83a4fc751bf383ac", + "Size": 25335, + "RawBytes": 505001 + } + ], + "Schema": 1, + "Identity": { + "SourceSHA": "dccf4b3783a83010a86cceb5f318fc0b23645b56", + "SourceFingerprint": "25e4030c4039e03531efcbabdc8da836aa97fe5cdeabbfdd94b15fb48008ce68", + "ControlsFingerprint": "48c89aca641858936a3ae61db38c6683c1e3ec590b3c447c2548cbf4c2f9e318", + "ImagesFingerprint": "46058c0c246a346a73a5980052ca2595e385b37ed18966f80d3e6a189016c0bd", + "ConfigFingerprint": "738367cf2d26017bbe811849d3aacaedeb4891091f61e7e3c50904733a855cfe", + "Mode": "full", + "Seed": 42, + "SourceDirty": false + }, + "RunNamespace": "ae237e04-731d-4320-af54-3ff38d8ae65f", + "Cases": { + "db-batch-1": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1-attempt-1.json.gz", + "SHA256": "369bca674073b33284fe19c594e52d757dc35b7ec1b0277e9eada7781dcd2f56", + "Size": 130752, + "RawBytes": 342879 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-1", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 1, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5451552417, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4945587042, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 23787816500, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4698216541, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 22270728125, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4769635625, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 20999593167, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 7943784875, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4443313042, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1-attempt-1.json.gz", + "SHA256": "369bca674073b33284fe19c594e52d757dc35b7ec1b0277e9eada7781dcd2f56", + "Size": 130752, + "RawBytes": 342879 + } + } + ], + "ErrorClass": "" + }, + "db-batch-10": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-10-attempt-1.json.gz", + "SHA256": "30e74d69c56dfb4f9a9abcaa766bdf6ba38b6f34e125a11c263588f71ca56c46", + "Size": 52983, + "RawBytes": 139114 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-10", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 10, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4868561042, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 677020042, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2791043417, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1647866083, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2883055375, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5296327458, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 2405385708, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 8848153458, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 500646333, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-10-attempt-1.json.gz", + "SHA256": "30e74d69c56dfb4f9a9abcaa766bdf6ba38b6f34e125a11c263588f71ca56c46", + "Size": 52983, + "RawBytes": 139114 + } + } + ], + "ErrorClass": "" + }, + "db-batch-100": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-100-attempt-1.json.gz", + "SHA256": "6a7837588b8bd8e687d9ac3290c16c4a9fd38789596132203930d5d5493c34ce", + "Size": 44383, + "RawBytes": 118372 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-100", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6252412291, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 131458625, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 293925125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 259989833, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 435312792, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 8931380875, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 287726625, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4922131084, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 158938208, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-100-attempt-1.json.gz", + "SHA256": "6a7837588b8bd8e687d9ac3290c16c4a9fd38789596132203930d5d5493c34ce", + "Size": 44383, + "RawBytes": 118372 + } + } + ], + "ErrorClass": "" + }, + "db-batch-1000": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1000-attempt-1.json.gz", + "SHA256": "80469d563341738d16ce5cf11f48db82469d27982104abec7a872431e2c4611f", + "Size": 43863, + "RawBytes": 119033 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-1000", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 1000, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 9971811333, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 73004667, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 91250875, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 94170041, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 90251167, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6222443792, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 81666875, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6220183875, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 78067833, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-1000-attempt-1.json.gz", + "SHA256": "80469d563341738d16ce5cf11f48db82469d27982104abec7a872431e2c4611f", + "Size": 43863, + "RawBytes": 119033 + } + } + ], + "ErrorClass": "" + }, + "db-batch-50": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-50-attempt-1.json.gz", + "SHA256": "2631dd527972d301f38274a089361f12f72e9066bd682d5a44db5a949e1b9481", + "Size": 45158, + "RawBytes": 120934 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-50", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 50, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 4533726209, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 170107625, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 581224916, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 330741292, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 541003333, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6550575958, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 524224167, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6138724000, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 202138834, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-50-attempt-1.json.gz", + "SHA256": "2631dd527972d301f38274a089361f12f72e9066bd682d5a44db5a949e1b9481", + "Size": 45158, + "RawBytes": 120934 + } + } + ], + "ErrorClass": "" + }, + "db-batch-500": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-500-attempt-1.json.gz", + "SHA256": "907403528ed1fdbc1c4eea24f3517026f7b78799ff83320b6c42b45e981fb188", + "Size": 42663, + "RawBytes": 121453 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-batch-500", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0 + }, + "batch_size": 500, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6120738125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 97039375, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 104231416, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 129472125, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 119877958, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6334902125, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 90675500, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6171369250, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 76679292, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-batch-500-attempt-1.json.gz", + "SHA256": "907403528ed1fdbc1c4eea24f3517026f7b78799ff83320b6c42b45e981fb188", + "Size": 42663, + "RawBytes": 121453 + } + } + ], + "ErrorClass": "" + }, + "db-duplicates-10": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-10-attempt-1.json.gz", + "SHA256": "924be0c894d2b9220312c5fc71726a70a3e1d44d6a3134cfc8c6828d14fd8aed", + "Size": 43114, + "RawBytes": 116290 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-duplicates-10", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.1 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 4523910458, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 128403750, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 299802667, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 192726792, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 377546333, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 4831851792, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 243185291, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 5630481709, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 4500, + "duplicates": 500, + "elapsed_ns": 149752458, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-10-attempt-1.json.gz", + "SHA256": "924be0c894d2b9220312c5fc71726a70a3e1d44d6a3134cfc8c6828d14fd8aed", + "Size": 43114, + "RawBytes": 116290 + } + } + ], + "ErrorClass": "" + }, + "db-duplicates-50": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-50-attempt-1.json.gz", + "SHA256": "3bbd6b9501484547f600f99bee631186635f0c800da55b97b6175623214aed0e", + "Size": 42624, + "RawBytes": 116502 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-duplicates-50", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.5 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 4308531667, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 105259084, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 356780958, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 218304708, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 475505500, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 6885547292, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 304966000, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 3604732000, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 2500, + "duplicates": 2500, + "elapsed_ns": 158724625, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-50-attempt-1.json.gz", + "SHA256": "3bbd6b9501484547f600f99bee631186635f0c800da55b97b6175623214aed0e", + "Size": 42624, + "RawBytes": 116502 + } + } + ], + "ErrorClass": "" + }, + "db-duplicates-90": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-90-attempt-1.json.gz", + "SHA256": "48a0e237918e20300979db0a31127097631c9a1a13a49b7cbeddad222cca85ad", + "Size": 39317, + "RawBytes": 111273 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-duplicates-90", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 256, + "duplicate_fraction": 0.9 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1883489250, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 78453250, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 382714791, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 100039250, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 453156084, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1478754459, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 262018166, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 1357953750, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 500, + "duplicates": 4500, + "elapsed_ns": 63792791, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-duplicates-90-attempt-1.json.gz", + "SHA256": "48a0e237918e20300979db0a31127097631c9a1a13a49b7cbeddad222cca85ad", + "Size": 39317, + "RawBytes": 111273 + } + } + ], + "ErrorClass": "" + }, + "db-payload-1024": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-1024-attempt-1.json.gz", + "SHA256": "e63d2e2f4ad5284a71f8e48c095509ff5d6806f16f095911d9941b1ec54c6636", + "Size": 45348, + "RawBytes": 121865 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-payload-1024", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 1024, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 6808433458, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 210348917, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 524147625, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 231698791, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 453167834, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 9562879291, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 306062833, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 5816228125, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 256530875, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-1024-attempt-1.json.gz", + "SHA256": "e63d2e2f4ad5284a71f8e48c095509ff5d6806f16f095911d9941b1ec54c6636", + "Size": 45348, + "RawBytes": 121865 + } + } + ], + "ErrorClass": "" + }, + "db-payload-16384": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-16384-attempt-1.json.gz", + "SHA256": "9e1d5fb267e80f82dc5545f7d2c36179a692860d2d75fe8b009b6b33dc0a36dc", + "Size": 48591, + "RawBytes": 125472 + }, + "Summary": { + "kind": "database", + "workload": { + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/db-payload-16384", + "payload_profile": "varied", + "seed": 42, + "count": 5000, + "payload_bytes": 16384, + "duplicate_fraction": 0 + }, + "batch_size": 100, + "repetitions": 3, + "runs": [ + { + "method": "insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 14687461042, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1097110709, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 1, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1527117292, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1283645875, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1359904709, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 2, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 14272579542, + "batch_ns": null, + "correct": true + }, + { + "method": "copy-merge", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 1197085209, + "batch_ns": null, + "correct": true + }, + { + "method": "insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 15618113041, + "batch_ns": null, + "correct": true + }, + { + "method": "batch-insert", + "repetition": 3, + "submitted": 5000, + "inserted": 5000, + "duplicates": 0, + "elapsed_ns": 946918750, + "batch_ns": null, + "correct": true + } + ], + "notes": [ + "Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", + "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", + "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/db-payload-16384-attempt-1.json.gz", + "SHA256": "9e1d5fb267e80f82dc5545f7d2c36179a692860d2d75fe8b009b6b33dc0a36dc", + "Size": 48591, + "RawBytes": 125472 + } + } + ], + "ErrorClass": "" + }, + "pipeline-batch-1": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-1-attempt-1.json.gz", + "SHA256": "9b2a39ac29a9a1b706f62eab35fc6edc02c895c2b6ca2e024e7a9525d3712170", + "Size": 804807, + "RawBytes": 4810274 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-batch-1", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9989, + "AcceptedAfterWindow": 11, + "ObserverPolls": 203, + "ObserverQueries": 812, + "ObserverQueryNS": 1377441001, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 51255583, + "ObservedEvents": 10000, + "VerificationNS": 58771708, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 92, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10194055917, + "DrainNS": 194055917, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.9, + "PersistedEPS": 980.9638167006339, + "ack_latency": { + "p50_ns": 12383041, + "p95_ns": 18663708, + "p99_ns": 24394000 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 85364000, + "p95_ns": 122868000, + "p99_ns": 152523000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "28d0fcd3609452304692b5def184c293f4825ce8d5b3d7ad3fd98d7bcafb1ef9", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "28d0fcd3609452304692b5def184c293f4825ce8d5b3d7ad3fd98d7bcafb1ef9", + "stored": "28d0fcd3609452304692b5def184c293f4825ce8d5b3d7ad3fd98d7bcafb1ef9" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 9466, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9449, + "AcceptedAfterWindow": 17, + "ObserverPolls": 203, + "ObserverQueries": 800, + "ObserverQueryNS": 1368076030, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50765291, + "ObservedEvents": 9466, + "VerificationNS": 52158542, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 9466, + "Accepted": 9466, + "Persisted": 9466, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 534, + "LateSchedules": 22, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 90, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10182052250, + "DrainNS": 182052250, + "PollIntervalNS": 50000000, + "AcceptedEPS": 944.9, + "PersistedEPS": 929.6750564209685, + "ack_latency": { + "p50_ns": 12732958, + "p95_ns": 23652083, + "p99_ns": 65023292 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 83314000, + "p95_ns": 177539000, + "p99_ns": 486214000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "1c4b2b933b3a983b1a4d6ed4184f6ff2cc65058c5cea59a888150a9163e9838b", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "1c4b2b933b3a983b1a4d6ed4184f6ff2cc65058c5cea59a888150a9163e9838b", + "stored": "1c4b2b933b3a983b1a4d6ed4184f6ff2cc65058c5cea59a888150a9163e9838b" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9983, + "AcceptedAfterWindow": 17, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 1576483460, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50502291, + "ObservedEvents": 10000, + "VerificationNS": 55478166, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 96, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10133476916, + "DrainNS": 133476916, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.3, + "PersistedEPS": 986.8281225578903, + "ack_latency": { + "p50_ns": 14255166, + "p95_ns": 21135834, + "p99_ns": 24498250 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 86632000, + "p95_ns": 118017000, + "p99_ns": 131092000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "39459f687870f205295b9b59b3146f17ed54ec3738c0d9f90705232d5bbda2a4", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "39459f687870f205295b9b59b3146f17ed54ec3738c0d9f90705232d5bbda2a4", + "stored": "39459f687870f205295b9b59b3146f17ed54ec3738c0d9f90705232d5bbda2a4" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-1-attempt-1.json.gz", + "SHA256": "9b2a39ac29a9a1b706f62eab35fc6edc02c895c2b6ca2e024e7a9525d3712170", + "Size": 804807, + "RawBytes": 4810274 + } + } + ], + "ErrorClass": "" + }, + "pipeline-batch-10": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-10-attempt-1.json.gz", + "SHA256": "eabe032e9145789c7ea3ef879048266e74f6a45dddbb789e5a28c001be50c3e8", + "Size": 270405, + "RawBytes": 1221356 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-batch-10", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 1065330545, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56193583, + "ObservedEvents": 10000, + "VerificationNS": 54267625, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 2, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 95, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10129323834, + "DrainNS": 129323834, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 987.2327278583085, + "ack_latency": { + "p50_ns": 16320250, + "p95_ns": 21827291, + "p99_ns": 26217041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 86364000, + "p95_ns": 116573000, + "p99_ns": 131375000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "2308f929bbe4618d9fff677d91c7e7ff182b2ba6ea512b30e06512052bfe23d5", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "2308f929bbe4618d9fff677d91c7e7ff182b2ba6ea512b30e06512052bfe23d5", + "stored": "2308f929bbe4618d9fff677d91c7e7ff182b2ba6ea512b30e06512052bfe23d5" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 202, + "ObserverQueries": 804, + "ObserverQueryNS": 1104503993, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55482541, + "ObservedEvents": 10000, + "VerificationNS": 57927792, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 100, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10134078500, + "DrainNS": 134078500, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 986.7695419963443, + "ack_latency": { + "p50_ns": 16227166, + "p95_ns": 28102666, + "p99_ns": 176825667 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 93098000, + "p95_ns": 160529000, + "p99_ns": 322554000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "04a3e6cc5ded1c8cfd3df11d3a60f47f6eece0555ab514fe0383305558fa336f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "04a3e6cc5ded1c8cfd3df11d3a60f47f6eece0555ab514fe0383305558fa336f", + "stored": "04a3e6cc5ded1c8cfd3df11d3a60f47f6eece0555ab514fe0383305558fa336f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 1109773911, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53328500, + "ObservedEvents": 10000, + "VerificationNS": 69103042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 88, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10199933875, + "DrainNS": 199933875, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 980.3985126325144, + "ack_latency": { + "p50_ns": 15924083, + "p95_ns": 21203833, + "p99_ns": 24105417 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 84546000, + "p95_ns": 114733000, + "p99_ns": 126936000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "9d57209e1f3abbc3a335b225d1cee5ab6eee642d1026d50130f0db4c54823cba", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "9d57209e1f3abbc3a335b225d1cee5ab6eee642d1026d50130f0db4c54823cba", + "stored": "9d57209e1f3abbc3a335b225d1cee5ab6eee642d1026d50130f0db4c54823cba" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-10-attempt-1.json.gz", + "SHA256": "eabe032e9145789c7ea3ef879048266e74f6a45dddbb789e5a28c001be50c3e8", + "Size": 270405, + "RawBytes": 1221356 + } + } + ], + "ErrorClass": "" + }, + "pipeline-batch-100": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-100-attempt-1.json.gz", + "SHA256": "67189037495f6b6c21c6ce624b4d5f3cff6579ced93603d95804eb0cf25b1e0a", + "Size": 195702, + "RawBytes": 843832 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-batch-100", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 744, + "ObserverQueryNS": 1320043757, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54871667, + "ObservedEvents": 10000, + "VerificationNS": 70612833, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10106381583, + "DrainNS": 106381583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 989.4738208599856, + "ack_latency": { + "p50_ns": 26848833, + "p95_ns": 35775750, + "p99_ns": 41297750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50916000, + "p95_ns": 102740000, + "p99_ns": 108909000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "cd405735e752334cc4de0c1a4fa5c0efa093ea81bce76f07ef4ce745179a3a40", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "cd405735e752334cc4de0c1a4fa5c0efa093ea81bce76f07ef4ce745179a3a40", + "stored": "cd405735e752334cc4de0c1a4fa5c0efa093ea81bce76f07ef4ce745179a3a40" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 742, + "ObserverQueryNS": 1215422754, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53499583, + "ObservedEvents": 10000, + "VerificationNS": 70658750, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 34, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10103019708, + "DrainNS": 103019708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 989.8030775968472, + "ack_latency": { + "p50_ns": 27208917, + "p95_ns": 35683167, + "p99_ns": 45575542 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 51126000, + "p95_ns": 101067000, + "p99_ns": 104082000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "3f5d1782f6cc8cad9a9a58cb387050eb3ac75e018f4cd1fc8bd4e841de5b9100", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "3f5d1782f6cc8cad9a9a58cb387050eb3ac75e018f4cd1fc8bd4e841de5b9100", + "stored": "3f5d1782f6cc8cad9a9a58cb387050eb3ac75e018f4cd1fc8bd4e841de5b9100" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 738, + "ObserverQueryNS": 1320513923, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52057375, + "ObservedEvents": 10000, + "VerificationNS": 63698500, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 35, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10093028542, + "DrainNS": 93028542, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 990.782891219134, + "ack_latency": { + "p50_ns": 27612459, + "p95_ns": 34361667, + "p99_ns": 36536833 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 51367000, + "p95_ns": 102529000, + "p99_ns": 104402000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "c334c4f73a3eb52422cc5b1b5331cfcca73fbd344fb2343d5bedcbed9dd01b6a", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "c334c4f73a3eb52422cc5b1b5331cfcca73fbd344fb2343d5bedcbed9dd01b6a", + "stored": "c334c4f73a3eb52422cc5b1b5331cfcca73fbd344fb2343d5bedcbed9dd01b6a" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-batch-100-attempt-1.json.gz", + "SHA256": "67189037495f6b6c21c6ce624b4d5f3cff6579ced93603d95804eb0cf25b1e0a", + "Size": 195702, + "RawBytes": 843832 + } + } + ], + "ErrorClass": "" + }, + "pipeline-burst": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-burst-attempt-1.json.gz", + "SHA256": "acad81044bdd9ae2c87ee49c4bb14ba76d36c3254ccd9971595bd0807b634511", + "Size": 194413, + "RawBytes": 855025 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-burst", + "observer_reconnect": false, + "pattern": "burst", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 655, + "ObserverQueryNS": 790644409, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54010333, + "ObservedEvents": 10000, + "VerificationNS": 71223084, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10141911000, + "DrainNS": 141911000, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 986.0074694009837, + "ack_latency": { + "p50_ns": 21952958, + "p95_ns": 25375791, + "p99_ns": 29855167 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 100949000, + "p95_ns": 127782000, + "p99_ns": 151369000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "acc3874608663ee94b9d13dfa4e4ac56e48e284659a7b6d49a2f773e41006b58", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "acc3874608663ee94b9d13dfa4e4ac56e48e284659a7b6d49a2f773e41006b58", + "stored": "acc3874608663ee94b9d13dfa4e4ac56e48e284659a7b6d49a2f773e41006b58" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 656, + "ObserverQueryNS": 830966748, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59821250, + "ObservedEvents": 10000, + "VerificationNS": 60462416, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10084280208, + "DrainNS": 84280208, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 991.642417082665, + "ack_latency": { + "p50_ns": 22483417, + "p95_ns": 27473333, + "p99_ns": 30710916 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 76517000, + "p95_ns": 102238000, + "p99_ns": 110723000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "44414eb17bacc96c7f6f371430576c4fdf1033d61ff3ee5dc7eacc3118902222", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "44414eb17bacc96c7f6f371430576c4fdf1033d61ff3ee5dc7eacc3118902222", + "stored": "44414eb17bacc96c7f6f371430576c4fdf1033d61ff3ee5dc7eacc3118902222" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 10000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 656, + "ObserverQueryNS": 852735297, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55860958, + "ObservedEvents": 10000, + "VerificationNS": 78949750, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 2500000000, + "TotalNS": 10141259167, + "DrainNS": 141259167, + "PollIntervalNS": 50000000, + "AcceptedEPS": 1000, + "PersistedEPS": 986.0708453778933, + "ack_latency": { + "p50_ns": 22226834, + "p95_ns": 29102458, + "p99_ns": 36543500 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 100745000, + "p95_ns": 147218000, + "p99_ns": 176147000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "46f6c754ed779f568d7d3d4d32255ce195e514db9cc2a49606b0d57a1b6819b7", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "46f6c754ed779f568d7d3d4d32255ce195e514db9cc2a49606b0d57a1b6819b7", + "stored": "46f6c754ed779f568d7d3d4d32255ce195e514db9cc2a49606b0d57a1b6819b7" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-burst-attempt-1.json.gz", + "SHA256": "acad81044bdd9ae2c87ee49c4bb14ba76d36c3254ccd9971595bd0807b634511", + "Size": 194413, + "RawBytes": 855025 + } + } + ], + "ErrorClass": "" + }, + "pipeline-concurrency-64": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-64-attempt-1.json.gz", + "SHA256": "ab20868f676a0e5e4f2e9388591e34be49a5cc66e7227e7c17cf7ce693711435", + "Size": 809129, + "RawBytes": 4901624 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 64, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-concurrency-64", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9989, + "AcceptedAfterWindow": 11, + "ObserverPolls": 203, + "ObserverQueries": 810, + "ObserverQueryNS": 1024408171, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50345292, + "ObservedEvents": 10000, + "VerificationNS": 60949083, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 3, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 86, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10185377250, + "DrainNS": 185377250, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.9, + "PersistedEPS": 981.7996677540834, + "ack_latency": { + "p50_ns": 12507708, + "p95_ns": 21818833, + "p99_ns": 62487791 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 80283000, + "p95_ns": 140772000, + "p99_ns": 270584000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "4fef9f4d0e5eae011ddfa0a0d16b6600315023c378488070cf7920cbe7317706", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "4fef9f4d0e5eae011ddfa0a0d16b6600315023c378488070cf7920cbe7317706", + "stored": "4fef9f4d0e5eae011ddfa0a0d16b6600315023c378488070cf7920cbe7317706" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9989, + "AcceptedAfterWindow": 11, + "ObserverPolls": 199, + "ObserverQueries": 796, + "ObserverQueryNS": 1619755052, + "ObserverLatePolls": 1, + "ObserverMaxGapNS": 208736167, + "ObservedEvents": 10000, + "VerificationNS": 55045417, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements", + "observer_poll_delays" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 63, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 87, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10127520250, + "DrainNS": 127520250, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.9, + "PersistedEPS": 987.4085415924002, + "ack_latency": { + "p50_ns": 15550541, + "p95_ns": 42710542, + "p99_ns": 84716250 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 94290000, + "p95_ns": 167797000, + "p99_ns": 302013000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "8ea0ea59e91dd074730ff4bffc1a50698e61af3683495a65e2432d2c6a7e29f9", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "8ea0ea59e91dd074730ff4bffc1a50698e61af3683495a65e2432d2c6a7e29f9", + "stored": "8ea0ea59e91dd074730ff4bffc1a50698e61af3683495a65e2432d2c6a7e29f9" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9987, + "AcceptedAfterWindow": 13, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 1387337663, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 50409000, + "ObservedEvents": 10000, + "VerificationNS": 58813708, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 84, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10183333833, + "DrainNS": 183333833, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998.7, + "PersistedEPS": 981.9966784938455, + "ack_latency": { + "p50_ns": 15008708, + "p95_ns": 24771333, + "p99_ns": 37338583 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 93741000, + "p95_ns": 136232000, + "p99_ns": 166268000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a26dfa856a3769137ed94e9fd11b25db79a6e5860df2b3354f32b72c8ac19418", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a26dfa856a3769137ed94e9fd11b25db79a6e5860df2b3354f32b72c8ac19418", + "stored": "a26dfa856a3769137ed94e9fd11b25db79a6e5860df2b3354f32b72c8ac19418" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-64-attempt-1.json.gz", + "SHA256": "ab20868f676a0e5e4f2e9388591e34be49a5cc66e7227e7c17cf7ce693711435", + "Size": 809129, + "RawBytes": 4901624 + } + } + ], + "ErrorClass": "" + }, + "pipeline-concurrency-8": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-8-attempt-1.json.gz", + "SHA256": "872f2edeff22fc8d16e66045a0acf3746d7fca55dfab7f461005afba10c9ed00", + "Size": 343413, + "RawBytes": 2278200 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 8, + "drain_deadline_ns": 30000000000, + "http_batch_size": 1, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-concurrency-8", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4616, + "AttemptedAfterWindow": 16, + "AcceptedInWindow": 4608, + "AcceptedAfterWindow": 24, + "ObserverPolls": 203, + "ObserverQueries": 810, + "ObserverQueryNS": 866202913, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52714375, + "ObservedEvents": 4632, + "VerificationNS": 34658542, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 4632, + "Accepted": 4632, + "Persisted": 4632, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5368, + "LateSchedules": 278, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 38, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10154143583, + "DrainNS": 154143583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 460.8, + "PersistedEPS": 456.168455974452, + "ack_latency": { + "p50_ns": 16674042, + "p95_ns": 20257875, + "p99_ns": 27406083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 81797000, + "p95_ns": 114918000, + "p99_ns": 191979000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "64f4a10228490c2df17c11342467f8adb9b8d736f094b031d67e59693955b52f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "64f4a10228490c2df17c11342467f8adb9b8d736f094b031d67e59693955b52f", + "stored": "64f4a10228490c2df17c11342467f8adb9b8d736f094b031d67e59693955b52f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4568, + "AttemptedAfterWindow": 16, + "AcceptedInWindow": 4560, + "AcceptedAfterWindow": 24, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 791862958, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53887375, + "ObservedEvents": 4584, + "VerificationNS": 37994042, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 4584, + "Accepted": 4584, + "Persisted": 4584, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5416, + "LateSchedules": 304, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 33, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10156235708, + "DrainNS": 156235708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 456, + "PersistedEPS": 451.34832745061374, + "ack_latency": { + "p50_ns": 17359583, + "p95_ns": 21130875, + "p99_ns": 23426875 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 88217000, + "p95_ns": 117375000, + "p99_ns": 130501000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a007efc750935b7e5df7dc1f9f3c0e7b65003422d9ad7a40064be2944a86fd38", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a007efc750935b7e5df7dc1f9f3c0e7b65003422d9ad7a40064be2944a86fd38", + "stored": "a007efc750935b7e5df7dc1f9f3c0e7b65003422d9ad7a40064be2944a86fd38" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 4385, + "AttemptedAfterWindow": 13, + "AcceptedInWindow": 4377, + "AcceptedAfterWindow": 21, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 838142834, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 60472083, + "ObservedEvents": 4398, + "VerificationNS": 38787417, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "generator_missed_events", + "late_schedules", + "request_queue_tail", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 4398, + "Accepted": 4398, + "Persisted": 4398, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 5602, + "LateSchedules": 390, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 37, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10156614583, + "DrainNS": 156614583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 437.7, + "PersistedEPS": 433.0183019213224, + "ack_latency": { + "p50_ns": 18018916, + "p95_ns": 22055583, + "p99_ns": 26228500 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 91806000, + "p95_ns": 123814000, + "p99_ns": 135075000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "f2af14351a9822b64a96adf09e434a8cfd4c26d3f4e595b3c348eadc2534716a", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "f2af14351a9822b64a96adf09e434a8cfd4c26d3f4e595b3c348eadc2534716a", + "stored": "f2af14351a9822b64a96adf09e434a8cfd4c26d3f4e595b3c348eadc2534716a" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-concurrency-8-attempt-1.json.gz", + "SHA256": "872f2edeff22fc8d16e66045a0acf3746d7fca55dfab7f461005afba10c9ed00", + "Size": 343413, + "RawBytes": 2278200 + } + } + ], + "ErrorClass": "" + }, + "pipeline-payload-1024": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-1024-attempt-1.json.gz", + "SHA256": "397ce2694350ca1a34e1772b3f83d0373f8eb06a0db821c2fd0c78e4fcffbb4d", + "Size": 280475, + "RawBytes": 1236068 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-payload-1024", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 1024, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9980, + "AcceptedAfterWindow": 20, + "ObserverPolls": 202, + "ObserverQueries": 808, + "ObserverQueryNS": 3597504962, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56024792, + "ObservedEvents": 10000, + "VerificationNS": 138009125, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 2, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 82, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10229256417, + "DrainNS": 229256417, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998, + "PersistedEPS": 977.5881640214826, + "ack_latency": { + "p50_ns": 18146000, + "p95_ns": 27231041, + "p99_ns": 46701041 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 114867000, + "p95_ns": 157276000, + "p99_ns": 198771000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "0985bb9abccdfdd3fd1f84fc6990ca87d2055f46866644f86364c26f84b95a5f", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "0985bb9abccdfdd3fd1f84fc6990ca87d2055f46866644f86364c26f84b95a5f", + "stored": "0985bb9abccdfdd3fd1f84fc6990ca87d2055f46866644f86364c26f84b95a5f" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 203, + "ObserverQueries": 812, + "ObserverQueryNS": 3981094658, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56225709, + "ObservedEvents": 10000, + "VerificationNS": 127120500, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 104, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10263751791, + "DrainNS": 263751791, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 974.3025945706056, + "ack_latency": { + "p50_ns": 17752375, + "p95_ns": 24166750, + "p99_ns": 27432750 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 116026000, + "p95_ns": 155159000, + "p99_ns": 174721000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "acba6dff3020e1dd7c11ce0fe2b6a63af42ecc5c5d7f887f3749ce7421707667", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "acba6dff3020e1dd7c11ce0fe2b6a63af42ecc5c5d7f887f3749ce7421707667", + "stored": "acba6dff3020e1dd7c11ce0fe2b6a63af42ecc5c5d7f887f3749ce7421707667" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9990, + "AcceptedAfterWindow": 10, + "ObserverPolls": 203, + "ObserverQueries": 812, + "ObserverQueryNS": 4159555708, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 70576125, + "ObservedEvents": 10000, + "VerificationNS": 134417083, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 99, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10273409083, + "DrainNS": 273409083, + "PollIntervalNS": 50000000, + "AcceptedEPS": 999, + "PersistedEPS": 973.3867228695851, + "ack_latency": { + "p50_ns": 17884458, + "p95_ns": 25757708, + "p99_ns": 45971458 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 115907000, + "p95_ns": 164124000, + "p99_ns": 203020000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "a27a83e5d681e871ac6f371a8a47d72e7c88deba762abfa888f689a367ff179d", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "a27a83e5d681e871ac6f371a8a47d72e7c88deba762abfa888f689a367ff179d", + "stored": "a27a83e5d681e871ac6f371a8a47d72e7c88deba762abfa888f689a367ff179d" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-1024-attempt-1.json.gz", + "SHA256": "397ce2694350ca1a34e1772b3f83d0373f8eb06a0db821c2fd0c78e4fcffbb4d", + "Size": 280475, + "RawBytes": 1236068 + } + } + ], + "ErrorClass": "" + }, + "pipeline-payload-16384": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-16384-attempt-1.json.gz", + "SHA256": "b895d591e4a0b402a0f39919092064c8a37878dbc3ab5b8d0c6d04993ed584a1", + "Size": 286427, + "RawBytes": 1403772 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 10, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-payload-16384", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 16384, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 1000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9980, + "AcceptedAfterWindow": 20, + "ObserverPolls": 204, + "ObserverQueries": 814, + "ObserverQueryNS": 3876978750, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 62161042, + "ObservedEvents": 10000, + "VerificationNS": 1535059250, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 10000, + "Persisted": 10000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 152, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 11714064417, + "DrainNS": 1714064417, + "PollIntervalNS": 50000000, + "AcceptedEPS": 998, + "PersistedEPS": 853.6746635512377, + "ack_latency": { + "p50_ns": 29415583, + "p95_ns": 44987500, + "p99_ns": 58049958 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 168864000, + "p95_ns": 244177000, + "p99_ns": 323207000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "8caa3772efb09ce636b61213327ea00e1fd2b0fb49b97ae60db3c648a0bd5810", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "8caa3772efb09ce636b61213327ea00e1fd2b0fb49b97ae60db3c648a0bd5810", + "stored": "8caa3772efb09ce636b61213327ea00e1fd2b0fb49b97ae60db3c648a0bd5810" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9820, + "AcceptedAfterWindow": 30, + "ObserverPolls": 802, + "ObserverQueries": 2604, + "ObserverQueryNS": 7865304321, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 74407250, + "ObservedEvents": 9850, + "VerificationNS": 1552880416, + "AmbiguousUnobserved": 150, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "ambiguous_delivery", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 9850, + "Persisted": 9850, + "Ambiguous": 150, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 160, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 41649846583, + "DrainNS": 31649846583, + "PollIntervalNS": 50000000, + "AcceptedEPS": 982, + "PersistedEPS": 236.49546896579503, + "ack_latency": { + "p50_ns": 29832541, + "p95_ns": 51331458, + "p99_ns": 82149459 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 166955000, + "p95_ns": 359498000, + "p99_ns": 449689000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "6a0708e350562057a13c792f3bb263c33580f735500a00ca7fbbc03e73e1cc21", + "ambiguous": "11d76c206b89452eee668d6e622acb5a785b5bf465a568563329e1a395ff630b", + "attempted": "39103419a74c7fa1e638eba45ca7176dafe5a11b2bc941912571dccb0825d38d", + "stored": "6a0708e350562057a13c792f3bb263c33580f735500a00ca7fbbc03e73e1cc21" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 10000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 9880, + "AcceptedAfterWindow": 20, + "ObserverPolls": 801, + "ObserverQueries": 2601, + "ObserverQueryNS": 6894226753, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 68243625, + "ObservedEvents": 9930, + "VerificationNS": 1618706417, + "AmbiguousUnobserved": 70, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "ambiguous_delivery", + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 10000, + "Attempted": 10000, + "Accepted": 9900, + "Persisted": 9930, + "Ambiguous": 100, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 30, + "BacklogAtWindowEnd": 186, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 41687026041, + "DrainNS": 31687026041, + "PollIntervalNS": 50000000, + "AcceptedEPS": 988, + "PersistedEPS": 238.2036077659666, + "ack_latency": { + "p50_ns": 30214250, + "p95_ns": 49266917, + "p99_ns": 127602958 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 175904000, + "p95_ns": 279029000, + "p99_ns": 326704000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "2aa645511c05a258e183efd1953260f2d82e341f02fa32c41fde4a54fa56da6e", + "ambiguous": "69ea7eb5e915f3d8376e2178f6b3bb638783121de1e7c5b3ccfb91e3911bfc5c", + "attempted": "1a85afba0a6b49ad82dde0d3acd62a82de92ee58cb5cc85371bb9012950651c3", + "stored": "91f6d17b7d42e380d6c7910f1a2230705989b47474aa137e85deef1eaacb8d83" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-payload-16384-attempt-1.json.gz", + "SHA256": "b895d591e4a0b402a0f39919092064c8a37878dbc3ab5b8d0c6d04993ed584a1", + "Size": 286427, + "RawBytes": 1403772 + } + } + ], + "ErrorClass": "" + }, + "pipeline-rate-100": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-100-attempt-1.json.gz", + "SHA256": "372bfca0da475c3912cc8a67af0ed499ee0856291d185e754b134896c53cd578", + "Size": 15268, + "RawBytes": 154562 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-rate-100", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 100, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 618, + "ObserverQueryNS": 1074059039, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59419625, + "ObservedEvents": 1000, + "VerificationNS": 19795041, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10044123875, + "DrainNS": 44123875, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.56069961353398, + "ack_latency": { + "p50_ns": 33858792, + "p95_ns": 51856084, + "p99_ns": 51856084 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 90649000, + "p95_ns": 101067000, + "p99_ns": 102858000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "8f3b19e8b3afcdea06b998fda90cedcd38d5a9642d30f49f4d6296ba4ce94cf5", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "8f3b19e8b3afcdea06b998fda90cedcd38d5a9642d30f49f4d6296ba4ce94cf5", + "stored": "8f3b19e8b3afcdea06b998fda90cedcd38d5a9642d30f49f4d6296ba4ce94cf5" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 618, + "ObserverQueryNS": 1143264174, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55731875, + "ObservedEvents": 1000, + "VerificationNS": 15749708, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10040247459, + "DrainNS": 40247459, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.5991387745735, + "ack_latency": { + "p50_ns": 27940333, + "p95_ns": 54502708, + "p99_ns": 54502708 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 50675000, + "p95_ns": 104645000, + "p99_ns": 104645000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "9adc3c6f41c2095289e0fd763eb7a5a23e0a59dcdbfe2576fbc34f7823807cb5", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "9adc3c6f41c2095289e0fd763eb7a5a23e0a59dcdbfe2576fbc34f7823807cb5", + "stored": "9adc3c6f41c2095289e0fd763eb7a5a23e0a59dcdbfe2576fbc34f7823807cb5" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 1000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 1000, + "AcceptedAfterWindow": 0, + "ObserverPolls": 201, + "ObserverQueries": 615, + "ObserverQueryNS": 1078898453, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 52047084, + "ObservedEvents": 1000, + "VerificationNS": 8478625, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 1000, + "Attempted": 1000, + "Accepted": 1000, + "Persisted": 1000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10019273333, + "DrainNS": 19273333, + "PollIntervalNS": 50000000, + "AcceptedEPS": 100, + "PersistedEPS": 99.80763741681226, + "ack_latency": { + "p50_ns": 48528958, + "p95_ns": 57843083, + "p99_ns": 57843083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 83883000, + "p95_ns": 98151000, + "p99_ns": 98576000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "e00af1e3676b8a1a601bcd1b638c0833ad2e6a7473d8d38bbb55d412495964a0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "e00af1e3676b8a1a601bcd1b638c0833ad2e6a7473d8d38bbb55d412495964a0", + "stored": "e00af1e3676b8a1a601bcd1b638c0833ad2e6a7473d8d38bbb55d412495964a0" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-100-attempt-1.json.gz", + "SHA256": "372bfca0da475c3912cc8a67af0ed499ee0856291d185e754b134896c53cd578", + "Size": 15268, + "RawBytes": 154562 + } + } + ], + "ErrorClass": "" + }, + "pipeline-rate-10000": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-10000-attempt-1.json.gz", + "SHA256": "d6b1b248af9bec8ae81e1995009f79ecaa51ecfef789c7eee05efad5994be766", + "Size": 2085683, + "RawBytes": 8795472 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-rate-10000", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 10000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99800, + "AcceptedAfterWindow": 200, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 4796400950, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56014458, + "ObservedEvents": 100000, + "VerificationNS": 565229166, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1400, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10846931666, + "DrainNS": 846931666, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9980, + "PersistedEPS": 9219.19701158003, + "ack_latency": { + "p50_ns": 22179416, + "p95_ns": 32202209, + "p99_ns": 49580333 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 144594000, + "p95_ns": 210130000, + "p99_ns": 262606000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "fc81800426f61675305e326aee326fcc196a7afe95756f5f6f76143e9222b592", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "fc81800426f61675305e326aee326fcc196a7afe95756f5f6f76143e9222b592", + "stored": "fc81800426f61675305e326aee326fcc196a7afe95756f5f6f76143e9222b592" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99800, + "AcceptedAfterWindow": 200, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 5029455718, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 64391667, + "ObservedEvents": 100000, + "VerificationNS": 548898125, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_schedules", + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 1, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1193, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10831766833, + "DrainNS": 831766833, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9980, + "PersistedEPS": 9232.10419331965, + "ack_latency": { + "p50_ns": 22752000, + "p95_ns": 31133250, + "p99_ns": 37125917 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 152171000, + "p95_ns": 212488000, + "p99_ns": 243332000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "4941b0538cd8e8421d428671e975816e08d4ddb351bdec63dd477abb837edd06", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "4941b0538cd8e8421d428671e975816e08d4ddb351bdec63dd477abb837edd06", + "stored": "4941b0538cd8e8421d428671e975816e08d4ddb351bdec63dd477abb837edd06" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 100000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 99700, + "AcceptedAfterWindow": 300, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 5989808288, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 60892125, + "ObservedEvents": 100000, + "VerificationNS": 577729917, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 100000, + "Attempted": 100000, + "Accepted": 100000, + "Persisted": 100000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 1600, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10889437542, + "DrainNS": 889437542, + "PollIntervalNS": 50000000, + "AcceptedEPS": 9970, + "PersistedEPS": 9183.210759445117, + "ack_latency": { + "p50_ns": 22685333, + "p95_ns": 31826500, + "p99_ns": 43007583 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 160447000, + "p95_ns": 243959000, + "p99_ns": 312562000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "18bc0d91061ff51628b111bd731f42f62e6085f3cff7efe6219e2306dbe39003", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "18bc0d91061ff51628b111bd731f42f62e6085f3cff7efe6219e2306dbe39003", + "stored": "18bc0d91061ff51628b111bd731f42f62e6085f3cff7efe6219e2306dbe39003" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-10000-attempt-1.json.gz", + "SHA256": "d6b1b248af9bec8ae81e1995009f79ecaa51ecfef789c7eee05efad5994be766", + "Size": 2085683, + "RawBytes": 8795472 + } + } + ], + "ErrorClass": "" + }, + "pipeline-rate-5000": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-5000-attempt-1.json.gz", + "SHA256": "270de12e779611ee90d18f3d727f6fc78a4e8da498d12f9e8432f1c51e813449", + "Size": 1024934, + "RawBytes": 4347076 + }, + "Summary": { + "kind": "pipeline", + "config": { + "concurrency": 32, + "drain_deadline_ns": 30000000000, + "http_batch_size": 100, + "https": true, + "namespace": "ae237e04-731d-4320-af54-3ff38d8ae65f/pipeline-rate-5000", + "observer_reconnect": false, + "pattern": "steady", + "payload_bytes": 256, + "payload_profile": "varied", + "poll_interval_ns": 50000000, + "repetitions": 3, + "seed": 42, + "target_events_per_second": 5000, + "tenant": "default", + "warmup_ns": 2000000000, + "window_ns": 10000000000 + }, + "runs": [ + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 2597232328, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 55266916, + "ObservedEvents": 50000, + "VerificationNS": 267020958, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 1, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 472, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10407074791, + "DrainNS": 407074791, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4804.424010024394, + "ack_latency": { + "p50_ns": 22864417, + "p95_ns": 27299083, + "p99_ns": 35871125 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 107443000, + "p95_ns": 142696000, + "p99_ns": 160172000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "f2b32199e53b2bb5b1c807bd80168468c75338d3e1a5055d88fc340c4b3118a8", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "f2b32199e53b2bb5b1c807bd80168468c75338d3e1a5055d88fc340c4b3118a8", + "stored": "f2b32199e53b2bb5b1c807bd80168468c75338d3e1a5055d88fc340c4b3118a8" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 202, + "ObserverQueries": 809, + "ObserverQueryNS": 2607684502, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 59507583, + "ObservedEvents": 50000, + "VerificationNS": 277525417, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 2, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 463, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10418984625, + "DrainNS": 418984625, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4798.9321224283885, + "ack_latency": { + "p50_ns": 22941750, + "p95_ns": 26967584, + "p99_ns": 29952959 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 108116000, + "p95_ns": 139877000, + "p99_ns": 151984000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "56cf9957ddc42750ec06d0809ec2c6368a3758384482d2975ce56e044ab44cba", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "56cf9957ddc42750ec06d0809ec2c6368a3758384482d2975ce56e044ab44cba", + "stored": "56cf9957ddc42750ec06d0809ec2c6368a3758384482d2975ce56e044ab44cba" + }, + "backlog": null, + "correct": true + }, + { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 50000, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 49900, + "AcceptedAfterWindow": 100, + "ObserverPolls": 203, + "ObserverQueries": 813, + "ObserverQueryNS": 3027386629, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 66680208, + "ObservedEvents": 50000, + "VerificationNS": 284472917, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "late_acknowledgements" + ], + "repetition": 3, + "Planned": 50000, + "Attempted": 50000, + "Accepted": 50000, + "Persisted": 50000, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 469, + "WindowNS": 10000000000, + "ActiveNS": 10000000000, + "TotalNS": 10478080750, + "DrainNS": 478080750, + "PollIntervalNS": 50000000, + "AcceptedEPS": 4990, + "PersistedEPS": 4771.866259954143, + "ack_latency": { + "p50_ns": 23289708, + "p95_ns": 28194167, + "p99_ns": 35505083 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 110738000, + "p95_ns": 147120000, + "p99_ns": 158948000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "11c964cd9aae5904dba238ff9d5b36d9b3239554fcc4380329dea9e6adc9c7b0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "11c964cd9aae5904dba238ff9d5b36d9b3239554fcc4380329dea9e6adc9c7b0", + "stored": "11c964cd9aae5904dba238ff9d5b36d9b3239554fcc4380329dea9e6adc9c7b0" + }, + "backlog": null, + "correct": true + } + ], + "notes": [ + "Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", + "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", + "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", + "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", + "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/pipeline-rate-5000-attempt-1.json.gz", + "SHA256": "270de12e779611ee90d18f3d727f6fc78a4e8da498d12f9e8432f1c51e813449", + "Size": 1024934, + "RawBytes": 4347076 + } + } + ], + "ErrorClass": "" + }, + "recovery-consumer": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-consumer-attempt-1.json.gz", + "SHA256": "d1b207ce92acf905019a30d2a5a2767e02513f491850103650e77e16c4728ad0", + "Size": 149806, + "RawBytes": 722509 + }, + "Summary": { + "Kind": "consumer", + "Runs": [ + { + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3001409042, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:18.219466Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3780615125, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:18.998669Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 5000500208, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:20.218551Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 7753107917, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:22.97115Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 940, + "ObserverQueryNS": 1537933802, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 53558250, + "ObservedEvents": 7500, + "VerificationNS": 48869958, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 1, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15067714125, + "DrainNS": 67714125, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.75300604861985, + "ack_latency": { + "p50_ns": 27111500, + "p95_ns": 46578666, + "p99_ns": 54702042 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2598904000, + "p95_ns": 9300123000, + "p99_ns": 9902755000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "e7f4e6af5c3d0260cce3d14b8675cdbfba8638a321ca95076b27338de25b1c9c", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "e7f4e6af5c3d0260cce3d14b8675cdbfba8638a321ca95076b27338de25b1c9c", + "stored": "e7f4e6af5c3d0260cce3d14b8675cdbfba8638a321ca95076b27338de25b1c9c" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3002930333, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:33.39871Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3786349667, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:34.182127Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 5001432958, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:35.397206Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 7665722000, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:38.061488Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 942, + "ObserverQueryNS": 1678882665, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 60056500, + "ObservedEvents": 7500, + "VerificationNS": 54793167, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 2, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15087642333, + "DrainNS": 87642333, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.09555903216545, + "ack_latency": { + "p50_ns": 28258875, + "p95_ns": 49599584, + "p99_ns": 52790375 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2601031000, + "p95_ns": 9298460000, + "p99_ns": 9898746000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "dc5da53cc08b696f2b6ca93e06beedab8c111059717cbbf0ddb6ce921bd658a1", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "dc5da53cc08b696f2b6ca93e06beedab8c111059717cbbf0ddb6ce921bd658a1", + "stored": "dc5da53cc08b696f2b6ca93e06beedab8c111059717cbbf0ddb6ce921bd658a1" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3002307166, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:48.609982Z" + }, + { + "Action": "stopped", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3772501458, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:49.380174Z" + }, + { + "Action": "restore_requested", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 5001161375, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:50.60883Z" + }, + { + "Action": "started", + "Service": "consumer", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 7675560500, + "PlannedNS": 5000000000, + "At": "2026-11-03T22:36:53.283221Z" + } + ], + "Pipeline": { + "ObserverOutages": 0, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 947, + "ObserverQueryNS": 1676620996, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 56847000, + "ObservedEvents": 7500, + "VerificationNS": 43331916, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "complete", + "repetition": 3, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15068301708, + "DrainNS": 68301708, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.7335963493571, + "ack_latency": { + "p50_ns": 28240333, + "p95_ns": 48629000, + "p99_ns": 54380791 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 2648372000, + "p95_ns": 9346650000, + "p99_ns": 9947871000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "be610edd352d53b52d74587a65635f876d534f625922e0e0e66e2e5ca73aa08c", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "be610edd352d53b52d74587a65635f876d534f625922e0e0e66e2e5ca73aa08c", + "stored": "be610edd352d53b52d74587a65635f876d534f625922e0e0e66e2e5ca73aa08c" + }, + "backlog": null, + "correct": true + } + } + ], + "Notes": [ + "Availability experiment; not a capacity estimate. Actual control timestamps and reconciled ID sets are retained.", + "A forced consumer kill does not claim to land in every database/offset commit window; the deterministic crash regression remains separate." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-consumer-attempt-1.json.gz", + "SHA256": "d1b207ce92acf905019a30d2a5a2767e02513f491850103650e77e16c4728ad0", + "Size": 149806, + "RawBytes": 722509 + } + } + ], + "ErrorClass": "" + }, + "recovery-database": { + "Status": "limited", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-database-attempt-1.json.gz", + "SHA256": "04b716e0460bb18b75ded351395233776f321835aaf90f185712728a1773c570", + "Size": 154279, + "RawBytes": 713104 + }, + "Summary": { + "Kind": "database", + "Runs": [ + { + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 3001948416, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:35:29.786325Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 4201047416, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:35:30.98542Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8002119875, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:35:34.786481Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8979710916, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:35:35.764069Z" + } + ], + "Pipeline": { + "ObserverOutages": 108, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 638, + "ObserverQueryNS": 1406738582, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 58872833, + "ObservedEvents": 7500, + "VerificationNS": 49764125, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 1, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15117661000, + "DrainNS": 117661000, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 496.10849191551523, + "ack_latency": { + "p50_ns": 28212209, + "p95_ns": 48452917, + "p99_ns": 55638542 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 101946000, + "p95_ns": 6703691000, + "p99_ns": 7249316000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "269fb048d9e5ef16def41d920edbab24e93773b9b2b43deaf12dc2eb03b68f86", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "269fb048d9e5ef16def41d920edbab24e93773b9b2b43deaf12dc2eb03b68f86", + "stored": "269fb048d9e5ef16def41d920edbab24e93773b9b2b43deaf12dc2eb03b68f86" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 3002000125, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:35:45.038146Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 4004943625, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:35:46.041085Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8001898542, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:35:50.038027Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8805051375, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:35:50.841178Z" + } + ], + "Pipeline": { + "ObserverOutages": 104, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 663, + "ObserverQueryNS": 1327145886, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 62936292, + "ObservedEvents": 7500, + "VerificationNS": 57254875, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 2, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15081202750, + "DrainNS": 81202750, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.3078158504301, + "ack_latency": { + "p50_ns": 27864500, + "p95_ns": 47399584, + "p99_ns": 62102417 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 95059000, + "p95_ns": 5196935000, + "p99_ns": 5650990000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "3c37a20a3ba8ca6c40ab373c3d7325801ce45e0af5d5b796e712c1ab050008d0", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "3c37a20a3ba8ca6c40ab373c3d7325801ce45e0af5d5b796e712c1ab050008d0", + "stored": "3c37a20a3ba8ca6c40ab373c3d7325801ce45e0af5d5b796e712c1ab050008d0" + }, + "backlog": null, + "correct": true + } + }, + { + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3006794209, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:00.234632Z" + }, + { + "Action": "stopped", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 3962677209, + "PlannedNS": 3000000000, + "At": "2026-11-03T22:36:01.190512Z" + }, + { + "Action": "restore_requested", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8001769084, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:36:05.229591Z" + }, + { + "Action": "started", + "Service": "postgres", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8869215834, + "PlannedNS": 8000000000, + "At": "2026-11-03T22:36:06.097035Z" + } + ], + "Pipeline": { + "ObserverOutages": 106, + "request_samples": null, + "AttemptedInWindow": 7500, + "AttemptedAfterWindow": 0, + "AcceptedInWindow": 7500, + "AcceptedAfterWindow": 0, + "ObserverPolls": 301, + "ObserverQueries": 648, + "ObserverQueryNS": 1614690879, + "ObserverLatePolls": 0, + "ObserverMaxGapNS": 54749291, + "ObservedEvents": 7500, + "VerificationNS": 44161292, + "AmbiguousUnobserved": 0, + "ContentMismatch": 0, + "outcome": "limited", + "limit_reasons": [ + "observer_unavailable" + ], + "repetition": 3, + "Planned": 7500, + "Attempted": 7500, + "Accepted": 7500, + "Persisted": 7500, + "Ambiguous": 0, + "Rejected": 0, + "GeneratorMissed": 0, + "LateSchedules": 0, + "Missing": 0, + "Unexpected": 0, + "DuplicateRows": 0, + "AmbiguousPersisted": 0, + "BacklogAtWindowEnd": 0, + "WindowNS": 15000000000, + "ActiveNS": 15000000000, + "TotalNS": 15064425334, + "DrainNS": 64425334, + "PollIntervalNS": 50000000, + "AcceptedEPS": 500, + "PersistedEPS": 497.86167302862214, + "ack_latency": { + "p50_ns": 32365750, + "p95_ns": 55137917, + "p99_ns": 63149167 + }, + "receipt_to_observed_storage_upper_bound": { + "p50_ns": 103483000, + "p95_ns": 6651924000, + "p99_ns": 7205274000 + }, + "ack_ns": null, + "visibility_ns": null, + "id_set_sha256": { + "accepted": "b1a0304e4f22fb1165c2067a18238eb1404c3c1e056e9c99d2b06a99d43f1912", + "ambiguous": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", + "attempted": "b1a0304e4f22fb1165c2067a18238eb1404c3c1e056e9c99d2b06a99d43f1912", + "stored": "b1a0304e4f22fb1165c2067a18238eb1404c3c1e056e9c99d2b06a99d43f1912" + }, + "backlog": null, + "correct": true + } + } + ], + "Notes": [ + "Availability experiment; not a capacity estimate. Actual control timestamps and reconciled ID sets are retained.", + "A forced consumer kill does not claim to land in every database/offset commit window; the deterministic crash regression remains separate." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "limited", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-database-attempt-1.json.gz", + "SHA256": "04b716e0460bb18b75ded351395233776f321835aaf90f185712728a1773c570", + "Size": 154279, + "RawBytes": 713104 + } + } + ], + "ErrorClass": "" + }, + "recovery-outbox": { + "Status": "complete", + "Attempt": 1, + "CompletedRepetitions": [ + 1, + 2, + 3 + ], + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-outbox-attempt-1.json.gz", + "SHA256": "ed1018de8e098cc6acfd927391656cc543c9f08ce7249ce50154ea8ffa52139c", + "Size": 8533, + "RawBytes": 39469 + }, + "Summary": { + "Kind": "outbox", + "Runs": [ + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5117990125, + "Repetition": 1, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 125, + "PlannedNS": 0, + "At": "2026-11-03T22:37:03.61828Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 967424875, + "PlannedNS": 0, + "At": "2026-11-03T22:37:04.585703Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 8969845708, + "PlannedNS": 8967432917, + "At": "2026-11-03T22:37:12.588105Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 1, + "ElapsedNS": 9818350792, + "PlannedNS": 0, + "At": "2026-11-03T22:37:13.436601Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 967428750, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 6085495542, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 15070022458, + "Pending": 0, + "Acknowledged": 100 + } + ] + }, + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5095342792, + "Repetition": 2, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 333, + "PlannedNS": 0, + "At": "2026-11-03T22:37:24.131524Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 847263416, + "PlannedNS": 0, + "At": "2026-11-03T22:37:24.978785Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 8851715791, + "PlannedNS": 8847285125, + "At": "2026-11-03T22:37:32.983213Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 2, + "ElapsedNS": 9588275541, + "PlannedNS": 0, + "At": "2026-11-03T22:37:33.71977Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 847278875, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 5942647166, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 12503463750, + "Pending": 0, + "Acknowledged": 100 + } + ] + }, + { + "FirstAttemptStatus": "http_503", + "FirstAttemptNS": 5112679375, + "Repetition": 3, + "Correct": true, + "Faults": [ + { + "Action": "fault_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 208, + "PlannedNS": 0, + "At": "2026-11-03T22:37:44.287129Z" + }, + { + "Action": "stopped", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 886253250, + "PlannedNS": 0, + "At": "2026-11-03T22:37:45.173379Z" + }, + { + "Action": "restore_requested", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 8888072916, + "PlannedNS": 8886264375, + "At": "2026-11-03T22:37:53.175174Z" + }, + { + "Action": "started", + "Service": "redpanda", + "ErrorClass": "", + "Repetition": 3, + "ElapsedNS": 9624534750, + "PlannedNS": 0, + "At": "2026-11-03T22:37:53.911634Z" + } + ], + "Outbox": [ + { + "ElapsedNS": 886261750, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 5999003250, + "Pending": 100, + "Acknowledged": 0 + }, + { + "ElapsedNS": 13131595125, + "Pending": 0, + "Acknowledged": 100 + } + ] + } + ], + "Notes": [ + "One untimed warm-up order before three measured broker outages.100 pending local events per repetition; the first one-attempt dispatch exceeds the broker publish timeout.", + "Pending-local samples are observations after commands, not exact transition times. HTTP ACK still precedes PostgreSQL persistence." + ] + }, + "History": [ + { + "Attempt": 1, + "Status": "complete", + "ErrorClass": "", + "Artifact": { + "Codec": "gzip", + "Path": "raw/recovery-outbox-attempt-1.json.gz", + "SHA256": "ed1018de8e098cc6acfd927391656cc543c9f08ce7249ce50154ea8ffa52139c", + "Size": 8533, + "RawBytes": 39469 + } + } + ], + "ErrorClass": "" + } + } +} diff --git a/benchmarks/results/selfhost-copy-2026-11-04/manifest-1.json b/benchmarks/results/selfhost-copy-2026-11-04/manifest-1.json new file mode 100644 index 0000000..a067cf0 --- /dev/null +++ b/benchmarks/results/selfhost-copy-2026-11-04/manifest-1.json @@ -0,0 +1,63 @@ +{ + "broker_fsync_bypass": false, + "captured_at": "2026-11-03T22:21:37.968114Z", + "source_sha": "dccf4b3783a83010a86cceb5f318fc0b23645b56", + "source_dirty": false, + "host": { + "architecture": "arm64", + "compose": "Docker Compose version v5.5.0", + "cpu": "Apple M1 Max", + "disk_space": "Filesystem 1024-blocks Used Available Capacity iused ifree %iused Mounted on\n/dev/disk3s5 971350180 803941620 102346444 89% 5247365 1023464440 1% /System/Volumes/Data", + "docker": "{\"Platform\":{\"Name\":\"Docker Engine - Community\"},\"Version\":\"29.8.2\",\"ApiVersion\":\"1.56\",\"MinAPIVersion\":\"1.40\",\"Os\":\"linux\",\"Arch\":\"arm64\",\"Components\":[{\"Name\":\"Engine\",\"Version\":\"29.8.2\",\"Details\":{\"ApiVersion\":\"1.56\",\"Arch\":\"arm64\",\"BuildTime\":\"Wed Sep 30 19:32:49 2026\",\"Experimental\":\"true\",\"GitCommit\":\"8af9fe3\",\"GoVersion\":\"go1.26.8\",\"KernelVersion\":\"7.2.12-orbstack-00394-gbecdd6130068\",\"MinAPIVersion\":\"1.40\",\"Module\":\"github.com/moby/moby/v2\",\"ModuleVersion\":\"v2.0.0+unknown\",\"Os\":\"linux\"}},{\"Name\":\"containerd\",\"Version\":\"v2.3.6\",\"Details\":{\"GitCommit\":\"ee2735368117d2eb259779949d5e75cdafec9761\"}},{\"Name\":\"runc\",\"Version\":\"1.5.2\",\"Details\":{\"GitCommit\":\"29dd3dc2b13b4123162e5fe132504bb4b15569f1\"}},{\"Name\":\"docker-init\",\"Version\":\"0.19.0\",\"Details\":{\"GitCommit\":\"de40ad0\"}}],\"GitCommit\":\"8af9fe3\",\"GoVersion\":\"go1.26.8\",\"KernelVersion\":\"7.2.12-orbstack-00394-gbecdd6130068\",\"Experimental\":true,\"BuildTime\":\"2026-09-30T19:32:49.000000000+00:00\"}", + "docker_vm": "CPUs=10 MemoryBytes=16818991104 StorageDriver=overlayfs Kernel=7.2.12-orbstack-00394-gbecdd6130068 OS=OrbStack", + "generator_logical_cpus": "10", + "go": "go1.26.5", + "kernel": "Darwin 25.5.0", + "memory_bytes": "68719476736", + "os": "darwin", + "os_version": "ProductName:\t\tmacOS\nProductVersion:\t\t26.5.2\nBuildVersion:\t\t25F84" + }, + "database": { + "fsync": "on", + "full_page_writes": "on", + "indexes": "CREATE UNIQUE INDEX events_pkey ON ingestkit.events USING btree (tenant_id, event_id)\nCREATE INDEX events_received_at ON ingestkit.events USING btree (received_at)", + "max_connections": "100", + "server_version": "18.6", + "synchronous_commit": "on", + "wal_level": "replica" + }, + "Images": "sha256:c5e823e49f3bdf9cebf9687e7c6c439f1f27522b3585e82c9d3166ddf25e44bd [\"ingestkit-study-fd7b98c8-consumer@sha256:c5e823e49f3bdf9cebf9687e7c6c439f1f27522b3585e82c9d3166ddf25e44bd\"]\nsha256:54fde3e4f4c2963e722c2915d5026f02f61df11955ccf6d61de779898fa52cfd [\"ingestkit-study-fd7b98c8-api@sha256:54fde3e4f4c2963e722c2915d5026f02f61df11955ccf6d61de779898fa52cfd\"]\nsha256:76cc2074cb6642631f34a898ced71e6aeaa6b1a4d78c4daa743275a22e0c5be7 [\"migrate/migrate@sha256:76cc2074cb6642631f34a898ced71e6aeaa6b1a4d78c4daa743275a22e0c5be7\"]\nsha256:8b1076e0d61bfceb66594dc01536427ce0b529f8ead35fdab9763ab6085891ce [\"docker.redpanda.com/redpandadata/redpanda@sha256:8b1076e0d61bfceb66594dc01536427ce0b529f8ead35fdab9763ab6085891ce\"]\nsha256:e70b164da81ef698b3ad19af799ea6086ce6d9e48ed4079eb9fe26f6fbf14ee5 [\"caddy@sha256:e70b164da81ef698b3ad19af799ea6086ce6d9e48ed4079eb9fe26f6fbf14ee5\"]\nsha256:10a5c69a83035ab5239f5620d708520e8b28f5aa1f2b20143e6024532edadfb5 [\"postgres@sha256:10a5c69a83035ab5239f5620d708520e8b28f5aa1f2b20143e6024532edadfb5\"]\n", + "TopicConfiguration": "SUMMARY\n=======\nNAME ingestkit.events\nPARTITIONS 3\nREPLICAS 1\n\nCONFIGS\n=======\nKEY VALUE SOURCE\ncleanup.policy delete DEFAULT_CONFIG\ncompression.type producer DEFAULT_CONFIG\ndelete.retention.ms -1 DEFAULT_CONFIG\nflush.bytes 262144 DEFAULT_CONFIG\nflush.ms 100 DEFAULT_CONFIG\ninitial.retention.local.target.bytes -1 DEFAULT_CONFIG\ninitial.retention.local.target.ms -1 DEFAULT_CONFIG\nmax.compaction.lag.ms 9223372036854 DEFAULT_CONFIG\nmax.message.bytes 524288 DYNAMIC_TOPIC_CONFIG\nmessage.timestamp.after.max.ms 3600000 DEFAULT_CONFIG\nmessage.timestamp.before.max.ms 9223372036854 DEFAULT_CONFIG\nmessage.timestamp.type CreateTime DEFAULT_CONFIG\nmin.cleanable.dirty.ratio 0.5 DEFAULT_CONFIG\nmin.compaction.lag.ms 0 DEFAULT_CONFIG\nredpanda.iceberg.mode disabled DEFAULT_CONFIG\nredpanda.leaders.preference none DEFAULT_CONFIG\nredpanda.remote.allowgaps false DEFAULT_CONFIG\nredpanda.remote.delete true DEFAULT_CONFIG\nredpanda.remote.read false DEFAULT_CONFIG\nredpanda.remote.write false DEFAULT_CONFIG\nredpanda.schema.registry.context . DEFAULT_CONFIG\nredpanda.storage.mode unset DEFAULT_CONFIG\nredpanda.storage.mode.impl unset DEFAULT_CONFIG\nretention.bytes -1 DEFAULT_CONFIG\nretention.local.target.bytes -1 DEFAULT_CONFIG\nretention.local.target.ms 86400000 DEFAULT_CONFIG\nretention.ms 604800000 DYNAMIC_TOPIC_CONFIG\nsegment.bytes 134217728 DEFAULT_CONFIG\nsegment.ms 1209600000 DEFAULT_CONFIG\nwrite.caching false DYNAMIC_TOPIC_CONFIG\n\nKEY VALUE SOURCE\ncleanup.policy delete DEFAULT_CONFIG\ncompression.type producer DEFAULT_CONFIG\ndelete.retention.ms -1 DEFAULT_CONFIG\nflush.bytes 262144 DEFAULT_CONFIG\nflush.ms 100 DEFAULT_CONFIG\ninitial.retention.local.target.bytes -1 DEFAULT_CONFIG\ninitial.retention.local.target.ms -1 DEFAULT_CONFIG\nmax.compaction.lag.ms 9223372036854 DEFAULT_CONFIG\nmax.message.bytes 524288 DYNAMIC_TOPIC_CONFIG\nmessage.timestamp.after.max.ms 3600000 DEFAULT_CONFIG\nmessage.timestamp.before.max.ms 9223372036854 DEFAULT_CONFIG\nmessage.timestamp.type CreateTime DEFAULT_CONFIG\nmin.cleanable.dirty.ratio 0.5 DEFAULT_CONFIG\nmin.compaction.lag.ms 0 DEFAULT_CONFIG\nredpanda.iceberg.mode disabled DEFAULT_CONFIG\nredpanda.leaders.preference none DEFAULT_CONFIG\nredpanda.remote.allowgaps false DEFAULT_CONFIG\nredpanda.remote.delete true DEFAULT_CONFIG\nredpanda.remote.read false DEFAULT_CONFIG\nredpanda.remote.write false DEFAULT_CONFIG\nredpanda.schema.registry.context . DEFAULT_CONFIG\nredpanda.storage.mode unset DEFAULT_CONFIG\nredpanda.storage.mode.impl unset DEFAULT_CONFIG\nretention.bytes -1 DEFAULT_CONFIG\nretention.local.target.bytes -1 DEFAULT_CONFIG\nretention.local.target.ms 86400000 DEFAULT_CONFIG\nretention.ms 604800000 DYNAMIC_TOPIC_CONFIG\nsegment.bytes 134217728 DEFAULT_CONFIG\nsegment.ms 1209600000 DEFAULT_CONFIG\nwrite.caching false DYNAMIC_TOPIC_CONFIG\n\nSUMMARY\n=======\nNAME ingestkit.dlq\nPARTITIONS 1\nREPLICAS 1\n\nCONFIGS\n=======\nKEY VALUE SOURCE\ncleanup.policy delete DEFAULT_CONFIG\ncompression.type producer DEFAULT_CONFIG\ndelete.retention.ms -1 DEFAULT_CONFIG\nflush.bytes 262144 DEFAULT_CONFIG\nflush.ms 100 DEFAULT_CONFIG\ninitial.retention.local.target.bytes -1 DEFAULT_CONFIG\ninitial.retention.local.target.ms -1 DEFAULT_CONFIG\nmax.compaction.lag.ms 9223372036854 DEFAULT_CONFIG\nmax.message.bytes 2097152 DYNAMIC_TOPIC_CONFIG\nmessage.timestamp.after.max.ms 3600000 DEFAULT_CONFIG\nmessage.timestamp.before.max.ms 9223372036854 DEFAULT_CONFIG\nmessage.timestamp.type CreateTime DEFAULT_CONFIG\nmin.cleanable.dirty.ratio 0.5 DEFAULT_CONFIG\nmin.compaction.lag.ms 0 DEFAULT_CONFIG\nredpanda.iceberg.mode disabled DEFAULT_CONFIG\nredpanda.leaders.preference none DEFAULT_CONFIG\nredpanda.remote.allowgaps false DEFAULT_CONFIG\nredpanda.remote.delete true DEFAULT_CONFIG\nredpanda.remote.read false DEFAULT_CONFIG\nredpanda.remote.write false DEFAULT_CONFIG\nredpanda.schema.registry.context . DEFAULT_CONFIG\nredpanda.storage.mode unset DEFAULT_CONFIG\nredpanda.storage.mode.impl unset DEFAULT_CONFIG\nretention.bytes -1 DEFAULT_CONFIG\nretention.local.target.bytes -1 DEFAULT_CONFIG\nretention.local.target.ms 86400000 DEFAULT_CONFIG\nretention.ms 604800000 DYNAMIC_TOPIC_CONFIG\nsegment.bytes 134217728 DEFAULT_CONFIG\nsegment.ms 1209600000 DEFAULT_CONFIG\nwrite.caching false DYNAMIC_TOPIC_CONFIG\n\nKEY VALUE SOURCE\ncleanup.policy delete DEFAULT_CONFIG\ncompression.type producer DEFAULT_CONFIG\ndelete.retention.ms -1 DEFAULT_CONFIG\nflush.bytes 262144 DEFAULT_CONFIG\nflush.ms 100 DEFAULT_CONFIG\ninitial.retention.local.target.bytes -1 DEFAULT_CONFIG\ninitial.retention.local.target.ms -1 DEFAULT_CONFIG\nmax.compaction.lag.ms 9223372036854 DEFAULT_CONFIG\nmax.message.bytes 2097152 DYNAMIC_TOPIC_CONFIG\nmessage.timestamp.after.max.ms 3600000 DEFAULT_CONFIG\nmessage.timestamp.before.max.ms 9223372036854 DEFAULT_CONFIG\nmessage.timestamp.type CreateTime DEFAULT_CONFIG\nmin.cleanable.dirty.ratio 0.5 DEFAULT_CONFIG\nmin.compaction.lag.ms 0 DEFAULT_CONFIG\nredpanda.iceberg.mode disabled DEFAULT_CONFIG\nredpanda.leaders.preference none DEFAULT_CONFIG\nredpanda.remote.allowgaps false DEFAULT_CONFIG\nredpanda.remote.delete true DEFAULT_CONFIG\nredpanda.remote.read false DEFAULT_CONFIG\nredpanda.remote.write false DEFAULT_CONFIG\nredpanda.schema.registry.context . DEFAULT_CONFIG\nredpanda.storage.mode unset DEFAULT_CONFIG\nredpanda.storage.mode.impl unset DEFAULT_CONFIG\nretention.bytes -1 DEFAULT_CONFIG\nretention.local.target.bytes -1 DEFAULT_CONFIG\nretention.local.target.ms 86400000 DEFAULT_CONFIG\nretention.ms 604800000 DYNAMIC_TOPIC_CONFIG\nsegment.bytes 134217728 DEFAULT_CONFIG\nsegment.ms 1209600000 DEFAULT_CONFIG\nwrite.caching false DYNAMIC_TOPIC_CONFIG\n\n", + "settings": { + "api_internal_port": 8080, + "api_log_level": "info", + "api_rate_limit_rps": 10000, + "api_route": "https_gateway", + "api_tls": true, + "consumer_max_poll_records": 500, + "consumer_processing_deadline_ns": 15000000000, + "consumer_rebalance_timeout_ns": 60000000000, + "consumer_session_timeout_ns": 10000000000, + "http_protocol": "HTTP/1.1", + "http_request_timeout_ns": 8000000000, + "producer_ack": "all ISR; idempotent", + "producer_buffer_bytes": 67108864, + "producer_buffer_records": 1000, + "producer_compression_preference": "snappy, none (pinned franz-go source default)", + "provenance": "CPU/memory/fsync from broker process; API rate/log/port from allowlisted container environment; remaining source defaults at source_sha", + "publish_timeout_ns": 5000000000, + "redpanda_memory": "1G", + "redpanda_smp": 1, + "source_cleanliness": "Git status excludes only the owned output directory; actual source-file fingerprint is checked again after execution", + "tls_version": "TLS 1.3", + "topology": "one broker; one database; one API; one consumer", + "visibility_clock": "API receipt and PostgreSQL observation share the deployment clock; host time schedules load" + }, + "caveats": [ + "Local Docker VM; generator and SQL observer run on the same physical host as services and compete for resources.", + "Single broker, replication factor one. Disk-flush configuration does not establish tolerance of broker disk/host loss.", + "Topic and database settings are captured below. Source defaults at the recorded revision define remaining client settings.", + "Host filesystem reported by df is not a calibrated Docker VM disk specification. No dedicated disk latency or cloud cost measurement.", + "Resource samples are coarse Docker snapshots, not isolation or proof of a particular bottleneck." + ] +} diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-1-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-1-attempt-1.json.gz new file mode 100644 index 0000000..795be0e Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-1-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-10-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-10-attempt-1.json.gz new file mode 100644 index 0000000..7f18414 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-10-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-100-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-100-attempt-1.json.gz new file mode 100644 index 0000000..4fe3d94 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-100-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-1000-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-1000-attempt-1.json.gz new file mode 100644 index 0000000..bbdc39c Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-1000-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-50-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-50-attempt-1.json.gz new file mode 100644 index 0000000..c4c202b Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-50-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-500-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-500-attempt-1.json.gz new file mode 100644 index 0000000..323ad3d Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-batch-500-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-duplicates-10-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-duplicates-10-attempt-1.json.gz new file mode 100644 index 0000000..f18973d Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-duplicates-10-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-duplicates-50-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-duplicates-50-attempt-1.json.gz new file mode 100644 index 0000000..bd39a1e Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-duplicates-50-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-duplicates-90-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-duplicates-90-attempt-1.json.gz new file mode 100644 index 0000000..ef93ec9 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-duplicates-90-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-payload-1024-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-payload-1024-attempt-1.json.gz new file mode 100644 index 0000000..71861ec Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-payload-1024-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/db-payload-16384-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-payload-16384-attempt-1.json.gz new file mode 100644 index 0000000..78e4832 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/db-payload-16384-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-batch-1-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-batch-1-attempt-1.json.gz new file mode 100644 index 0000000..cfd6db7 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-batch-1-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-batch-10-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-batch-10-attempt-1.json.gz new file mode 100644 index 0000000..68d3343 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-batch-10-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-batch-100-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-batch-100-attempt-1.json.gz new file mode 100644 index 0000000..2e5024b Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-batch-100-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-burst-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-burst-attempt-1.json.gz new file mode 100644 index 0000000..6486798 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-burst-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-concurrency-64-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-concurrency-64-attempt-1.json.gz new file mode 100644 index 0000000..88e51bb Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-concurrency-64-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-concurrency-8-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-concurrency-8-attempt-1.json.gz new file mode 100644 index 0000000..176061c Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-concurrency-8-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-payload-1024-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-payload-1024-attempt-1.json.gz new file mode 100644 index 0000000..6ff8030 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-payload-1024-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-payload-16384-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-payload-16384-attempt-1.json.gz new file mode 100644 index 0000000..d690779 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-payload-16384-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-rate-100-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-rate-100-attempt-1.json.gz new file mode 100644 index 0000000..1c49913 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-rate-100-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-rate-10000-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-rate-10000-attempt-1.json.gz new file mode 100644 index 0000000..b795b35 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-rate-10000-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-rate-5000-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-rate-5000-attempt-1.json.gz new file mode 100644 index 0000000..db38db2 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/pipeline-rate-5000-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/recovery-consumer-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/recovery-consumer-attempt-1.json.gz new file mode 100644 index 0000000..29fb096 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/recovery-consumer-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/recovery-database-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/recovery-database-attempt-1.json.gz new file mode 100644 index 0000000..279e862 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/recovery-database-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/raw/recovery-outbox-attempt-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/raw/recovery-outbox-attempt-1.json.gz new file mode 100644 index 0000000..5c23809 Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/raw/recovery-outbox-attempt-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/resources-1.json.gz b/benchmarks/results/selfhost-copy-2026-11-04/resources-1.json.gz new file mode 100644 index 0000000..1d81e1a Binary files /dev/null and b/benchmarks/results/selfhost-copy-2026-11-04/resources-1.json.gz differ diff --git a/benchmarks/results/selfhost-copy-2026-11-04/summary.csv b/benchmarks/results/selfhost-copy-2026-11-04/summary.csv new file mode 100644 index 0000000..63b63ce --- /dev/null +++ b/benchmarks/results/selfhost-copy-2026-11-04/summary.csv @@ -0,0 +1,26 @@ +case,kind,status,attempt,completed_repetitions,artifact,sha256 +db-batch-1,database,complete,1,3,raw/db-batch-1-attempt-1.json.gz,369bca674073b33284fe19c594e52d757dc35b7ec1b0277e9eada7781dcd2f56 +db-batch-10,database,complete,1,3,raw/db-batch-10-attempt-1.json.gz,30e74d69c56dfb4f9a9abcaa766bdf6ba38b6f34e125a11c263588f71ca56c46 +db-batch-50,database,complete,1,3,raw/db-batch-50-attempt-1.json.gz,2631dd527972d301f38274a089361f12f72e9066bd682d5a44db5a949e1b9481 +db-batch-100,database,complete,1,3,raw/db-batch-100-attempt-1.json.gz,6a7837588b8bd8e687d9ac3290c16c4a9fd38789596132203930d5d5493c34ce +db-batch-500,database,complete,1,3,raw/db-batch-500-attempt-1.json.gz,907403528ed1fdbc1c4eea24f3517026f7b78799ff83320b6c42b45e981fb188 +db-batch-1000,database,complete,1,3,raw/db-batch-1000-attempt-1.json.gz,80469d563341738d16ce5cf11f48db82469d27982104abec7a872431e2c4611f +db-payload-1024,database,complete,1,3,raw/db-payload-1024-attempt-1.json.gz,e63d2e2f4ad5284a71f8e48c095509ff5d6806f16f095911d9941b1ec54c6636 +db-payload-16384,database,complete,1,3,raw/db-payload-16384-attempt-1.json.gz,9e1d5fb267e80f82dc5545f7d2c36179a692860d2d75fe8b009b6b33dc0a36dc +db-duplicates-10,database,complete,1,3,raw/db-duplicates-10-attempt-1.json.gz,924be0c894d2b9220312c5fc71726a70a3e1d44d6a3134cfc8c6828d14fd8aed +db-duplicates-50,database,complete,1,3,raw/db-duplicates-50-attempt-1.json.gz,3bbd6b9501484547f600f99bee631186635f0c800da55b97b6175623214aed0e +db-duplicates-90,database,complete,1,3,raw/db-duplicates-90-attempt-1.json.gz,48a0e237918e20300979db0a31127097631c9a1a13a49b7cbeddad222cca85ad +pipeline-batch-1,pipeline,limited,1,3,raw/pipeline-batch-1-attempt-1.json.gz,9b2a39ac29a9a1b706f62eab35fc6edc02c895c2b6ca2e024e7a9525d3712170 +pipeline-batch-10,pipeline,limited,1,3,raw/pipeline-batch-10-attempt-1.json.gz,eabe032e9145789c7ea3ef879048266e74f6a45dddbb789e5a28c001be50c3e8 +pipeline-batch-100,pipeline,complete,1,3,raw/pipeline-batch-100-attempt-1.json.gz,67189037495f6b6c21c6ce624b4d5f3cff6579ced93603d95804eb0cf25b1e0a +pipeline-rate-100,pipeline,complete,1,3,raw/pipeline-rate-100-attempt-1.json.gz,372bfca0da475c3912cc8a67af0ed499ee0856291d185e754b134896c53cd578 +pipeline-rate-5000,pipeline,limited,1,3,raw/pipeline-rate-5000-attempt-1.json.gz,270de12e779611ee90d18f3d727f6fc78a4e8da498d12f9e8432f1c51e813449 +pipeline-rate-10000,pipeline,limited,1,3,raw/pipeline-rate-10000-attempt-1.json.gz,d6b1b248af9bec8ae81e1995009f79ecaa51ecfef789c7eee05efad5994be766 +pipeline-payload-1024,pipeline,limited,1,3,raw/pipeline-payload-1024-attempt-1.json.gz,397ce2694350ca1a34e1772b3f83d0373f8eb06a0db821c2fd0c78e4fcffbb4d +pipeline-payload-16384,pipeline,limited,1,3,raw/pipeline-payload-16384-attempt-1.json.gz,b895d591e4a0b402a0f39919092064c8a37878dbc3ab5b8d0c6d04993ed584a1 +pipeline-burst,pipeline,complete,1,3,raw/pipeline-burst-attempt-1.json.gz,acad81044bdd9ae2c87ee49c4bb14ba76d36c3254ccd9971595bd0807b634511 +pipeline-concurrency-8,pipeline,limited,1,3,raw/pipeline-concurrency-8-attempt-1.json.gz,872f2edeff22fc8d16e66045a0acf3746d7fca55dfab7f461005afba10c9ed00 +pipeline-concurrency-64,pipeline,limited,1,3,raw/pipeline-concurrency-64-attempt-1.json.gz,ab20868f676a0e5e4f2e9388591e34be49a5cc66e7227e7c17cf7ce693711435 +recovery-database,recovery,limited,1,3,raw/recovery-database-attempt-1.json.gz,04b716e0460bb18b75ded351395233776f321835aaf90f185712728a1773c570 +recovery-consumer,recovery,complete,1,3,raw/recovery-consumer-attempt-1.json.gz,d1b207ce92acf905019a30d2a5a2767e02513f491850103650e77e16c4728ad0 +recovery-outbox,recovery,complete,1,3,raw/recovery-outbox-attempt-1.json.gz,ed1018de8e098cc6acfd927391656cc543c9f08ce7249ce50154ea8ffa52139c diff --git a/benchmarks/test_audit_study.py b/benchmarks/test_audit_study.py new file mode 100644 index 0000000..76bf6be --- /dev/null +++ b/benchmarks/test_audit_study.py @@ -0,0 +1,84 @@ +import copy +import gzip +import hashlib +import importlib.util +import json +from pathlib import Path +import tempfile +import unittest + +spec = importlib.util.spec_from_file_location('audit_study', Path(__file__).with_name('audit_study.py')) +audit = importlib.util.module_from_spec(spec) +spec.loader.exec_module(audit) + +class ArtifactAuditTests(unittest.TestCase): + def test_nearest_rank_and_set_hash(self): + self.assertEqual(audit.percentile(list(range(1, 101)), .95), 95) + self.assertEqual(audit.percentile([], .99), 0) + self.assertEqual(audit.id_hash(['b', 'a', 'a']), hashlib.sha256(b'a\nb').hexdigest()) + + def test_checksum_privacy_and_confinement(self): + with tempfile.TemporaryDirectory() as d: + root = Path(d) + raw = b'{"value":"private-canary"}' + data = gzip.compress(raw, mtime=0) + (root/'data.gz').write_bytes(data) + ref = {'Path':'data.gz','Size':len(data),'RawBytes':len(raw),'SHA256':hashlib.sha256(data).hexdigest()} + self.assertEqual(audit.read_artifact(root, ref)['value'], 'private-canary') + with self.assertRaises(audit.AuditError): audit.read_artifact(root, ref, ['private-canary']) + bad = dict(ref, SHA256='0'*64) + with self.assertRaises(audit.AuditError): audit.read_artifact(root,bad) + (root/'link').symlink_to('/etc/hosts') + with self.assertRaises(audit.AuditError): audit.read_artifact(root,dict(ref,Path='link')) + + def test_forged_statistics_and_late_window_are_rejected(self): + group={'Namespace':'n','Seed':42,'Count':1,'Indices':{k:[0] for k in ('attempted','accepted','stored')}} + group['Indices']['ambiguous']=[] + sets=audit.populations(group) + r={k:0 for k in ('Missing','Unexpected','DuplicateRows','ContentMismatch','GeneratorMissed','Ambiguous','Rejected','AttemptedAfterWindow','AcceptedAfterWindow','AmbiguousUnobserved','LateSchedules','ObserverLatePolls','ObserverOutages')} + r.update(correct=True,Planned=1,Attempted=1,Accepted=1,Persisted=1,ObservedEvents=1, + AttemptedInWindow=1,AcceptedInWindow=1,WindowNS=100,TotalNS=110,DrainNS=10, + AcceptedEPS=1e7,PersistedEPS=1e9/110,outcome='complete', + ack_ns=[10],visibility_ns=[20],backlog=[],id_set_sha256={k:audit.id_hash(v) for k,v in sets.items()}, + request_samples=[dict(StartedNS=0,FinishedNS=10,ElapsedNS=10,Events=1,Accepted=True,Ambiguous=False,Status=202)], + ack_latency={k:10 for k in ('p50_ns','p95_ns','p99_ns')}, + receipt_to_observed_storage_upper_bound={k:20 for k in ('p50_ns','p95_ns','p99_ns')}) + case={'Count':1,'BatchSize':1} + audit.pipeline(r,group,case) + bad=copy.deepcopy(r);bad['ack_latency']['p99_ns']=9 + with self.assertRaises(audit.AuditError): audit.pipeline(bad,group,case) + bad=copy.deepcopy(r);bad['request_samples'][0]['FinishedNS']=101;bad['request_samples'][0]['ElapsedNS']=101 + with self.assertRaises(audit.AuditError): audit.pipeline(bad,group,case) + + def test_registry_rejects_missing_or_changed_controls(self): + cases=audit.registered_cases('full') + self.assertEqual(len(cases),25) + rows=[{'Case':c} for c in cases] + audit.validate_registry(rows,'full') + with self.assertRaises(audit.AuditError): audit.validate_registry(rows[:-1],'full') + changed=copy.deepcopy(rows);changed[0]['Case']['PayloadBytes']=512 + with self.assertRaises(audit.AuditError): audit.validate_registry(changed,'full') + changed=copy.deepcopy(rows);changed[-1]['Case']['RestoreAt']=1 + with self.assertRaises(audit.AuditError): audit.validate_registry(changed,'full') + + def test_runtime_controls_reject_relaxed_durability_or_route(self): + m=dict(source_sha='a'*40,broker_fsync_bypass=False, + database=dict(fsync='on',synchronous_commit='on',full_page_writes='on',server_version='18.6'), + settings=dict(api_tls=True,api_route='https_gateway',tls_version='TLS 1.3', + api_rate_limit_rps=10000,api_log_level='info',redpanda_memory='1G',redpanda_smp=1), + TopicConfiguration='NAME ingestkit.events PARTITIONS 3 REPLICAS 1\nwrite.caching false\nretention.ms 604800000\nNAME ingestkit.dlq PARTITIONS 1 REPLICAS 1\nwrite.caching false\nretention.ms 604800000\n') + audit.validate_manifest(m,dict(SourceSHA='a'*40)) + for field,value in [('broker_fsync_bypass',True),('TopicConfiguration',m['TopicConfiguration'].replace('write.caching false','write.caching true',1))]: + bad=copy.deepcopy(m);bad[field]=value + with self.assertRaises(audit.AuditError):audit.validate_manifest(bad,dict(SourceSHA='a'*40)) + for group,field,value in [('settings','api_route','direct_http'),('settings','api_tls',False),('database','synchronous_commit','off')]: + bad=copy.deepcopy(m);bad[group][field]=value + with self.assertRaises(audit.AuditError):audit.validate_manifest(bad,dict(SourceSHA='a'*40)) + + def test_population_indices(self): + group={'Namespace':'n','Seed':42,'Count':2,'Indices':{'accepted':[0,1]}} + self.assertEqual(len(audit.populations(group)['accepted']),2) + group['Indices']['accepted']=[2] + with self.assertRaises(audit.AuditError): audit.populations(group) + +if __name__=='__main__': unittest.main() diff --git a/cmd/bench/main.go b/cmd/bench/main.go index f708482..4adc752 100644 --- a/cmd/bench/main.go +++ b/cmd/bench/main.go @@ -22,7 +22,7 @@ func main() { } } func run() (result error) { - mode := flag.String("mode", "database", "database or pipeline") + mode := flag.String("mode", "database", "database, pipeline or study") pattern := flag.String("pattern", "steady", "steady or burst (same count in first quarter of window)") count := flag.Int("count", 10000, "database submissions per method/repetition") size := flag.Int("payload", 256, "encoded payload bytes") @@ -34,12 +34,34 @@ func run() (result error) { duration := flag.Duration("duration", 10*time.Second, "measured window per repetition") warmup := flag.Duration("warmup", 2*time.Second, "pipeline warm-up window") out := flag.String("out", "", "report directory (default own run directory)") + smoke := flag.Bool("smoke", false, "reduced study correctness cases (not performance evidence)") + resume := flag.Bool("resume", false, "resume a matching study output directory") flag.Parse() - if *mode != "database" && *mode != "pipeline" { - return errors.New("mode must be database or pipeline") + if *mode != "database" && *mode != "pipeline" && *mode != "study" { + return errors.New("mode must be database, pipeline or study") } ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt, syscall.SIGTERM) defer cancel() + if *mode == "study" { + var unsupported string + flag.Visit(func(f *flag.Flag) { + switch f.Name { + case "mode", "smoke", "resume", "out", "seed": + default: + unsupported = f.Name + } + }) + if unsupported != "" { + return fmt.Errorf("study uses registered controls; -%s is only for single-run modes", unsupported) + } + if *resume && *out == "" { + return errors.New("resume requires the original -out directory") + } + return benchmark.RunStudy(ctx, benchmark.StudyConfig{OutputDirectory: *out, Smoke: *smoke, Resume: *resume, Seed: *seed, Writer: os.Stdout}) + } + if *smoke || *resume { + return errors.New("smoke/resume flags require study mode") + } s, e := runenv.Start(ctx, runenv.Options{Purpose: "bench-" + *mode}) if e != nil { return e diff --git a/cmd/consumer/main.go b/cmd/consumer/main.go index c29f5e5..6800e40 100644 --- a/cmd/consumer/main.go +++ b/cmd/consumer/main.go @@ -36,7 +36,7 @@ func main() { return } if err := run(ctx); err != nil { - slog.Error("consumer stopped") + service.NewDiagnostics(slog.Default(), 10*time.Second).Report("startup", "", -1, -1, err) os.Exit(1) } } @@ -56,6 +56,7 @@ func run(ctx context.Context) error { mux.Handle("/metrics", metrics.Handler()) mux.HandleFunc("/health", func(w http.ResponseWriter, r *http.Request) { w.WriteHeader(200) }) health := service.NewProcessingHealth() + diagnostics := service.NewDiagnostics(slog.Default(), 10*time.Second) mux.HandleFunc("/ready", readiness(health, store.Ping, func(c context.Context) error { reader := current.Load() if reader == nil { @@ -77,14 +78,19 @@ func run(ctx context.Context) error { probe, end := context.WithTimeout(c, time.Second) err := store.Ping(probe) end() + diagnostics.Report("startup", "", -1, -1, err) if err != nil { return err } if ctx.Err() != nil { return nil } - reader, err := messaging.NewReader(messaging.ReaderConfig{OnOperation: func(op messaging.Operation) { health.Observe(op.Kind, op.Err) }, Brokers: cfg.Brokers, Topic: cfg.EventTopic, DLQTopic: cfg.DLQTopic, GroupID: cfg.GroupID}, store, metrics) + reader, err := messaging.NewReader(messaging.ReaderConfig{OnOperation: func(op messaging.Operation) { + health.Observe(op.Kind, op.Err) + diagnostics.Report(op.Kind, op.Topic, op.Partition, op.Offset, op.Err) + }, Brokers: cfg.Brokers, Topic: cfg.EventTopic, DLQTopic: cfg.DLQTopic, GroupID: cfg.GroupID}, store, metrics) if err != nil { + diagnostics.Report("startup", "", -1, -1, err) return err } defer reader.Close() diff --git a/deploy/.env.example b/deploy/.env.example new file mode 100644 index 0000000..0c15e34 --- /dev/null +++ b/deploy/.env.example @@ -0,0 +1,6 @@ +# Generate deploy/.env with: deploy/configure.sh events.example.com +# Real secrets are generated locally and are not printed by the script. +DOMAIN= +API_KEYS= +POSTGRES_ADMIN_PASSWORD= +POSTGRES_WRITER_PASSWORD= diff --git a/deploy/Caddyfile b/deploy/Caddyfile new file mode 100644 index 0000000..79d1a5e --- /dev/null +++ b/deploy/Caddyfile @@ -0,0 +1,12 @@ +{ + admin off +} +{$DOMAIN} { + @collector path /v1/events /v1/events/batch /health /ready + handle @collector { + reverse_proxy api:8080 + } + handle { + respond 404 + } +} diff --git a/deploy/README.md b/deploy/README.md new file mode 100644 index 0000000..a819afa --- /dev/null +++ b/deploy/README.md @@ -0,0 +1,97 @@ +# Self-hosted deployment + +Prepare private configuration for the hostname you will use: + +~~~sh +deploy/configure.sh events.example.com +~~~ + +The script requires a POSIX shell, standard system utilities and OpenSSL. It +creates deploy/.env with mode 0600, three independent secrets and an initial API +key mapped to tenant default. It does not install software or contact a server. +Existing configuration is preserved; re-running against the same path fails. +Keep the file private and out of source control. API_KEYS is a JSON object; +duplicate decoded key names are rejected, including escaped spellings of the +same key. Use distinct keys for overlap rotation. + +An optional second argument selects a configuration directory. localhost is +accepted for local TLS verification. Public deployment will require a hostname +pointing to the host and reachable gateway ports 80/443. + +## Start on a server + +Replace `events.example.com` with your own DNS hostname in every command. + +Use a Linux host with Git, Docker Engine and Docker Compose v2.24.4 or newer, +OpenSSL, and curl. Allow room for the broker's 1 GiB allocation plus PostgreSQL, +the Go services and Docker. The [measured environment](../benchmarks/results/selfhost-2026-11-04/manifest-1.json) +used a Docker VM exposing 10 CPUs and about 16 GiB RAM; it does not establish a minimum host size. +Disk requirements depend on traffic and retention. This is a single-host setup: +losing its disk can lose both queued and stored events. + +Point the hostname's DNS records at the host. Ports 80 and 443 must be reachable +for Caddy's certificate issuance and HTTPS traffic. Caddy keeps its certificates +in a named volume. Public certificate issuance requires working DNS and external +reachability; the automated local test uses a private CA instead. + +~~~sh +git clone https://github.com/feat7/ingestkit.git +cd ingestkit +deploy/configure.sh events.example.com +docker compose --env-file deploy/.env -f deploy/compose.yml config --quiet +docker compose --env-file deploy/.env -f deploy/compose.yml up -d --build --wait +~~~ + +Only the gateway publishes ports. PostgreSQL, Kafka, broker administration and +service metrics stay on Docker's private network. The consumer uses an +`ingestkit_writer` login with schema usage, SELECT and INSERT (no temporary-table privilege); +migrations use the separate admin login. + +## Send and verify + +For the initial generated mapping, load the API key locally without printing it: + +~~~sh +INGESTKIT_API_KEY=$(sed -n 's/^API_KEYS={"\([0-9a-f]*\)":"default"}/\1/p' deploy/.env) +curl --fail-with-body https://events.example.com/v1/events/batch \ + -H "Authorization: Bearer $INGESTKIT_API_KEY" \ + -H 'Content-Type: application/json' \ + --data-binary @examples/checkout/events.json +unset INGESTKIT_API_KEY + +docker compose --env-file deploy/.env -f deploy/compose.yml exec -T postgres \ + psql -U ingestkit_admin -d ingestkit -c \ + "SELECT tenant_id,event_id,event_type,persisted_at FROM ingestkit.events ORDER BY persisted_at DESC LIMIT 10;" +~~~ + +HTTP 202 acknowledges the broker write. Storage happens asynchronously; allow +time for the consumer before checking SQL. Repeating the same IDs stores one row +per tenant and event ID. The first stored content wins. Use new UUIDs for new +business events. The API key belongs in trusted backend code. + +## Stop or update configuration + +~~~sh +# Stop and remove containers; preserve all named data volumes. +docker compose --env-file deploy/.env -f deploy/compose.yml down + +# After an intentional configuration edit, recreate affected containers. +docker compose --env-file deploy/.env -f deploy/compose.yml up -d --build --wait +~~~ + +A plain `restart` does not reload environment values. Never add `down -v` to an +ordinary shutdown. Keep a private backup of deploy/.env as well as your database +backups: changing PostgreSQL's initial admin password variable does not change +the password inside an existing database. + +The pinned [Caddy official image](https://hub.docker.com/_/caddy) is +`2.11.7-alpine`. Redpanda starts without dev-container mode, with a 1 GiB memory +allocation, one core, overprovisioned scheduling and explicit +`--unsafe-bypass-fsync=false`; both topics have `write.caching=false`. See the +[Redpanda mode reference](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-redpanda/rpk-redpanda-mode/) +for why development defaults must be examined. PostgreSQL retains its normal +fsync and synchronous commit settings. These settings do not provide replication +or protection from losing this host. + +See [operating the collector](../docs/operations.md) for readiness, disk growth, +key rotation, backup/restore and upgrade procedures. diff --git a/deploy/compose.yml b/deploy/compose.yml new file mode 100644 index 0000000..994cd55 --- /dev/null +++ b/deploy/compose.yml @@ -0,0 +1,122 @@ +name: ingestkit +x-labels: &labels + io.ingestkit.run: ${INGESTKIT_RUN_ID:-manual} +services: + gateway: + image: caddy:2.11.7-alpine + labels: *labels + restart: unless-stopped + environment: + DOMAIN: ${DOMAIN:?DOMAIN required; run deploy/configure.sh} + ports: ["80:80", "443:443"] + volumes: + - ./Caddyfile:/etc/caddy/Caddyfile:ro + - caddy_data:/data + - caddy_config:/config + depends_on: + api: {condition: service_healthy} + postgres: + image: postgres:18.6-alpine + labels: *labels + restart: unless-stopped + environment: + POSTGRES_USER: ingestkit_admin + POSTGRES_PASSWORD: ${POSTGRES_ADMIN_PASSWORD:?POSTGRES_ADMIN_PASSWORD required} + POSTGRES_DB: ingestkit + volumes: ["postgres_data:/var/lib/postgresql"] + healthcheck: + test: [CMD, pg_isready, -h, 127.0.0.1, -U, ingestkit_admin, -d, ingestkit] + interval: 1s + timeout: 2s + retries: 40 + redpanda: + image: docker.redpanda.com/redpandadata/redpanda:v26.2.6 + labels: *labels + restart: unless-stopped + command: + - redpanda + - start + - --overprovisioned + - --unsafe-bypass-fsync=false + - --smp=1 + - --memory=1G + - --reserve-memory=0M + - --kafka-addr=internal://0.0.0.0:9092 + - --advertise-kafka-addr=internal://redpanda:9092 + volumes: ["redpanda_data:/var/lib/redpanda/data"] + healthcheck: + test: [CMD, rpk, cluster, info, -X, brokers=localhost:9092] + interval: 1s + timeout: 3s + retries: 60 + topics: + image: docker.redpanda.com/redpandadata/redpanda:v26.2.6 + labels: *labels + entrypoint: [/bin/sh, -ec] + command: + - rpk topic create ingestkit.events --if-not-exists -p 3 -r 1 -c write.caching=false -c retention.ms=${RETENTION_MS:-604800000} -c max.message.bytes=524288 -X brokers=redpanda:9092 && rpk topic create ingestkit.dlq --if-not-exists -p 1 -r 1 -c write.caching=false -c retention.ms=${RETENTION_MS:-604800000} -c max.message.bytes=2097152 -X brokers=redpanda:9092 && rpk topic alter-config ingestkit.events ingestkit.dlq --set write.caching=false -X brokers=redpanda:9092 + depends_on: + redpanda: {condition: service_healthy} + migrate: + image: migrate/migrate:v4.20.1 + labels: *labels + volumes: ["../migrations/showcase:/migrations:ro"] + command: ["-path=/migrations", "-database=postgres://ingestkit_admin:${POSTGRES_ADMIN_PASSWORD:?POSTGRES_ADMIN_PASSWORD required}@postgres:5432/ingestkit?sslmode=disable&search_path=public&x-migrations-table=ingestkit_schema_migrations", up] + depends_on: + postgres: {condition: service_healthy} + roles: + image: postgres:18.6-alpine + labels: *labels + environment: + PGPASSWORD: ${POSTGRES_ADMIN_PASSWORD:?POSTGRES_ADMIN_PASSWORD required} + POSTGRES_WRITER_PASSWORD: ${POSTGRES_WRITER_PASSWORD:?POSTGRES_WRITER_PASSWORD required} + volumes: ["./roles.sql:/roles.sql:ro"] + entrypoint: [psql, -h, postgres, -U, ingestkit_admin, -d, ingestkit, -v, ON_ERROR_STOP=1, -f, /roles.sql] + depends_on: + migrate: {condition: service_completed_successfully} + api: + build: {context: .., dockerfile: Dockerfile.api} + labels: *labels + restart: unless-stopped + environment: + HTTP_ADDR: :8080 + LOG_LEVEL: ${LOG_LEVEL:-info} + BROKERS: redpanda:9092 + API_KEYS: ${API_KEYS:?API_KEYS required} + RATE_LIMIT_RPS: ${RATE_LIMIT_RPS:-10000} + depends_on: + topics: {condition: service_completed_successfully} + healthcheck: + test: [CMD, /api, check] + interval: 1s + timeout: 3s + retries: 40 + stop_grace_period: 12s + consumer: + build: {context: .., dockerfile: Dockerfile.consumer} + labels: *labels + restart: unless-stopped + environment: + METRICS_ADDR: :8081 + LOG_LEVEL: ${LOG_LEVEL:-info} + BROKERS: redpanda:9092 + CONSUMER_GROUP: ${CONSUMER_GROUP:-ingestkit-consumer} + DATABASE_URL: postgres://ingestkit_writer:${POSTGRES_WRITER_PASSWORD:?POSTGRES_WRITER_PASSWORD required}@postgres:5432/ingestkit?sslmode=disable + depends_on: + topics: {condition: service_completed_successfully} + roles: {condition: service_completed_successfully} + healthcheck: + test: [CMD, /consumer, check] + interval: 1s + timeout: 3s + retries: 40 + stop_grace_period: 12s +volumes: + postgres_data: + labels: *labels + redpanda_data: + labels: *labels + caddy_data: + labels: *labels + caddy_config: + labels: *labels diff --git a/deploy/configure.sh b/deploy/configure.sh new file mode 100755 index 0000000..50562a9 --- /dev/null +++ b/deploy/configure.sh @@ -0,0 +1,40 @@ +#!/bin/sh +# Generate local configuration only; never execute values or overwrite secrets. +set -eu +umask 077 +fail() { printf '%s\n' "$1" >&2; exit 1; } +ingestkit_domain=${1-} +ingestkit_output=${2-} +[ "$#" -ge 1 ] && [ "$#" -le 2 ] || fail 'Usage: configure.sh HOSTNAME [OUTPUT_DIRECTORY]' +[ "${#ingestkit_domain}" -le 253 ] || fail 'Invalid hostname' +case "$ingestkit_domain" in ''|*[!A-Za-z0-9.-]*|.*|*.|*..*) fail 'Invalid hostname';; esac +case "$ingestkit_domain" in localhost|*.*) ;; *) fail 'Invalid hostname: use a fully qualified domain or localhost';; esac +ingestkit_labels=$(printf '%s' "$ingestkit_domain" | tr '.' ' ') +for ingestkit_label in $ingestkit_labels; do + [ "${#ingestkit_label}" -le 63 ] || fail 'Invalid hostname label' + case "$ingestkit_label" in -*|*-) fail 'Invalid hostname label';; esac +done +if [ -z "$ingestkit_output" ]; then + ingestkit_output=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd) +fi +ingestkit_env=$ingestkit_output/.env +[ ! -e "$ingestkit_env" ] && [ ! -L "$ingestkit_env" ] || fail 'Configuration already exists; refusing to overwrite it' +command -v openssl >/dev/null 2>&1 || fail 'OpenSSL is required to generate secrets' +ingestkit_admin=$(openssl rand -hex 32) || fail 'Could not generate database secret' +ingestkit_writer=$(openssl rand -hex 32) || fail 'Could not generate writer secret' +ingestkit_key=$(openssl rand -hex 32) || fail 'Could not generate API secret' +# Validate generator output too: a broken command must not create weak config. +for ingestkit_secret in "$ingestkit_admin" "$ingestkit_writer" "$ingestkit_key"; do + [ "${#ingestkit_secret}" -eq 64 ] || fail 'Secret generation returned an invalid value' + case "$ingestkit_secret" in *[!0-9a-f]*) fail 'Secret generation returned an invalid value';; esac +done +mkdir -p -- "$ingestkit_output" +# noclobber makes creation exclusive, including a competing initializer. +(set -C; cat > "$ingestkit_env" <` and send `Content-Type: application/json`. +The server maps the key to a tenant; callers do not supply tenant identity. The +deployment default token bucket refills at 10,000 **requests**/s per tenant, +with a 10,000-request burst allowance. These are configuration limits, not +measured capacity; batched events consume one request. + +`POST /v1/events` accepts one envelope: + +~~~json +{ + "event_id": "dc12060f-f3a6-4ed3-9ea9-2d396b260b41", + "event_type": "order_completed", + "occurred_at": "2026-11-04T00:00:00Z", + "payload": {"order_id": "order-123", "amount_cents": 2500} +} +~~~ + +`POST /v1/events/batch` accepts `{ "events": [ ... ] }`. Use stable UUIDs that +were saved with the business operation. Create a new UUID for a new event, and +reuse the same UUID and serialized content for an uncertain retry. The first +stored event for `(tenant_id,event_id)` wins; a later payload does not update it. +Unknown envelope fields, malformed JSON and values incompatible with PostgreSQL +JSONB are rejected. Payloads must be objects. Event types are 1–128 bytes. +Timestamps must parse as RFC 3339. See [delivery details](delivery.md) for edge cases. + +| Limit | Value | +| --- | --- | +| Encoded individual input event | 256 KiB | +| HTTP request body | 1 MiB | +| Events in a batch | 1–100 | +| Payload nesting | At most 64 levels | + +Large events may require smaller batches to fit the request limit. For example, +ten 16 KiB payloads fit; one hundred do not. + +## Responses and retries + +A successful response is HTTP 202: + +~~~json +{"status":"accepted","event_ids":["dc12060f-f3a6-4ed3-9ea9-2d396b260b41"],"request_id":"f8c22d85-5e93-4cb5-a456-18b0f104bcca"} +~~~ + +The returned IDs match input order. This acknowledges the broker append. It does +not wait for the consumer or PostgreSQL. A batch is not a transaction across HTTP, +the broker and database. A timed-out/failed request may have delivered some or all +records, so retry identical IDs and content rather than generating replacements. + +| HTTP result | Caller action | +| --- | --- | +| 202 with matching IDs | Broker acknowledged; verify persistence separately when required | +| 400 | Fix the invalid envelope; do not blindly retry | +| 401 | Fix/rotate authentication; preserve unsent business events | +| 404 or redirect | Correct the endpoint/configuration | +| 413 | Reduce event/request size; split oversized batches | +| 429 | Retry the same content with bounded backoff | +| 500/502/503 or other server failure | Delivery may be uncertain; bounded retry with the same IDs | +| Timeout, connection loss or invalid acknowledgement | Delivery uncertain; retain IDs and retry | +| Untrusted TLS certificate | Fix trust/hostname; never disable verification | + +Application errors include `error`, `message`, `request_id` and `timestamp`; +`X-Request-ID` is also returned. The supplied helpers expose a validated UUID +request ID and status without copying response/error bodies into exceptions. +Their defaults are three attempts with 100/200 ms backoff and an eight-second +network deadline per attempt, shared by DNS, all address connections, TLS and +HTTP. Configure one to ten attempts. Python cannot cancel an operating-system +DNS lookup: at most eight daemon resolver workers may finish later. They never +connect or receive events or keys; waiting for a resolver slot uses the same +deadline. The helpers do not follow redirects or publish credentials to another +endpoint. + +`GET /health` checks the API process. `GET /ready` checks API broker readiness; +it says nothing about database persistence. Public metrics and administration +routes return 404. Consumer health/metrics are internal. Use the SQL verification +command in the deployment guide or the [operator guide](operations.md) to check +stored IDs and consumer progress. diff --git a/docs/architecture.md b/docs/architecture.md index 6ec1bb8..810da31 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -1,49 +1,74 @@ # Architecture -The API authenticates a key, supplies tenant identity and receipt time, validates -an event envelope, and waits for Redpanda acknowledgement. It does not contact -PostgreSQL. The consumer reads bounded records and writes valid segments through -a temporary PostgreSQL staging table using COPY, then merges into -ingestkit.events with ON CONFLICT DO NOTHING inside one transaction. - -Offsets advance after the database transaction commits. A crash between those -two operations causes replay; the unique (tenant_id,event_id) key makes the -storage effect idempotent. This is not an atomic transaction across systems. - -Malformed broker envelopes go to a separate acknowledged broker quarantine topic. -Database outages remain retries. A failed quarantine cannot justify committing -past the affected source record. - -## Why these choices - -- **HTTP boundary:** callers can reuse the service from any language without a - generated client or schema compiler. -- **Broker buffer:** accepts bursts and permits database outages within retention, - at the cost of an additional service and operational failure modes. -- **Generic JSONB table:** one readable storage path; application payload - validation belongs to the application. No per-event or per-tenant table factory. -- **Sequential bounded processing:** makes offset progress straightforward to - inspect. A claimed worker pool adds no value without a measured need. -- **COPY with staging/merge:** retains bulk loading while supporting replay. - Its overhead must be measured against simpler writes, not assumed away. - -## Boundaries - -This project does not provide analytics dashboards, a schema registry, generated -SDKs, automatic legacy migrations, database row-level tenant isolation, a hosted -service, or a connector platform. Small workloads may be better served by direct -PostgreSQL writes; the benchmark experiment compares the relevant write methods. - -internal/persistence owns the new store. The API, messaging, and event packages -do not depend on generated code. internal/runenv is local test/demo -orchestration, not a runtime service dependency. - -## What measurement changed - -The [local comparison](../benchmarks/results/local-2026-11-03/README.md) found -batch INSERT faster than COPY/stage/merge at batch size 100. The current store -keeps the latter implementation as a visible experiment; it is not justified -as a small-batch performance optimization. Larger batches, different payloads -or a direct PostgreSQL-only path need their own measurements. Generic JSONB -storage avoids generated schemas, but its cost relative to typed columns was -not measured. +The deployment has five long-running services: Caddy, a Go API, Redpanda, a Go +consumer and PostgreSQL. Initialization jobs create topics, apply migrations and +set up the restricted writer login. Only Caddy publishes host ports 80/443. + +Public HTTPS terminates at Caddy; the collector and its dependencies stay private on one Docker Compose host. + +[Full diagram](assets/deployment.svg) · [Source and reproduction](figures/README.md) + +The API maps a backend key to a tenant, validates the envelope, supplies receipt +time and publishes to Redpanda. It returns 202 after all records covered by the +response are acknowledged. It never contacts PostgreSQL. The producer uses +bounded buffering, a five-second publish deadline, all-ISR acknowledgements and +franz-go's idempotent producer. + +The consumer reads at most 500 records, handles each partition in order and +writes valid segments with one multi-row INSERT plus `ON CONFLICT DO NOTHING`. +Each SQL statement commits atomically. Only then does the consumer commit those +source offsets. A crash in between can replay the segment; the unique +`(tenant_id,event_id)` key prevents another row. An HTTP batch can span partitions +and SQL segments; it is not one transaction across the entire pipeline. + +Malformed broker envelopes go to a separate quarantine topic on the same broker. +The consumer waits for its acknowledgement before advancing the source offset. +Database failures are retries, not quarantine. See [delivery semantics](delivery.md). + +## What the components own + +| Component | Responsibility | +| --- | --- | +| `internal/api` and middleware | Authentication, per-tenant request limiting, validation, HTTP acknowledgements | +| `internal/messaging` | Bounded publish, partition processing, acknowledged quarantine, offset ordering | +| `internal/persistence` | Atomic batched SQL and first-content conflict handling | +| `internal/service` | Supervision, drain, processing readiness and safe diagnostics | +| `deploy/` | Canonical HTTPS Compose package, configuration generation, migrations/role initialization | +| `internal/runenv` | Owned local test/demo/study orchestration; not a deployed service | +| `examples/` | Importable callers and an application-owned SQLite outbox | +| `internal/benchmark` | Explicit write comparisons, HTTPS load observation and recovery experiments | + +PostgreSQL, Redpanda and Caddy state use named volumes. The consumer has CONNECT, +schema USAGE, SELECT and INSERT privileges; it is not a superuser and needs no +TEMP or permanent-DDL privilege. Migrations use a separate admin login. +The private Compose network is the deployment trust boundary; tenant API scoping +does not provide PostgreSQL row-level isolation. + +## Why the writer changed + +The first [complete corrected study](../benchmarks/results/selfhost-copy-2026-11-04/README.md) +compared single INSERT, batch INSERT and the actual temporary-table COPY/merge +path. Batch INSERT had the lower median than COPY/merge in all 11 configurations. +The default was changed separately, retaining atomic rollback, deduplication, +restricted-role and deterministic crash-replay checks. The COPY transaction now +lives as an explicit benchmark reference; changing the default does not relabel +a different algorithm as COPY. + +A [new complete study](../benchmarks/results/selfhost-2026-11-04/README.md) records +the resulting committed implementation. Repetition ranges overlap or reverse +some individual timings. There is no universal/adaptive batch-size threshold or +measured JSONB-versus-typed-table advantage. + +## Scope and tradeoffs + +The broker permits asynchronous acceptance and retained-log recovery during +PostgreSQL outages, at the cost of another stateful service. For an application +already satisfied by direct transactional PostgreSQL writes, that extra service +may not be useful. The outbox pattern is reusable independently of this collector. + +This package targets one Compose host. One broker replica, finite log retention +and a database backup do not provide high availability or automatic recovery from +losing the only disks. There is no analytics dashboard, connector catalog, schema +registry, generated SDK, automatic legacy import or business-payload validator. +Applications own their business schemas and event IDs; operators own backups, +disk growth and any database archival/deletion policy. diff --git a/docs/article.md b/docs/article.md index f885c85..39b4646 100644 --- a/docs/article.md +++ b/docs/article.md @@ -1,202 +1,268 @@ -# Building an event pipeline in Go—and testing what survives a crash - -An HTTP 202 response is easy to produce. Explaining what it means after a -process dies is harder. - -I wanted IngestKit to make that boundary visible. The useful artifact is a small -collector, a reproducible workload and failure tests that reconcile event IDs. -The implementation sends JSON events through a Go API to Redpanda, then a Go -consumer writes them into PostgreSQL. It also produced an inconvenient benchmark -result: at the tested small batch size, ordinary batch INSERT beat the COPY path. - -These are newly performed local experiments, not a production success story or -a historical sequence of optimizations. The measured code is -[deefc8162504fa482c19c63edda05c1c1a4c2ae7](https://github.com/feat7/ingestkit/tree/deefc8162504fa482c19c63edda05c1c1a4c2ae7). -[Raw results and environment manifests](../benchmarks/results/local-2026-11-03/README.md) -are part of the repository. Later validation and lifecycle fixes are covered by -regression tests; these captures remain evidence for the exact recorded revision, -rather than a new measurement of every subsequent change. - -## Start with the promise - -A caller supplies an event UUID, event type, occurrence timestamp and JSON object. -The API key determines the tenant; the caller cannot choose another tenant in -the envelope. The API supplies a receipt timestamp and validates the complete -request before publishing it. Payload validation includes PostgreSQL JSONB -representation limits and a conservative nesting bound; syntactically valid JSON -is not always a value PostgreSQL can store. - -~~~json -{"event_id":"00000000-0000-4000-8000-000000000003","event_type":"order_completed","occurred_at":"2026-11-03T00:00:00Z","payload":{"order_id":"order-1","amount":25}} +# Building an event collector around the failure boundaries + +An HTTP 202 can reach an application while PostgreSQL is unavailable. A failed +HTTP request can also have put some records into a broker. Both are ordinary +outcomes in an asynchronous collector. The useful question is what the caller +should retain, what the consumer can replay, and how to check what survived. + +IngestKit is a small Go collector built to make those boundaries inspectable: +HTTPS → Go API → Redpanda → Go consumer → PostgreSQL. It now includes a +self-contained Docker Compose deployment, copyable Python/Node callers and a +working application outbox. The experiments changed the implementation too: +batch INSERT beat the temporary-table COPY/merge strategy in every tested +configuration by median, so the deployed writer became simpler. + +This is a publication draft backed by [complete captures and methodology](../benchmarks/results/selfhost-2026-11-04/README.md) +from clean revision [213e4cc](../benchmarks/results/selfhost-2026-11-04/manifest-1.json). +It describes performed local experiments, not production adoption or a maximum +throughput result. The complete earlier COPY-writer study is retained separately. + +## Make it something another application can use + +The deployment contains the gateway, API, broker, consumer and database. Only +Caddy publishes ports 80/443; database, Kafka, administration and metrics stay +private. The consumer has a restricted writer login, while migrations use a +separate admin login. Named volumes retain database, broker and certificate state. + +One self-hosted Compose server: public Caddy and private API, Redpanda, consumer and PostgreSQL. + +A host needs Docker/Compose, Git, OpenSSL and curl. Go builds inside Docker. +With your own DNS hostname pointing to the server and ports 80/443 reachable: + +~~~sh +deploy/configure.sh events.example.com +docker compose --env-file deploy/.env -f deploy/compose.yml up -d --build --wait ~~~ -The API returns 202 only after the configured broker acknowledges every event -covered by the response. It does not wait for PostgreSQL. That distinction lets -the service accept events during a database outage, within the broker's finite -retention and durability assumptions. - -There is an awkward case: the request times out after some records reach the -broker. Returning an error does not undo those records. Clients therefore keep -the same IDs when retrying uncertain requests. A batch is validated together; -it is not an atomic broker transaction. The publisher has a five-second deadline -and bounded buffering, so a failing dependency cannot create an unlimited queue -inside the API process. - -## Put the crash window in the design - -The consumer follows a short sequence: - -1. Read a bounded batch from a partition. -2. COPY valid events into a temporary staging table. -3. Merge into the destination with `ON CONFLICT DO NOTHING`, then commit PostgreSQL. -4. Commit the successfully handled broker offsets. - -The primary key is `(tenant_id,event_id)`. If the consumer dies between steps -three and four, the database contains the event while the broker still considers -it pending. Restarting replays it; the unique key ignores the extra insertion. - -This is repeatable delivery with an idempotent storage effect. It is not a -transaction spanning Kafka and PostgreSQL. First stored content wins, so reusing -an ID for different content is a caller error. The implementation does not -compare payloads on a conflict. - -~~~mermaid -sequenceDiagram - participant C as Consumer - participant P as PostgreSQL - participant B as Broker - C->>P: Stage + merge - P-->>C: Transaction committed - Note over C: Kill here: row exists, offset pending - C->>B: Commit source offset - Note over C,B: Restart can replay, unique key prevents another row +The configuration script creates fresh secrets in an ignored file with mode 0600 and +refuses to overwrite an existing configuration. The [deployment walkthrough](../deploy/README.md) +starts at cloning the repository, sends fixed checkout UUIDs and verifies those +same IDs in SQL. Ordinary shutdown preserves volumes. Local tests verify HTTPS +against an explicit private CA; they do not claim to have exercised public DNS +or ACME certificate issuance. + +The HTTP contract is deliberately small: UUID, event type, occurrence timestamp +and JSON-object payload. A backend key determines the tenant; the caller cannot +supply a different tenant in its envelope. The API supplies receipt time. Unknown +fields and JSON values that PostgreSQL cannot represent are rejected before +publication. Business-payload validation remains in the application. + +The [copyable clients](integration.md) have no package dependencies. They validate +acknowledgement IDs, retry bounded transient/uncertain failures with the same +serialized bytes, and return safe status/request-ID metadata. They keep keys on +a trusted backend. They do not make an in-memory event survive a process crash. + +## Start stable IDs in the application transaction + +A successful order write followed by an HTTP send has a gap: the process can die +between them. Retrying a request helps only if the application retained the event. +The [transactional outbox pattern](https://docs.aws.amazon.com/prescriptive-guidance/latest/cloud-design-patterns/transactional-outbox.html) +addresses that creation gap by recording business state and pending delivery in +one database transaction, with idempotent handling of repeated dispatch. + +The included [SQLite application](../examples/outbox/README.md) makes that concrete. +An order and its serialized event/UUID commit together. Creating the same order +with the same amount returns the original event ID; conflicting business input +fails. A separate one-shot dispatcher reads pending work, releases the SQLite +connection, sends HTTP, and marks matching acknowledgements in another transaction. +It holds no business write lock while waiting on the network. + +After loading the backend key as shown in the deployment guide: + +~~~sh +export API_URL=https://events.example.com +export INGESTKIT_API_KEY +python3 -m examples.outbox create-order --database private/orders.db \ + --order-id order-123 --amount-cents 2500 +python3 -m examples.outbox dispatch --database private/orders.db +python3 -m examples.outbox status --database private/orders.db ~~~ -Malformed broker envelopes take another path: preserve their raw bytes, key, -headers and source coordinates in a quarantine topic. The source offset advances -only after that write is acknowledged. If quarantine fails, progress stops at -that record. A database outage is retried; it is not grounds for discarding a -valid event. Processing remains sequential so that a later offset cannot skip -unfinished work in the same partition. - -## Test the boundary instead of hoping to hit it - -The recovery suite uses real isolated PostgreSQL and Redpanda containers. The -crash test wraps the real store and pauses immediately after the database commit, -before the consumer can commit its offset. The parent kills only that helper -process, verifies the source offset is still pending, and starts a replacement -consumer in the same group. The replacement observes a duplicate and advances -the offset; the database still contains one row. - -Other tests stop PostgreSQL while events are acknowledged, restore it and -reconcile the accepted IDs. They also stop the broker, fail quarantine writes, -introduce a second consumer to cause a rebalance, and exercise graceful and forced -shutdown. One deliberate negative control temporarily committed offsets before -storage; the ordering regression test failed, then passed after restoring the -safe order. This is not exhaustive mutation testing, but it proves the ordering -check can detect the mistake it is meant to prevent. - -Each run owns distinct ports, volumes and a Compose project. Cleanup verifies -ownership. A failed experiment saves evidence rather than silently resetting a -shared database. A live outage walkthrough is available as `make demo-recovery`. - -## COPY was not the winner here - -The database experiment compares single INSERT, batch INSERT, and the actual -COPY/staging/merge store. All target the same indexed table with the same conflict -policy and durability settings. Workload generation, warm-up, dataset reset and -exact ID/payload verification happen outside the timer. Method order rotates -across three measured repetitions. - -For 10,000 unique submissions with 256-byte JSON payloads and batches of 100: - -| Method | Median elapsed | Submitted events/s | +The states are precise. `pending` still needs broker acknowledgement; +`acknowledged` means matching HTTP 202 IDs, with PostgreSQL potentially catching +up; `rejected` keeps a permanent 400/413 visible for repair. Authentication or +network failures do not silently discard business events. + +There is another crash gap after the broker ACK but before the dispatcher marks +its local row. A deterministic integration test pauses a test-only wrapper after +an actual HTTP ACK, kills that child and dispatches again. The new process uses +the saved UUID/body, and PostgreSQL still has one row. This example supports one +dispatcher; multiple dispatchers need a claim/lease protocol in the application's +own database. SQLite is the runnable example, not a requirement to add a second +database to an application that already has transactions. + +## Put SQL before source progress + +The API waits for every broker acknowledgement covered by its response. The +publish deadline is five seconds and buffering is bounded. HTTP batches are +validated together, but are not broker transactions: an error can follow partial +publication. A retry therefore reuses IDs rather than inventing replacements. + +The consumer's normal valid-record path is short: + +1. Read a bounded segment from a source partition. +2. Execute one multi-row INSERT with `ON CONFLICT DO NOTHING`; commit PostgreSQL. +3. Commit the handled source offsets. + +The unique key is `(tenant_id,event_id)`. A crash after step 2 and before step 3 +leaves stored rows with pending offsets. A replacement consumer replays them; +conflicts preserve the first stored content. Reusing a UUID for different content +is a caller error, not an update operation. + +Broker acknowledgement, SQL commit and source-offset commit are distinct boundaries; the alternative crash path replays stable IDs. + +[Open the full sequence](assets/delivery.svg). HTTP response timing and consumer +processing can overlap after broker acceptance. The diagram's alternative segment +does not imply that already committed offsets replay. + +This is an idempotent storage effect, not a transaction spanning Kafka and +PostgreSQL. [Kafka's delivery-semantics discussion](https://kafka.apache.org/41/design/design/) +is useful context: Kafka-to-Kafka transactions do not automatically make an +external database write atomic with an offset update. + +Malformed broker envelopes take a separate acknowledged quarantine path. Source +progress cannot skip a record whose quarantine write failed. A database outage +is retried, not treated as malformed data. The [delivery contract](delivery.md) +spells out these conditions and the finite retention/disk assumptions. + +## Test the crash window deliberately + +Randomly restarting a consumer is useful, but does not prove it died in the +SQL-commit/offset-commit gap. The deterministic regression wraps the real store, +pauses just after database commit, kills only that helper process, checks that +the source offset is still pending and starts a replacement in the same group. +Replay encounters the duplicate and advances progress; SQL still contains one row. + +Other real-service checks deny INSERT while database Ping still succeeds, +restore the grant and verify processing readiness; rotate overlapping API keys; +and restore a custom-format backup into a separate empty owned deployment while +preserving the source. Safe consumer diagnostics report operation, error class, +SQLSTATE and source coordinates, with repeated errors throttled. They exclude +raw errors, credentials and payloads. Connectivity is not sufficient evidence of +successful processing. + +## Measure the write path you actually deploy + +[PostgreSQL's bulk-loading guidance](https://www.postgresql.org/docs/18/populate.html) +explains why per-row commits are expensive and why COPY is useful for large +loads. This collector's original strategy did more work than plain COPY into +an empty table: create a temporary table, COPY into it, merge into an indexed +target with conflict handling, then commit. The comparison measures complete +strategies; it does not isolate the cost of each extra operation. + +The corrected study compares single INSERT, batch INSERT and that explicit +COPY/staging/merge reference. Each method gets 5,000 submissions, the same schema, +indexes, conflict policy and enabled database durability. Generation, reset, +warm-up and exact verification are outside elapsed time; order rotates across +three repetitions. Single INSERT commits every row, the others every batch. + +For 256-byte payloads, no duplicates and batch 100, the final study recorded +these median and min–max seconds across all three repetitions: + +| Method | Median (s) | Range (s) | | --- | ---: | ---: | -| Single INSERT | 16.909s | 591 | -| Batch INSERT | 0.492s | 20,333 | -| COPY/staging/merge | 1.011s | 9,889 | - -Single INSERT commits every row; the other methods commit every batch. That -commit amortization is part of this practical comparison, not an isolated test -of SQL parser cost. The COPY path additionally creates a temporary table and -merges into an indexed target. Measuring plain COPY into an empty unindexed table -would answer a different question from this service's replay-safe writes. - -With 10% duplicate submissions, each method inserted exactly 9,000 distinct IDs. -Median elapsed times were 13.054s, 0.256s and 0.706s respectively. Those runs did -less insertion work and used a separate local stack. They demonstrate correct -duplicate handling and its total workload timing, not a clean percentage cost -for deduplication. The raw repetitions show substantial timing variation. - -The result gives me no evidence to promote COPY/staging as the fastest small-batch -writer. The reference keeps it visible as an experiment with replay semantics; -ordinary batched SQL is the stronger candidate for this measured workload. -A practical deployment should benchmark its expected batch sizes and payloads -before choosing. A generic JSONB envelope also avoids generated per-event tables, -but I have not measured its storage or query overhead against typed schemas. - -## Measure the whole path separately - -Database throughput is not collector throughput. The end-to-end driver offers -10,000 unique events per ten-second window, in HTTP batches of 100 with eight -workers. After a two-second warm-up, it runs three repetitions of each pattern: -steady at 1,000 events/s, and a burst of 4,000 events/s for the first 2.5 seconds -followed by idle time. - -All six windows accepted and stored every ID, with no generator queue misses, -late schedules, rejected requests or ambiguous deliveries. Steady HTTP ACK p95 -was 27.4–31.0ms. Receipt-to-visible-storage p95 was 72.7–85.2ms. - -Burst results were more variable: ACK p95 was 137.9ms in the first repetition, -then 18.1ms and 17.0ms. Storage visibility p95 was 261.5ms, 68.7ms and 68.8ms. -The coarse observed backlog peaked at 881 events in the first burst. Its cause -is not established. Reporting only the best repetition would conceal a useful -limitation of this evidence. - -![All database and pipeline repetitions](assets/experiments.svg) - -Storage visibility is deliberately labelled an upper bound: it runs from API -receipt to the end of the first SQL query that sees the committed row. It includes -50ms polling and query delay. The database's `persisted_at` default is an insertion -timestamp, not a physical commit clock. HTTP latency is per successful request; -storage latency is per observed event. Those sample populations are different. - -Complete-window stored throughput was approximately 995–996 unique events/s, -including final confirmation. The burst's idle time is included. This verifies -a load point; it does not establish maximum capacity, active-burst processing -capacity or long-term latency guarantees. - -## What the experiment does not establish - -Everything ran on a shared Apple M1 Max with OrbStack. The host generator and SQL -observer compete with the services. PostgreSQL had fsync, synchronous commit and -full-page writes enabled. The single Redpanda broker had three event partitions, -one replica, seven-day retention and write caching explicitly disabled. Image -digests, runtime settings and coarse resource snapshots are saved with the data. - -A single broker does not survive loss of its only disk. An outage beyond retention -can expire pending events. These tests do not demonstrate host-loss recovery, -maximum throughput, cloud cost, deployment security or production adoption. API -key scoping is also not database row-level isolation. - -For small workloads, direct batched PostgreSQL writes may be the better design. -The broker buys outage buffering and replay, while adding another service to run. -Generated SDKs and a schema compiler are not necessary to exercise this contract: -the Python and Node examples are plain HTTP clients. Business payload validation -belongs to the sending application. - -## Reproduce and inspect - -With Go and Docker installed, run `make demo`, `make demo-recovery` and -`make test-integration`. The [benchmark instructions](../benchmarks/README.md) -include the exact measurement commands. Every acknowledged ID is reconciled -before a run succeeds; each experiment prints its evidence location. - -Useful related reading: Tiger Data's [PostgreSQL batch ingest comparison](https://www.tigerdata.com/blog/benchmarking-postgresql-batch-ingest) -examines how method and batch size affect results. Segment's -[deduplication write-up](https://www.twilio.com/en-us/blog/insights/exactly-once-delivery) -explores stable message IDs at a much larger scale. PostHog's -[ingestion documentation](https://posthog.com/docs/how-posthog-works/ingestion-pipeline) -shows a capture boundary feeding downstream processing through Kafka. These are -references for reasoning about the problem, not evidence that this project -operates at their scale. +| Single INSERT | 6.510 | 4.710–8.375 | +| Batch INSERT | 0.155 | 0.121–0.247 | +| COPY/staging/merge | 0.486 | 0.212–0.523 | + +The broader sweep covers batch sizes 1–1000, payloads up to 16 KiB and 10/50/90% +duplicate submissions. Batch INSERT had the lower median than COPY/merge in all 11 +configurations in both studies. Some individual repetitions overlap or reverse +that ordering. Duplicate cases insert fewer unique rows, so their submitted/s +is not a clean percentage estimate of deduplication overhead. + +All database methods and repetitions across batch size, payload size and duplicate-ID sweeps. + +That evidence changed the default to one atomic batched INSERT. Existing rollback, +deduplication and deterministic replay tests still pass; the deployed role no +longer needs temporary-table privilege. COPY remains a distinct reference in the +benchmark, rather than a label that silently follows the current default. A new +complete study was run from the resulting committed code. + +This result does not identify a universal COPY crossover. It does not compare +UNNEST or typed tables. [Tiger Data's batch-ingest exploration](https://www.tigerdata.com/blog/benchmarking-postgresql-batch-ingest) +compares different bulk-loading methods and sizes; its numbers should not be +transferred to this indexed, conflict-handling JSONB workload. + +## An offered rate is not a capacity result + +The HTTPS suite has 11 load configurations with three measured windows each. +The baseline offers 1,000 events/s for ten seconds, in batches of 100 with 32 +clients and 256-byte payloads. Warm-up is two seconds; target SQL polling is 50 ms. +Larger payloads use batch 10 to stay below the existing request cap. + +All three baseline windows attempted, acknowledged and independently verified +10,000 events each, without reported limits. HTTP ACK p95 was 40.19–42.92 ms; +receipt-to-observed-storage p95 was 101.61–103.08 ms. Those are different populations: +one sample per successful request versus one per observed event. + +The rest of the report is less tidy, and should stay that way. Smaller batches +show generator misses or boundary tails. At 10,000 offered/s, repetition 2 retained +1,000 ambiguous IDs absent at its final deadline; the 16 KiB case's second repetition +retained 160. They remain unknown, not proved never delivered, and are not counted +as acknowledged success. A caller should retain and retry their original IDs. + +All 33 HTTPS windows retain offered versus attempted and acknowledged load, latency populations and reported limits. + +A late acknowledgement at the edge of a finite window does not itself prove +saturation. Neither do missed generator schedules identify the collector's +capacity. In-window ACK rate excludes late ACKs. Stored rate includes the whole +window, request tail, observation drain and final verification. Selecting the +best repetition or dividing later rows by an earlier denominator would tell a +different, misleading story. + +The SQL metric is an upper bound: API receipt through the first completed query +that sees a committed row, including polling/query overhead. `persisted_at` alone +is not a commit clock. The observer uses a connection-owned pending-ID relation, +so a transaction committing late cannot fall behind a timestamp cursor. Final +ID/content verification is independent; rows discovered only then receive no +invented latency sample. Receipt and SQL observation share the deployment clock, +while the host schedules load with monotonic timing. + +## Recover, then reconcile + +The three availability experiments each run three repetitions: + +- PostgreSQL stop requested at 3s and start at 8s during a 15-second workload. +- Consumer KILL requested at 3s and restart at 5s during the same offered 500/s load. +- Broker stopped for eight seconds after stop completion, while 100 durable outbox + events survive a failed attempt lasting more than the five-second publish deadline. + +Every acknowledged ID/content reconciled after the database and consumer cases. +In the outbox case, a new dispatcher replayed the saved events to 100 accepted and +stored unique IDs per repetition. Container start completion is not the same as +catching up source progress. Actual control timestamps and all repetitions are +retained; SQL-observer outages appear as gaps. + +Actual recovery controls, observed pending acknowledgements, SQL gaps and application outbox snapshots across all repetitions. + +These are availability experiments, not throughput headlines or exhaustive +failure proofs. They complement the exact crash-window regression. The +[operator guide](operations.md) covers readiness, lag, disk growth, key rotation +and backup/restore. Restoring an older database does not rewind committed broker +offsets: replay must be deliberate and can recover only data still retained. + +## Keep the limits with the result + +The environment was an M1 Max physical host with an OrbStack Linux Docker VM, +with generator and SQL observer sharing that machine alongside existing workloads. +The broker had one core and 1 GiB; the VM exposed 10 CPUs and about 16 GiB. Coarse Docker +snapshots do not establish a sole bottleneck or a cloud-cost estimate. + +The new manifests inspect the actual broker process's fsync-bypass flag, topic +write caching, database durability, image IDs/digests and trusted HTTPS protocol. +An earlier development-mode capture had process-level fsync bypass enabled even +though topic write caching was false. It remains [historical with an erratum](../benchmarks/results/local-2026-11-03/README.md); +these corrected studies do not reuse it as deployment-performance evidence. + +The project has one broker replica and finite log retention on one host. It does +not protect against losing that host or its disks. Applications own business +schemas and IDs; operators own disk monitoring, backups and any SQL retention +policy. Direct PostgreSQL writes may be a better choice when a broker adds no +useful buffering or recovery boundary. + +Related reading includes [PostHog's capture/processing separation](https://posthog.com/docs/how-posthog-works/ingestion-pipeline) +and [Segment's client-ID deduplication discussion](https://www.twilio.com/en-us/blog/insights/exactly-once-delivery). +Their systems have different storage, scale and guarantees. Here, the reusable +parts are the deployable HTTP boundary, durable application outbox, explicit +commit ordering and experiments that keep their unknowns visible. diff --git a/docs/assets/database-batching-mobile.svg b/docs/assets/database-batching-mobile.svg new file mode 100644 index 0000000..4b6cca0 --- /dev/null +++ b/docs/assets/database-batching-mobile.svg @@ -0,0 +1,3939 @@ + + + + + + + + All 11 database configurations and 99 method/repetition rows. Submitted rate is not unique insertion rate in duplicate cases. Source 213e4cc · study selfhost-2026-11-04 · seed 42 + image/svg+xml + + + IngestKit study figure generator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/database-batching.svg b/docs/assets/database-batching.svg new file mode 100644 index 0000000..dc02ee5 --- /dev/null +++ b/docs/assets/database-batching.svg @@ -0,0 +1,3937 @@ + + + + + + + + All 11 database configurations and 99 method/repetition rows. Submitted rate is not unique insertion rate in duplicate cases. Source 213e4cc · study selfhost-2026-11-04 · seed 42 + image/svg+xml + + + IngestKit study figure generator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/delivery-mobile.svg b/docs/assets/delivery-mobile.svg new file mode 100644 index 0000000..3188e65 --- /dev/null +++ b/docs/assets/delivery-mobile.svg @@ -0,0 +1,36 @@ + +Three delivery boundaries +202 acknowledges the broker. SQL commits a replay-safe row. The consumer commits its offset after SQL succeeds. HTTP response and consumer progress run concurrently. + + + +Three delivery boundaries +Same event UUID across retries. + +1 · ACCEPTANCE +Broker ACK → HTTP 202 +The broker acknowledged the event. +PostgreSQL may still be pending. + +async store + +2 · STORAGE +SQL commit +One atomic batch, one row per ID. +Crash now? Replay the same UUID. + +after SQL + +3 · PROGRESS +Commit source offset +The consumer advances after SQL. +Replay keeps one row per tenant + UUID. +HTTP response and consumer progress +run concurrently after broker acceptance. +Kafka + PostgreSQL are separate transactions. +Source 213e4cc · full sequence linked beside guide + diff --git a/docs/assets/delivery.svg b/docs/assets/delivery.svg new file mode 100644 index 0000000..e85a851 --- /dev/null +++ b/docs/assets/delivery.svg @@ -0,0 +1,825 @@ + + + An ACK and a commit are different promises + A sequence diagram generated by Archify. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + POST + + Validate envelope; key suppliestenant + + + + + + + publish + + + + + + + + ACK + + + + + + + + 202 + + + + + + + + poll + + Consumer progress is independentof HTTP response timing + + + + + + + INSERT + + + + + + + + commit + + Crash here leaves the sourceoffset pending + + + + + + + offset + + + + + + + + replay + + Alternative: restart after acrash before offset commit + + + + + + + same UUID + + + + + + + + one row + + + + + + + + offset + + + + + + + Accepted → stored → offset + + + + Alternative: crash before offset + + + + + App · Sequence participant + + + + App + + + + API · Sequence participant + + + + API + + + + Log · Sequence participant + + + + Log + + + + Worker · Sequence participant + + + + Worker + + + + SQL · Sequence participant + + + + SQL + + + + + Legend + + + main request + + + + return + + + + async trace + + + + message + + + \ No newline at end of file diff --git a/docs/assets/deployment-mobile.svg b/docs/assets/deployment-mobile.svg new file mode 100644 index 0000000..b69c6b7 --- /dev/null +++ b/docs/assets/deployment-mobile.svg @@ -0,0 +1,49 @@ + +Deploy an event collectorA backend sends HTTPS to public Caddy. Private API, Redpanda, consumer and PostgreSQL run on one Docker Compose host. + + +Deploy an event collector + +ONE HOST + +Private services +No host ports + +Your backend +Stable event UUIDs + +Caddy +Public ports 80 / 443 + +Go API +Bearer key supplies tenant + +Redpanda +Events + quarantine topics + +Go consumer +Retry; commit SQL before offsets + +PostgreSQL +One row per tenant + UUID + + +HTTPS + + +HTTP + + +publish + + +consume + + +batch INSERT +One host does not protect against disk loss. +Source 213e4cc · full deployment diagram linked diff --git a/docs/assets/deployment.svg b/docs/assets/deployment.svg new file mode 100644 index 0000000..396836a --- /dev/null +++ b/docs/assets/deployment.svg @@ -0,0 +1,722 @@ + + + Deploy an event collector + An architecture diagram generated by Archify. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Your backend · stable event IDs · Architecture component + + + + Your backend + stable event IDs + + + + Caddy · public 80 / 443 · One Docker Compose host + + + + Caddy + public 80 / 443 + + + + Go API · key → tenant · One Docker Compose host › Private services · no published ports + + + + Go API + key → tenant + + + + Redpanda · events + DLQ · One Docker Compose host › Private services · no published ports + + + + Redpanda + events + DLQ + + + + Go consumer · retry + replay · One Docker Compose host › Private services · no published ports + + + + Go consumer + retry + replay + + + + PostgreSQL · one row per ID · One Docker Compose host › Private services · no published ports + + + + PostgreSQL + one row per ID + + + + + + HTTPS + + + + HTTP + + + + publish + + + + consume + + + + batch INSERT + + + + + + One Docker Compose host + + + + + Private services · no published ports + + + + + Legend + + + Backend + + + + Database + + + + Security + + + + Message bus + + + + External + + + \ No newline at end of file diff --git a/docs/assets/experiments.svg b/docs/assets/experiments.svg index 33a8bfd..badd32c 100644 --- a/docs/assets/experiments.svg +++ b/docs/assets/experiments.svg @@ -20,19 +20,19 @@ - - @@ -40,220 +40,220 @@ z - - + - - - - - - - - - - - @@ -276,137 +276,137 @@ z - + - - - - - @@ -428,148 +428,148 @@ z - + - - - - - - - @@ -592,57 +592,57 @@ z - + - - + - + - - @@ -654,18 +654,18 @@ z - + - + - + @@ -675,293 +675,293 @@ L 403.44948 80.092049 - - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - - - - - - - - @@ -1012,87 +1012,87 @@ z - - - - - - - + + + + - - - - + + + + - - - - + + + + - + - - - @@ -1140,10 +1140,10 @@ z - @@ -1151,28 +1151,28 @@ z - + - @@ -1197,30 +1197,30 @@ z - + - @@ -1252,13 +1252,13 @@ z - + - + @@ -1270,42 +1270,42 @@ L 824.99976 281.797796 - + - + - + - @@ -1316,18 +1316,18 @@ z - + - + - + @@ -1336,18 +1336,18 @@ L 824.99976 202.546824 - + - + - + @@ -1356,41 +1356,41 @@ L 824.99976 162.921338 - + - + - + - @@ -1402,18 +1402,18 @@ z - + - + - + @@ -1422,49 +1422,49 @@ L 824.99976 83.670366 - + - + - + - @@ -1476,62 +1476,62 @@ z - + - - @@ -1581,112 +1581,112 @@ z - - - - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - - + + - + - + - @@ -1722,217 +1722,283 @@ z - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - @@ -2034,11 +2100,11 @@ z - - + + - - + + diff --git a/docs/assets/pipeline-load-mobile.svg b/docs/assets/pipeline-load-mobile.svg new file mode 100644 index 0000000..0383e02 --- /dev/null +++ b/docs/assets/pipeline-load-mobile.svg @@ -0,0 +1,4059 @@ + + + + + + + + All 11 pipeline configurations and 33 measured windows. Hollow markers preserve late schedule, observer, rejection, ambiguity and tail limits. SQL latency is an observation upper bound, not physical commit time. Source 213e4cc · study selfhost-2026-11-04 · seed 42 + image/svg+xml + + + IngestKit study figure generator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/pipeline-load.svg b/docs/assets/pipeline-load.svg new file mode 100644 index 0000000..2738d6c --- /dev/null +++ b/docs/assets/pipeline-load.svg @@ -0,0 +1,4055 @@ + + + + + + + + All 11 pipeline configurations and 33 measured windows. Hollow markers preserve late schedule, observer, rejection, ambiguity and tail limits. SQL latency is an observation upper bound, not physical commit time. Source 213e4cc · study selfhost-2026-11-04 · seed 42 + image/svg+xml + + + IngestKit study figure generator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/recovery-mobile.svg b/docs/assets/recovery-mobile.svg new file mode 100644 index 0000000..968dbaa --- /dev/null +++ b/docs/assets/recovery-mobile.svg @@ -0,0 +1,5450 @@ + + + + + + + + Three availability experiments with three repetitions, actual Docker control completion times and explicit SQL observation gaps. Pending acknowledgement observations are not exact physical-commit backlogs. Source 213e4cc · study selfhost-2026-11-04 · seed 42 + image/svg+xml + + + IngestKit study figure generator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/assets/recovery.svg b/docs/assets/recovery.svg new file mode 100644 index 0000000..00ac221 --- /dev/null +++ b/docs/assets/recovery.svg @@ -0,0 +1,5442 @@ + + + + + + + + Three availability experiments with three repetitions, actual Docker control completion times and explicit SQL observation gaps. Pending acknowledgement observations are not exact physical-commit backlogs. Source 213e4cc · study selfhost-2026-11-04 · seed 42 + image/svg+xml + + + IngestKit study figure generator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/delivery.md b/docs/delivery.md index 72939f6..6e0ce94 100644 --- a/docs/delivery.md +++ b/docs/delivery.md @@ -1,87 +1,103 @@ # Delivery semantics -## Event contract +The [HTTP reference](api.md) defines the request envelope, limits and responses. +The promise is broker acknowledgement followed by asynchronous, replay-safe +PostgreSQL storage. The application must retain stable IDs and content when +delivery is uncertain. -POST /v1/events with: -~~~json -{"event_id":"00000000-0000-4000-8000-000000000001","event_type":"order_completed","occurred_at":"2026-11-03T00:00:00Z","payload":{"amount":25}} -~~~ - -POST /v1/events/batch with {"events":[...envelopes...]}. -Each envelope requires a nonzero UUID, a 1–128-byte event type, an RFC 3339 -occurred-at timestamp, and an object payload. The API supplies tenant and receipt -time. Unknown envelope fields, including a caller-supplied tenant, are rejected. -The API validates envelope structure; it does not validate business fields. +The API acknowledges the broker; the consumer commits SQL before offsets; a crash between commits replays the same UUID. -Limits: 256 KiB per event, 1 MiB per HTTP request, 100 events per HTTP batch. -Malformed input returns 400, invalid credentials 401, oversized input 413, -tenant rate limits 429, and unavailable/saturated publishing 503. +[Full sequence](assets/delivery.svg) · [Figure sources](figures/README.md) -## Acknowledgement and retry +The lower sequence segment is an alternative crash path. HTTP response timing +and consumer processing are concurrent after broker acceptance; the figure is +not a global ordering of every network packet. -202 means all records in that response were acknowledged by the broker. -It does not mean the consumer or database has processed them. +## Three boundaries -The publish call is bounded to five seconds. A timeout or failed batch can be -ambiguous: some records may already exist in the broker. Retry using the same -event IDs. Batches are validated together but are not broker transactions. +| Boundary | What it establishes | What remains pending | +| --- | --- | --- | +| HTTP 202 with matching IDs | The broker acknowledged all response records | Consumer processing and PostgreSQL storage | +| SQL statement commits | A valid consumer segment stored atomically; conflicting IDs kept their first stored content | Source-offset commit | +| Source offsets commit | Successfully handled source records can be skipped by this consumer group | Later application processing and operator retention/backup policy | -PostgreSQL stores one row per tenant and UUID. First stored content wins; -reusing an ID for different content is a caller error. No payload equality check -is promised. Delivery can repeat; the storage effect is idempotent. +The publisher waits at most five seconds and uses bounded buffers. A timeout, +503 or interrupted response can be ambiguous: some records may already exist in +the log. A validated HTTP batch is not a broker transaction and can span several +partitions/SQL segments. Retry the same UUIDs and content. The supplied clients +check the complete acknowledgement rather than assuming any 202 is success. -## Failures - -| Failure | Behaviour | -| --- | --- | -| PostgreSQL unavailable | Keep source progress uncommitted and retry. | -| Database commit, then consumer crash | Replay; duplicates are ignored in storage. | -| Malformed broker envelope | Preserve raw bytes/key/headers/source offsets in the quarantine topic. | -| Quarantine unavailable | Leave the source pending; never commit past it. | -| Rebalance or failed commit | Rejoin from committed offsets; unfinished work can replay. | -| Shutdown deadline exceeded | Exit with failure rather than claim a successful drain. | +PostgreSQL has a unique `(tenant_id,event_id)` key. Replaying a segment after SQL +commit and before offset commit cannot create another row. Reusing an ID with +different content is a caller error: conflicts are ignored, not compared or +updated. Tenant scoping at HTTP is not database row-level isolation. There is no +transaction spanning Kafka and PostgreSQL or unconditional exactly-once claim. -The consumer polls at most 500 records, has a fifteen-second processing/retry -window, and a ten-second group session timeout. Fetch byte settings guide -requests; they are not a hard process-memory ceiling. +A separate [application outbox](../examples/outbox/README.md) saves business state +and an event in one local transaction. Its acknowledged state means broker ACK, +not PostgreSQL persistence. A crash after HTTP ACK but before marking the outbox +row leaves that event pending; a new dispatcher resends its original bytes/UUID. -## Durability assumptions +## Failure behavior -The local broker has one replica and seven-day retention. Both event and -quarantine topics explicitly disable write caching, including the development -container's relaxed default. PostgreSQL fsync and synchronous commit stay enabled. -These settings do not protect against loss of the only disk or an outage beyond -retention. Tenant key scoping is not database row-level isolation. - -The database's persisted_at is an insertion timestamp, not proof of the -physical commit instant. Receipt-to-storage metrics are observed after transaction -completion and assume synchronized clocks on the local host. - -## Inspect and repair quarantine +| Failure | Behavior | +| --- | --- | +| PostgreSQL unavailable or writes denied | Retry; keep affected source progress uncommitted | +| SQL commit followed by consumer crash | Replay the same IDs; ignore storage duplicates | +| Malformed broker envelope | Preserve original bytes/key/headers/source coordinates in the separate quarantine topic | +| Quarantine unavailable | Do not advance past that record | +| Rebalance or offset-commit failure | Rejoin from committed offsets; unfinished work may replay | +| Broker unavailable | HTTP may fail uncertainly; application outbox retains pending events | +| Shutdown deadline exceeded | Exit with failure; do not claim a successful drain | + +The consumer polls at most 500 records and processes each partition sequentially. +Its processing/retry window is fifteen seconds; its group session timeout is ten +seconds. Source progress follows successful storage or acknowledged quarantine. +Fetch-byte settings guide requests; they are not a hard process-memory ceiling. +Shutdown stops new polls and gives current work ten seconds; it does not drain +the whole retained log. + +Consumer readiness includes failed storage, quarantine and offset operations. +Connectivity alone cannot clear a processing failure. After fixing the cause, +the matching operation must succeed (or a process restart starts fresh state). +Use [safe diagnostics and progress checks](operations.md), not API readiness +alone, to assess a stuck consumer. + +## Durability and observation + +The deployment uses one broker replica and seven-day event/quarantine retention. +Topic `write.caching=false` and the actual broker process's +`--unsafe-bypass-fsync=false` are both verified. PostgreSQL fsync and synchronous +commit remain enabled. These are configuration checks, not a physical power-loss +experiment or protection from losing the only host/disk. An outage beyond retained +data can leave an unrecoverable gap. PostgreSQL rows have no automatic expiry. +Restoring an older database does not rewind broker offsets; see the explicit +[backup/restore and retained-log replay procedure](operations.md). + +`persisted_at` is an insertion timestamp, not an exact physical commit clock. +The study records API receipt to the first completed SQL observation of a +committed row, including polling/query overhead. Receipt and SQL observation use +the deployment clock; host monotonic timing schedules requests. Final ID/content +verification is independent. An observer gap cannot provide exact commit times. + +## Representable payloads + +The API validates structure and PostgreSQL JSONB representation, not business +schema. Payloads must be objects, valid UTF-8 with paired Unicode surrogate +escapes, no NUL in strings/keys, and numeric representations within 131,072 integer +digits and 16,383 fractional digits. The root counts as level one of a conservative +64-level nesting bound. Envelope text and tenant IDs also reject NUL and invalid +Unicode. These checks run before HTTP publication and on broker decoding; an +incompatible broker record is quarantined rather than retried as a valid event. +See [PostgreSQL JSON restrictions](https://www.postgresql.org/docs/18/datatype-json.html). + +For private inspection, define the deployment `dc` helper from the operator guide: ~~~sh -docker compose exec redpanda rpk topic consume ingestkit.dlq -n 1 -X brokers=redpanda:9092 +dc exec -T redpanda rpk topic consume ingestkit.dlq -n 1 -X brokers=redpanda:9092 ~~~ -The quarantine value contains base64 original bytes and source coordinates. -Decode and repair the envelope, then resubmit through the authenticated API with -the original event ID. Invalid IDs require an explicit operator choice of a new -ID. Never bulk-replay unchecked quarantine into the broker or skip source offsets -to hide a failure. - -## Representable payloads and processing health - -Payloads must fit PostgreSQL JSONB: valid UTF-8 and paired Unicode surrogate -escapes, no NUL characters in strings or object keys, and numeric representations -within 131,072 integer digits and 16,383 fractional digits. The payload root counts -as level one of a conservative 64-level nesting limit. Envelope text and tenant -IDs also reject NUL and invalid Unicode. These checks run before HTTP publishing -and during broker decoding, so incompatible broker records enter acknowledged -quarantine rather than retrying storage forever. See [PostgreSQL's JSON restrictions](https://www.postgresql.org/docs/18/datatype-json.html). - -Consumer readiness also tracks storage, quarantine and offset-commit failures. -A reader restart or successful connectivity probe cannot clear such a failure; -the corresponding operation must succeed. During shutdown the consumer stops -polling, permits the current batch to finish within its ten-second drain budget, -and reports failure if it must cancel unfinished work. It does not drain every -record remaining in the broker; unhandled records remain replayable. +Quarantine contains data, including base64 original bytes. Inspect privately, +repair the envelope and resubmit through the authenticated API with its original +ID. If the original ID is invalid, choose a new one deliberately. Do not bulk +replay unchecked quarantine or skip source offsets to hide an error. diff --git a/docs/development.md b/docs/development.md index 4f60ef2..223803c 100644 --- a/docs/development.md +++ b/docs/development.md @@ -1,78 +1,89 @@ # Development -Requires Go 1.24+ and Docker with Compose v2. The pinned container build uses -Go 1.26.10; PostgreSQL is 18.6 and Redpanda is 26.2.6. Python and Node are optional -for their integration examples. +For deployment, use [deploy/README.md](../deploy/README.md). The root Compose file +is the local development stack with loopback dependency ports and public demo +credentials. It is distinct from the private HTTPS server package. + +The module requires Go 1.24+. Container builds and CI pin Go 1.26.10. Docker with +Compose 2.24.4+, OpenSSL and Python 3.9+ are required by the complete local test +harness; Node is required for its caller tests (CI selects Node 24). PostgreSQL 18.6, +Redpanda 26.2.6 and Caddy 2.11.7 are the recorded deployment versions. ~~~sh -make up # build, initialize topics/migrations, wait for readiness +make up make logs -make test # service-independent race tests +make test go vet ./... -make test-integration # real broker/database, isolated ports and volumes -make down # preserve normal local volumes +go build ./... +python3 -m unittest discover -s examples/checkout -p 'test_*.py' +node --test examples/checkout/*.test.mjs +python3 -m unittest discover -s examples/outbox -p 'test_*.py' +python3 -m unittest discover -s benchmarks -p 'test_*.py' +make test-integration +make down ~~~ -Integration tests fail when invoked without their explicit setup flag; they do -not silently skip. The script supplies the flag and the test runner owns its -stack. Cold startup waits for PostgreSQL TCP readiness; migration failure stops -the stack from becoming ready. +`make down` preserves normal development volumes. Integration tests create their +own projects, ports and volumes and verify ownership before control/cleanup. +They require the script's explicit setup flag and real services; missing setup +fails rather than silently skipping. Evidence stays under ignored `tmp/runs/`. +Never substitute a global Docker prune or reset another project's database. + +The full integration gate covers trusted HTTPS and private ports, restricted SQL +privileges, first-event/content checks, denied-write readiness and recovery, +credential overlap/recreate, source-preserving backup restore, reusable callers, +outbox outage/after-ACK crash, broker/SQL failures, quarantine, rebalance and drain. +It also runs the small study, interruption/resume and all three real recovery +experiments. The process budget is 20 minutes; full timing studies stay out of CI. -## Configuration +## Configuration and migrations -The local Compose defaults work without a copied .env file. .env.example -lists local overrides. Outside Compose, service processes require explicit -API_KEYS (JSON key-to-tenant mapping) or DATABASE_URL, plus BROKERS. -Relevant settings are HTTP_ADDR, METRICS_ADDR, EVENT_TOPIC, DLQ_TOPIC, -CONSUMER_GROUP, and RATE_LIMIT_RPS. Local defaults are not production -credentials. The API listens on 8080; consumer readiness/metrics on 8081. +The root Compose defaults work without an environment file. [.env.example](../.env.example) +lists local overrides. Runtime processes outside Compose require explicit +`API_KEYS` or `DATABASE_URL`, plus `BROKERS`. Other settings include `HTTP_ADDR`, +`METRICS_ADDR`, `EVENT_TOPIC`, `DLQ_TOPIC`, `CONSUMER_GROUP` and `RATE_LIMIT_RPS`. +Deployment configuration is a private data file, never shell-sourced by the harness. -/health is liveness. /ready probes dependencies. Metrics use counters and -latency histograms with bounded labels; compute throughput from counter deltas -over a stated interval. Logs can include request/event IDs at debug level, -without keys or full payloads. +Only `migrations/showcase` is applied, using the separate +`public.ingestkit_schema_migrations` ledger and `search_path=public`. Existing +legacy tables/ledgers are preserved; they are not automatically imported. -## Data and migrations +`/health` is liveness. API `/ready` probes broker acceptance. Consumer readiness +also latches failed storage/quarantine/progress operations; a successful Ping or +unrelated operation cannot clear them. Fix the cause and let the matching +operation succeed. A process restart starts new health state, so check actual +progress as well. Shutdown stops new polls and gives current work a ten-second +drain budget; exceeding it exits with failure. -Only migrations/showcase is applied, using the ledger -public.ingestkit_schema_migrations and explicit search_path=public. -The new table is ingestkit.events. Older events_* tables and migration -ledgers are not dropped or automatically imported. +## Walkthroughs and measurements -The default Compose project is ingestkit-showcase, avoiding legacy volumes. -Tests reserve distinct loopback ports per run and verify ownership before -resource control/cleanup. Evidence is saved under tmp/runs//. -Do not run global Docker prune commands or reset other projects. +~~~sh +make demo DEMO_FLAGS=-cleanup +make demo-recovery DEMO_FLAGS=-cleanup +make bench-study-smoke STUDY_FLAGS='-out tmp/studies/my-smoke -seed 42' +~~~ + +Demos without `-cleanup` stop their own services and retain volumes; each prints +its exact cleanup command. They use development HTTP, while the registered +study and deployment integration checks use the self-hosted HTTPS profile and +explicit CA trust. See [examples](../examples/README.md) and the +[experiment guide](../benchmarks/README.md). + +Full measurements require clean committed source, run sequentially and destroy +only their owned stacks after collecting evidence. Do not edit sources or run +other test/figure loads while timing them. Registered-study resume rejects +changed source, controls or runtime/image identity. [Figure generation](figures/README.md) +is optional development tooling, separate from runtime dependencies. ## Troubleshooting -- Port in use: change the matching port in .env, or use an isolated demo/test. -- 401: check the configured key mapping. -- 503: inspect /ready, service logs, broker availability and buffer pressure. -- Accepted but not stored: inspect consumer readiness, broker group lag and - quarantine. An API acknowledgement alone is not a storage check. -- Migration error: inspect the actual error/ledger; do not force a version or - discard a volume to conceal it. - -## Demonstrations and measurements - -`make demo` and `make demo-recovery` create independent stacks and verify the -checkout IDs. Both stop their services and preserve volumes by default; the -printed cleanup command names only that run. For disposable smoke runs use -`make demo DEMO_FLAGS=-cleanup`. The [checkout callers](../examples/checkout/README.md) -use only language standard libraries. - -`make bench-db` and `make bench-pipeline` run expensive local measurements; -[options and definitions](../benchmarks/README.md) are separate from normal CI. -They require committed source and destroy their own stacks after saving reports. -Do not run them concurrently when comparing timings. Normal CI runs only small -benchmark correctness checks as part of integration testing. - -Consumer readiness includes processing health, so a successful database Ping is -insufficient after a failed write. Correct the dependency/permission problem and -allow the pending operation to succeed. Shutdown stops new polls and has a -ten-second drain budget for current work; exceeding it exits with failure. - -Processing-health failure is intentionally latched: an unrelated successful -operation does not clear it. If no matching operation occurs after recovery, -readiness stays false until that operation succeeds or the process restarts. +- Port collision: change the matching development override or use an owned demo. +- 401: inspect the key mapping; preserve unsent application events. +- 503: inspect broker readiness and bounded publication pressure; retry stable IDs. +- 202 but no SQL row: check consumer readiness, lag, quarantine and the same UUID. +- Migration failure: inspect the actual ledger/error; do not force a version or delete volumes. + +For the deployed package, follow the [operator recipes](operations.md), including +safe logs, key refresh and fresh-target restore. Both broker process fsync bypass +and topic write caching matter; the [historical capture correction](../benchmarks/results/local-2026-11-03/README.md) +is retained rather than rewriting old evidence. diff --git a/docs/figures/README.md b/docs/figures/README.md new file mode 100644 index 0000000..ee7f573 --- /dev/null +++ b/docs/figures/README.md @@ -0,0 +1,92 @@ +# Figure sources and reproduction + +The diagrams describe source revision [213e4cc](../../benchmarks/results/selfhost-2026-11-04/manifest-1.json). +Their JSON sources cite the actual gateway, API, consumer, SQL and migration code. +The charts read the [audited study index](../../benchmarks/results/selfhost-2026-11-04/index.json), +including every repetition and reported limit. No chart uses the historical +fsync-bypassed pipeline captures. + +## Generate the charts + +The recorded plotting environment was Python3.12.14 and matplotlib3.11.2. +These are development tools; deployed services and copied HTTP clients do not +need matplotlib. From the repository root, in a Python3.12 environment: + +~~~sh +python3 -m venv .venv +.venv/bin/pip install matplotlib==3.11.2 +.venv/bin/python benchmarks/plot_results.py \ + --study benchmarks/results/selfhost-2026-11-04 --output docs/assets +python3 docs/figures/render_mobile_guides.py +~~~ + +Optional `--preview-dir tmp/figure-previews` also writes PNGs for inspection. +The generator independently audits the captures before plotting, fixes SVG IDs, +omits timestamps, embeds portable font outlines and writes desktop/mobile layouts +from the same measurements. Mobile layouts increase type size and stack legends; +no repetitions or limits disappear. The compact deployment/delivery guides are +source-cited typographic companions to the full Archify diagrams. + +## Reproduce the full diagrams + +[deployment.architecture.json](deployment.architecture.json) and +[delivery.sequence.json](delivery.sequence.json) were generated with Archify3.2.0, +then passed its showcase validation, strict artifact and real-browser gates. +The HTML and browser receipts live in the ignored `.archify/` directory. +With an installed Archify CLI, set `ARCHIFY_CLI` to its absolute +`bin/archify.mjs` path and run from this repository: + +~~~sh +node "$ARCHIFY_CLI" finalize architecture docs/figures/deployment.architecture.json \ + .archify/architecture-deployment-20261104-041835/deployment.html \ + --repo-root "$PWD" --quality showcase --json +node "$ARCHIFY_CLI" finalize sequence docs/figures/delivery.sequence.json \ + .archify/sequence-delivery-20261104-041835/delivery.html \ + --repo-root "$PWD" --quality showcase --json +~~~ + +Open each resulting HTML and choose **Export → SVG · Auto**. Save the full clean +exports as `docs/assets/deployment.svg` and `docs/assets/delivery.svg`. They include +automatic light/dark styling and exclude viewer controls. The checked repository +identity is the original SSH remote; source links are intentionally local-only. +A fresh changed candidate needs a new browser-evidence directory as documented by +Archify. The compact reading guides are generated separately by +[render_mobile_guides.py](render_mobile_guides.py), not described as packet traces. + +[Verification record and asset hashes](verification.json) cover the checked exports, +regeneration and visual review at800px and390px. Charts use an opaque light panel +for contrast on either page background; the diagram exports adapt to host theme. + +## Inspect the results + +Only Caddy publishes ports; the collector dependencies stay private on one host. + +[Full deployment diagram](../assets/deployment.svg). Persistent volumes and the +single-host failure domain matter as much as the arrows; see the +[deployment guide](../../deploy/README.md). + +202 acknowledges the broker; SQL commit precedes source-offset commit; a crash in between replays the same UUID. + +[Full sequence](../assets/delivery.svg). The second segment is an alternative +crash path, not a claim that an already committed offset replays. HTTP response +and consumer processing are concurrent after broker acceptance. + +All 99 database method/repetition measurements, with batch-size, payload-size and duplicate-ID controls. + +Submitted/s differs from inserted unique/s for duplicate workloads. Dots retain +all three repetitions; min–max/median marks are descriptive, not confidence intervals. + +All 33 HTTPS windows: target versus generated/acknowledged load and p95 ACK versus observed storage latency. + +Hollow markers retain limits, including ordinary finite-window tails. ACK samples +are successful requests; SQL samples are first-observed committed events. The +latter include polling/query delay. Neither panel establishes maximum capacity. + +All three repetitions of database outage, consumer restart and outbox replay with actual control timestamps. + +SQL-observer gaps remain blank. Fault lines mark Docker control completion, not +an exact service-availability transition. Outbox points are state snapshots; +intermediate changes are not fabricated. Pending acknowledged counts are based +on observation, not an instantaneous database backlog. Read the +[methodology and all outcomes](../../benchmarks/results/selfhost-2026-11-04/README.md) +with the figures. diff --git a/docs/figures/delivery.sequence.json b/docs/figures/delivery.sequence.json new file mode 100644 index 0000000..b6f5294 --- /dev/null +++ b/docs/figures/delivery.sequence.json @@ -0,0 +1,242 @@ +{ + "schema_version": 1, + "diagram_type": "sequence", + "meta": { + "title": "An ACK and a commit are different promises", + "locale": "en", + "output": ".archify/sequence-delivery-20261104-041835/delivery.html", + "quality_profile": "showcase", + "repository": { + "url": "git@github.com:feat7/ingestkit.git", + "revision": "213e4cc50523882f0d0cf7533d064494387d3207", + "link_mode": "local-only" + } + }, + "participants": [ + { + "id": "sender", + "type": "external", + "label": "App", + "sources": [ + { + "path": "examples/checkout/ingest_client.py", + "line": 42, + "end_line": 102 + } + ] + }, + { + "id": "api", + "type": "backend", + "label": "API", + "sources": [ + { + "path": "internal/api/ingest.go", + "line": 35, + "end_line": 53 + }, + { + "path": "internal/messaging/publisher.go", + "line": 77, + "end_line": 96 + } + ] + }, + { + "id": "broker", + "type": "messagebus", + "label": "Log", + "sources": [ + { + "path": "internal/messaging/publisher.go", + "line": 49, + "end_line": 64 + }, + { + "path": "deploy/compose.yml", + "line": 32, + "end_line": 59 + } + ] + }, + { + "id": "consumer", + "type": "backend", + "label": "Worker", + "sources": [ + { + "path": "internal/messaging/process.go", + "line": 11, + "end_line": 107 + }, + { + "path": "internal/messaging/reader.go", + "line": 114, + "end_line": 143 + }, + { + "path": "deploy/compose.yml", + "line": 95, + "end_line": 113 + } + ] + }, + { + "id": "postgres", + "type": "database", + "label": "SQL", + "sources": [ + { + "path": "internal/persistence/events.go", + "line": 22, + "end_line": 39 + }, + { + "path": "migrations/showcase/000001_events.up.sql", + "line": 2, + "end_line": 12 + } + ] + } + ], + "messages": [ + { + "id": "submit", + "from": "sender", + "to": "api", + "y": 170, + "label": "POST", + "variant": "default", + "note": "Validate envelope; key supplies tenant" + }, + { + "id": "publish", + "from": "api", + "to": "broker", + "y": 260, + "label": "publish", + "variant": "emphasis" + }, + { + "id": "broker-ack", + "from": "broker", + "to": "api", + "y": 300, + "label": "ACK", + "variant": "return" + }, + { + "id": "accept", + "from": "api", + "to": "sender", + "y": 340, + "label": "202", + "variant": "return" + }, + { + "id": "poll", + "from": "consumer", + "to": "broker", + "y": 410, + "label": "poll", + "variant": "default", + "note": "Consumer progress is independent of HTTP response timing" + }, + { + "id": "insert", + "from": "consumer", + "to": "postgres", + "y": 520, + "label": "INSERT", + "variant": "emphasis" + }, + { + "id": "sql-commit", + "from": "postgres", + "to": "consumer", + "y": 560, + "label": "commit", + "variant": "return", + "note": "Crash here leaves the source offset pending" + }, + { + "id": "advance", + "from": "consumer", + "to": "broker", + "y": 660, + "label": "offset", + "variant": "default" + }, + { + "id": "replay", + "from": "broker", + "to": "consumer", + "y": 770, + "label": "replay", + "variant": "dashed", + "note": "Alternative: restart after a crash before offset commit" + }, + { + "id": "retry-insert", + "from": "consumer", + "to": "postgres", + "y": 880, + "label": "same UUID", + "variant": "emphasis" + }, + { + "id": "dedup", + "from": "postgres", + "to": "consumer", + "y": 920, + "label": "one row", + "variant": "return" + }, + { + "id": "advance-retry", + "from": "consumer", + "to": "broker", + "y": 970, + "label": "offset", + "variant": "default" + } + ], + "segments": [ + { + "from": 150, + "to": 690, + "label": "Accepted \u2192 stored \u2192 offset" + }, + { + "from": 730, + "to": 1000, + "label": "Alternative: crash before offset" + } + ], + "cards": [ + { + "dot": "cyan", + "title": "Broker acceptance", + "items": [ + "202 follows all broker acknowledgements in the response.", + "A timeout can be ambiguous; retry the same UUID and bytes." + ] + }, + { + "dot": "emerald", + "title": "Storage effect", + "items": [ + "One SQL statement commits a valid segment atomically.", + "The unique (tenant_id,event_id) key keeps replay from creating another row." + ] + }, + { + "dot": "amber", + "title": "Crash boundary", + "items": [ + "A crash after SQL commit and before offset commit causes replay.", + "This is idempotent storage, not a transaction spanning Kafka and PostgreSQL." + ] + } + ] +} diff --git a/docs/figures/deployment.architecture.json b/docs/figures/deployment.architecture.json new file mode 100644 index 0000000..3e55681 --- /dev/null +++ b/docs/figures/deployment.architecture.json @@ -0,0 +1,266 @@ +{ + "schema_version": 1, + "diagram_type": "architecture", + "meta": { + "title": "Deploy an event collector", + "locale": "en", + "output": ".archify/architecture-deployment-20261104-041835/deployment.html", + "quality_profile": "showcase", + "repository": { + "url": "git@github.com:feat7/ingestkit.git", + "revision": "213e4cc50523882f0d0cf7533d064494387d3207", + "link_mode": "local-only" + } + }, + "components": [ + { + "id": "caller", + "type": "external", + "label": "Your backend", + "sublabel": "stable event IDs", + "pos": [ + 40, + 40 + ], + "size": [ + 120, + 64 + ], + "sources": [ + { + "path": "examples/checkout/ingest_client.py", + "line": 42, + "end_line": 102 + } + ] + }, + { + "id": "edge", + "type": "security", + "label": "Caddy", + "sublabel": "public 80 / 443", + "pos": [ + 40, + 200 + ], + "size": [ + 120, + 64 + ], + "sources": [ + { + "path": "deploy/compose.yml", + "line": 5, + "end_line": 17 + }, + { + "path": "deploy/Caddyfile", + "line": 1, + "end_line": 12 + } + ] + }, + { + "id": "ingest", + "type": "backend", + "label": "Go API", + "sublabel": "key \u2192 tenant", + "pos": [ + 300, + 200 + ], + "size": [ + 120, + 64 + ], + "sources": [ + { + "path": "internal/api/ingest.go", + "line": 12, + "end_line": 53 + }, + { + "path": "internal/api/middleware/auth.go", + "line": 42, + "end_line": 69 + }, + { + "path": "deploy/compose.yml", + "line": 77, + "end_line": 94 + } + ] + }, + { + "id": "log", + "type": "messagebus", + "label": "Redpanda", + "sublabel": "events + DLQ", + "pos": [ + 560, + 200 + ], + "size": [ + 120, + 64 + ], + "sources": [ + { + "path": "deploy/compose.yml", + "line": 32, + "end_line": 59 + }, + { + "path": "internal/messaging/publisher.go", + "line": 49, + "end_line": 64 + } + ] + }, + { + "id": "worker", + "type": "backend", + "label": "Go consumer", + "sublabel": "retry + replay", + "pos": [ + 560, + 400 + ], + "size": [ + 120, + 64 + ], + "sources": [ + { + "path": "internal/messaging/process.go", + "line": 11, + "end_line": 107 + }, + { + "path": "internal/messaging/reader.go", + "line": 114, + "end_line": 143 + }, + { + "path": "deploy/compose.yml", + "line": 95, + "end_line": 113 + } + ] + }, + { + "id": "database", + "type": "database", + "label": "PostgreSQL", + "sublabel": "one row per ID", + "pos": [ + 300, + 400 + ], + "size": [ + 120, + 64 + ], + "sources": [ + { + "path": "internal/persistence/events.go", + "line": 22, + "end_line": 39 + }, + { + "path": "migrations/showcase/000001_events.up.sql", + "line": 1, + "end_line": 12 + }, + { + "path": "deploy/compose.yml", + "line": 18, + "end_line": 31 + } + ] + } + ], + "boundaries": [ + { + "kind": "region", + "label": "One Docker Compose host", + "wraps": [ + "edge", + "ingest", + "log", + "worker", + "database" + ], + "pad": 26 + }, + { + "kind": "security-group", + "label": "Private services \u00b7 no published ports", + "wraps": [ + "ingest", + "log", + "worker", + "database" + ], + "pad": 14 + } + ], + "connections": [ + { + "from": "caller", + "to": "edge", + "label": "HTTPS", + "variant": "security" + }, + { + "from": "edge", + "to": "ingest", + "label": "HTTP" + }, + { + "from": "ingest", + "to": "log", + "label": "publish", + "variant": "emphasis" + }, + { + "from": "log", + "to": "worker", + "label": "consume", + "variant": "dashed" + }, + { + "from": "worker", + "to": "database", + "label": "batch INSERT", + "variant": "emphasis" + } + ], + "cards": [ + { + "dot": "cyan", + "title": "Acceptance", + "items": [ + "202 means the broker acknowledged the request. PostgreSQL storage is asynchronous.", + "API keys stay in trusted application backends." + ] + }, + { + "dot": "emerald", + "title": "Persistence", + "items": [ + "PostgreSQL, Redpanda and Caddy use named volumes.", + "SQL commits before source offsets; replay deduplicates by tenant and UUID.", + "Malformed records require an acknowledged DLQ write on the same broker before offset progress." + ] + }, + { + "dot": "amber", + "title": "One host", + "items": [ + "Only Caddy publishes ports 80/443. Dependencies and metrics stay private.", + "One broker/replica and finite retention do not protect against host or disk loss." + ] + } + ] +} diff --git a/docs/figures/render_mobile_guides.py b/docs/figures/render_mobile_guides.py new file mode 100644 index 0000000..1c1a6ba --- /dev/null +++ b/docs/figures/render_mobile_guides.py @@ -0,0 +1,104 @@ +"""Compact reading guides for the linked, source-backed Archify diagrams. + +These are typographic companions, not additional packet traces. The full source +ranges are recorded in deployment.architecture.json and delivery.sequence.json. +Delivery source evidence: +internal/api/ingest.go:45-53; internal/messaging/process.go:14-30; +internal/persistence/events.go:22-39; migrations/showcase/000001_events.up.sql:2-12 +at 213e4cc50523882f0d0cf7533d064494387d3207. +""" + +from pathlib import Path + +SVG = """ +Three delivery boundaries +202 acknowledges the broker. SQL commits a replay-safe row. The consumer commits its offset after SQL succeeds. HTTP response and consumer progress run concurrently. + + + +Three delivery boundaries +Same event UUID across retries. + +1 · ACCEPTANCE +Broker ACK → HTTP 202 +The broker acknowledged the event. +PostgreSQL may still be pending. + +async store + +2 · STORAGE +SQL commit +One atomic batch, one row per ID. +Crash now? Replay the same UUID. + +after SQL + +3 · PROGRESS +Commit source offset +The consumer advances after SQL. +Replay keeps one row per tenant + UUID. +HTTP response and consumer progress +run concurrently after broker acceptance. +Kafka + PostgreSQL are separate transactions. +Source 213e4cc · full sequence linked beside guide +""" + + +def deployment_guide(): + # Typography-first companion to deployment.architecture.json, same pinned sources. + style = SVG[SVG.index("") + 8] + parts = [ + '', + 'Deploy an event collectorA backend sends HTTPS to public Caddy. Private API, Redpanda, consumer and PostgreSQL run on one Docker Compose host.', + style, + '', + 'Deploy an event collector', + '', + 'ONE HOST', + '', + 'Private services', + 'No host ports', + ] + cards = [ + (65, "Your backend", "Stable event UUIDs"), + (230, "Caddy", "Public ports 80 / 443"), + (385, "Go API", "Bearer key supplies tenant"), + (485, "Redpanda", "Events + quarantine topics"), + (585, "Go consumer", "Retry; commit SQL before offsets"), + (685, "PostgreSQL", "One row per tenant + UUID"), + ] + for y, title, sub in cards: + parts += [ + f'', + f'{title}', + f'{sub}', + ] + for a, b, label in [ + (129, 230, "HTTPS"), + (294, 385, "HTTP"), + (449, 485, "publish"), + (549, 585, "consume"), + (649, 685, "batch INSERT"), + ]: + # Public entry passes through the host frame; other arrows stay in their boundary. + label_y = 313 if label == "HTTP" else (a + b) // 2 + 5 + parts += [ + f'', + f'', + f'{label}', + ] + parts += [ + 'One host does not protect against disk loss.', + 'Source 213e4cc · full deployment diagram linked', + ] + return "\n".join(parts) + + +if __name__ == "__main__": + output = Path(__file__).resolve().parents[1] / "assets" + (output / "delivery-mobile.svg").write_text(SVG + "\n") + (output / "deployment-mobile.svg").write_text(deployment_guide() + "\n") diff --git a/docs/figures/verification.json b/docs/figures/verification.json new file mode 100644 index 0000000..d88608a --- /dev/null +++ b/docs/figures/verification.json @@ -0,0 +1,48 @@ +{ + "schema": 1, + "source_revision": "213e4cc50523882f0d0cf7533d064494387d3207", + "study": "benchmarks/results/selfhost-2026-11-04", + "study_index_sha256": "74c4cf0be9a1125f8f6b5bd12e29562e1b99c544269a670c61f6fd32549d084d", + "tools": { + "archify": "3.2.0", + "python": "3.12.14", + "matplotlib": "3.11.2" + }, + "checks": { + "native_deployment": [ + "showcase-validation", + "delivery", + "strict-artifact", + "real-browser", + "visual-light-and-dark" + ], + "native_sequence": [ + "showcase-validation", + "delivery", + "strict-artifact", + "real-browser", + "visual-light-and-dark" + ], + "native_exports_repeated_byte_identical": true, + "six_plot_regeneration_byte_identical": true, + "svg_xml_and_no_scripts": true, + "rendered_markdown_image_loads": true, + "readme_width_pixels": 800, + "narrow_viewport_pixels": 390, + "narrow_document_scroll_width": 390, + "light_and_dark_backgrounds_inspected": true + }, + "scope": "Manual visual review supplements automated gates. Narrow typographic guides are companions to the full native diagrams. Charts retain all repetitions and limits; this file records verification, not a capacity or signature claim.", + "assets_sha256": { + "deployment.svg": "dc7a28badb795d3c1d9e920d4e0cf06c82f2142163c1501dfe9fdd47cec391a2", + "deployment-mobile.svg": "fb45ed953b36166d44d96c9847366cc967a7a922aeac4c9ddb8df7436ac77add", + "delivery.svg": "c1875b93d4318b47c4f3976f59843cd28bd0687c0d1ebdf0422de2d6bfc6b5a3", + "delivery-mobile.svg": "e38e589350e5da8dfaa616c09b24111c7b2aedc5ef8a1d274d5262bfad5f41f7", + "database-batching.svg": "32cddf86d6d06efa4d412fc9c92e8569808c07ceae91c830f2fd504588425099", + "database-batching-mobile.svg": "fed81e773541d7bf032fa4a02329a6a93c1359be4b4475b20ba615dfe045a052", + "pipeline-load.svg": "4a5c5f970b58a8a49756c4d7807063ea0ae12290c41a04ce9e8f31c9b8a60306", + "pipeline-load-mobile.svg": "62827c4972e27ae876dcf9742bb8df23d5fc95fee64778989c7214b6c4002e59", + "recovery.svg": "9d63c6eac716b79af3aeb8a870ad669b8999bbc2b28b5cbec00628ddeb4a25de", + "recovery-mobile.svg": "a333f7c24f3dbb3b35e0dc06bc9fb22fde9ec6999398c0c0befa6c88f4ed393c" + } +} diff --git a/docs/integration.md b/docs/integration.md new file mode 100644 index 0000000..843887e --- /dev/null +++ b/docs/integration.md @@ -0,0 +1,120 @@ +# Use IngestKit from a backend + +Deploy the [self-contained server](../deploy/README.md), then send ordinary HTTPS +requests. The [HTTP contract](api.md) is the interface; you can copy either small +helper into your project without installing an SDK or running Go there. The +Python example requires Python 3.9+; the Node example requires Node 20+. + +Keep API keys on a trusted backend. Browser/mobile clients should call your own +backend, which decides the event and supplies identity. Map overlapping keys to +the same tenant during [key rotation](operations.md). Do not send a tenant ID in +the event body. + +## Python + +From this checkout, the module can be imported directly. If copying the helper, +change the import to `from ingest_client import Client, IngestError`. + +~~~python +import os +from datetime import datetime, timezone +from uuid import uuid4 +from examples.checkout.ingest_client import Client, IngestError + +client = Client(os.environ["API_URL"], os.environ["INGESTKIT_API_KEY"]) +event = { + "event_id": str(uuid4()), + "event_type": "order_completed", + "occurred_at": datetime.now(timezone.utc).isoformat(), + "payload": {"order_id": "order-123", "amount_cents": 2500}, +} +# Save this event with the business operation before attempting delivery. +try: + acknowledged_ids = client.send(event) +except IngestError as error: + # Inspect error.status, error.retryable, error.request_id. + # Keep the saved event for a later retry or visible rejection workflow. + raise +~~~ + +Use `client.send_batch(events)` for a list. Both methods return the validated +acknowledgement IDs. Construct the event once and retain it across retries. + +## Node + +Copy `examples/checkout/ingest-client.mjs` into your backend, or use this import +when running a module from the repository root: + +~~~js +import {randomUUID} from 'node:crypto'; +import {IngestClient, IngestError} from './examples/checkout/ingest-client.mjs'; + +const client = new IngestClient({ + url: process.env.API_URL, + key: process.env.INGESTKIT_API_KEY, +}); +const event = { + event_id: randomUUID(), + event_type: 'order_completed', + occurred_at: new Date().toISOString(), + payload: {order_id: 'order-123', amount_cents: 2500}, +}; +// Save event with the business operation before attempting delivery. +try { + const acknowledgedIDs = await client.send(event); +} catch (error) { + if (error instanceof IngestError) { + // error.status, error.retryable and error.requestID are safe metadata. + // Keep event for a later attempt or a visible rejection workflow. + } + throw error; +} +~~~ + +Use `client.sendBatch(events)` for a list. Both modules serialize once per call, +reuse identical bytes across bounded retries, validate acknowledgement IDs and +leave the original event object unchanged. Keep event IDs and bodies when a +process exits: an in-memory retry loop is not durable delivery. + +## Try both callers + +After loading `INGESTKIT_API_KEY` as shown in the deployment guide: + +~~~sh +export API_URL=https://events.example.com +export INGESTKIT_API_KEY +python3 examples/checkout/send.py +SEND_MODE=single node examples/checkout/send.mjs +~~~ + +Both use the same fixed checkout UUIDs, so running them repeatedly still stores +three logical events for that tenant. Set `EVENTS_FILE` to your own JSON fixture +with an `events` array, and use fresh UUIDs for new business events. The CLIs fail +with a nonzero exit status when acknowledgement is absent or invalid. + +Public HTTPS uses the system CA roots. For an owned local deployment with a +private CA, set `INGESTKIT_CA_FILE=/absolute/path/to/root.crt`; Python's `ca_file` +and Node's `caFile` options provide the same trust. No certificate bypass is used. + +The [transactional outbox example](../examples/outbox/README.md) implements the +order→dispatch→SQL workflow with SQLite, including a real after-ACK crash test. + +An HTTP send after committing your application's transaction still leaves a gap: +the process can die between those operations. An application outbox closes that +creation gap by saving the business row and serialized event in one local +transaction, then dispatching it with stable IDs. The collector's deduplication +handles dispatch retries; it does not make your application transaction and HTTP +request atomic. + +## Choose a delivery boundary + +Use the direct clients when the application already retains work durably and can +retry it, or when occasional loss before sending is acceptable for that event. +Use an application outbox when creating the business state must also create +pending delivery atomically. In both cases, keep UUIDs/content across uncertain +responses; a matching 202 is broker acknowledgement, not a database query result. + +The [recovery captures](../benchmarks/results/selfhost-2026-11-04/README.md) include +three broker-outage/outbox repetitions with 100 saved events each. The separate +after-ACK child-kill regression checks the local marking gap exactly. The +[delivery guide](delivery.md) explains the independent consumer SQL/offset gap. diff --git a/docs/operations.md b/docs/operations.md new file mode 100644 index 0000000..cde933d --- /dev/null +++ b/docs/operations.md @@ -0,0 +1,151 @@ +# Operating a single-host collector + +Run these commands from the repository root. The helper consistently selects +this deployment and its private configuration: + +~~~sh +dc() { docker compose --env-file deploy/.env -f deploy/compose.yml "$@"; } +dc ps +dc logs --no-color --tail 100 api consumer +dc exec -T redpanda rpk group describe ingestkit-consumer -X brokers=redpanda:9092 +dc exec -T consumer /consumer check +~~~ + +API `/ready` checks broker acceptance. The consumer's private readiness check +also requires database access and successful processing. A database Ping alone +cannot clear a write, quarantine or offset-commit failure. Application logs emit +an operation, error class, SQLSTATE when available, and source topic/partition/ +offset. Repeated failures of an operation are throttled for ten seconds; the +next message reports the suppressed count. Recovery is logged once. Startup +failures use partition/offset -1 because no source record exists yet. Raw error +text, payloads, credentials and database URLs are excluded from these messages. +Database and broker logs can contain data; inspect those privately when needed. + +Group lag shows queued broker records, not a durable count of business events. +To inspect persisted events without retrieving payloads: + +~~~sh +dc exec -T postgres psql -U ingestkit_admin -d ingestkit -c \ + 'SELECT tenant_id,count(*),max(persisted_at) FROM ingestkit.events GROUP BY tenant_id;' +dc exec -T postgres df -h /var/lib/postgresql +dc exec -T redpanda df -h /var/lib/redpanda/data +~~~ + +## Disk growth and retention + +The event log and quarantine topic retain records for seven days by default +(`RETENTION_MS=604800000`). Kafka retention is asynchronous, not a storage quota. +Keep enough free space for traffic bursts and an outage backlog; monitor both +volumes, consumer lag and free disk. A long outage can exceed retention. Changing +the environment alone does not change existing topics: explicitly apply the +new retention value after deciding the required recovery window. For example, +apply a fourteen-day window with: + +~~~sh +dc exec -T redpanda rpk topic alter-config ingestkit.events ingestkit.dlq \ + --set retention.ms=1209600000 -X brokers=redpanda:9092 +~~~ + +Set the same `RETENTION_MS=1209600000` in private configuration for future topic +creation. PostgreSQL rows have no automatic +expiry. Choose and test your own archival/deletion policy before continuous use. +The collector does not protect against losing the single broker/database host. + +## Rotate an API key + +Generate a fresh key with `openssl rand -hex 32` in a private terminal. Edit +`deploy/.env` so `API_KEYS` temporarily maps both old and new keys to the same +tenant. Keep it valid JSON on one line and retain mode 0600. Recreate the API: + +~~~sh +dc up -d --no-deps --force-recreate --wait api +~~~ + +Move backend callers to the new key and verify acceptance. Remove the old key +from the mapping and run the same command again. The old key should return 401; +existing stored events remain under the tenant. A container restart does not +reload configuration. Changing a tenant mapping changes identity; it is not key +rotation. API keys authenticate trusted backend callers, so do not embed them +in a browser or public mobile application. + +Admin database credentials are initialized when PostgreSQL first creates its +data directory. Editing the initial password variable does not rotate an +existing login. Plan a coordinated SQL password change and private configuration +update if rotating database credentials. The writer role setup can update its +password when deliberately recreated, followed by recreating the consumer; do +not rotate it halfway through ingestion without expecting a temporary backlog. + +## Back up and restore into a fresh target + +A backup captures stored events at its snapshot. HTTP 202 may refer to events +still in the broker, so it is not proof they are in the dump. Keep the private +configuration separately and protect both backups from public access. + +~~~sh +umask 077 +mkdir -p backups +dc exec -T postgres pg_dump -U ingestkit_admin -d ingestkit -Fc > backups/ingestkit.dump +~~~ + +Restore into a **new empty deployment**, retaining the original until the new +one is verified. Use a separate checkout/configuration and Compose project name, +with a different hostname or the original gateway stopped during cutover. On the +new host/check-out, define a helper for the replacement project: + +~~~sh +newdc() { docker compose -p ingestkit-replacement --env-file deploy/.env -f deploy/compose.yml "$@"; } +newdc up -d --wait postgres +newdc exec -T postgres psql -U ingestkit_admin -d ingestkit -v ON_ERROR_STOP=1 \ + -c 'CREATE ROLE ingestkit_writer LOGIN;' +newdc cp backups/ingestkit.dump postgres:/tmp/ingestkit.dump +newdc exec -T postgres pg_restore -U ingestkit_admin -d ingestkit \ + --exit-on-error /tmp/ingestkit.dump +newdc run --rm roles +newdc up -d --build --wait +~~~ + +Copy the dump into the replacement's private `backups/` directory first. These +commands assume the replacement database has never been migrated or populated; +`pg_restore` must fail on conflicts. The dump carries the migration ledger and +table ACLs. The restore needs the writer role to exist before restoring its ACLs: +the commands create it using the replacement's admin session before +`pg_restore`; the `roles` service then sets its private +password and required privileges. Do not use `--clean`, drop schemas or delete +volumes on the live source. The integration test exercises a separately owned +empty replacement and verifies restored IDs, payload content, and subsequent +new/duplicate event ingestion while the source remains intact. + +After restoring an older database while retaining an existing broker, its +consumer group may already have committed past records missing from that +snapshot. Stopping the consumer and planning a replay is essential: use a fresh +consumer group from the earliest retained offsets. Stop the consumer with +`dc stop consumer`, add a fresh `CONSUMER_GROUP=ingestkit-replay-UNIQUE` in the +private configuration, and recreate it with +`dc up -d --no-deps --force-recreate --wait consumer`. The reader starts a new +group at the earliest retained offset. Keep the replacement group name after +verification. An alternative is an explicitly reviewed offset reset while the +consumer is stopped. Replayed IDs deduplicate +against restored rows. Retention expiry or broker disk loss can make the gap +unrecoverable. Never reset an active group or assume database restore rewinds +broker offsets. A new empty broker has no queued events from the old host. + +## Upgrade and shut down + +Read the migration and dependency changes, make a backup, and test the target +revision against a disposable restore first. Pull the chosen revision, then run +`dc up -d --build --wait`. Keep compatible images and the previous revision for +investigation; reverting code does not reverse database migrations or broker +format changes. Review those before planning a rollback. + +Use `dc down` for shutdown. Named database, broker and certificate volumes remain. +Do not use `down -v`, global prune, or volume removal for routine operations. + +## What the recovery evidence covers + +The [corrected availability captures](../benchmarks/results/selfhost-2026-11-04/README.md) +retain three repetitions each for a database outage, consumer kill/restart and +application-outbox replay while the broker is unavailable. They reconcile accepted +IDs/content and record actual control times. A start command returning is not a +claim that the group has caught up; check readiness, lag and the stored UUIDs. +SQL-unavailable intervals remain observation gaps. These local tests do not +establish tolerance of host/disk loss or an outage beyond retained data. diff --git a/docs/superpowers/plans/2026-11-04-self-hosted-ingestion.md b/docs/superpowers/plans/2026-11-04-self-hosted-ingestion.md new file mode 100644 index 0000000..854188e --- /dev/null +++ b/docs/superpowers/plans/2026-11-04-self-hosted-ingestion.md @@ -0,0 +1,166 @@ +# Self-hosted IngestKit Implementation Plan + +> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking. + +**Goal:** Make the collector straightforward to self-host and integrate, with reproducible experiments and clear visual documentation. + +**Architecture:** A Caddy HTTPS gateway fronts the existing Go API, with Redpanda and PostgreSQL private inside a single-host Compose deployment. Application examples use plain HTTP and a durable outbox. An owned local study runner measures that deployment with independent event reconciliation and publishes figures from its captures. + +**Tech Stack:** Existing Go/Fiber/franz-go/pgx runtime and pinned database/broker/build images; verified pinned Caddy image; POSIX shell/OpenSSL for local configuration; Python/Node standard libraries for integration; matplotlib and Archify for development-time figure generation. + +**Spec:** docs/superpowers/specs/2026-11-03-self-hosted-ingestion-design.md (approved 4 November 2026; native execution already selected). + +**Status:** Native implementation Tasks1–10 and the fresh whole-branch review/fix pass are complete in the existing feat/self-hosted-ingestion worktree. Full post-fix integration passed all 31 checks in 570.789s. The user subsequently selected push, pull request and merge after checks; integration is tracked by the pull request and Git history. See the [verification and review record](../reviews/2026-11-04-self-hosted-ingestion.md). The fsync correction and historical-results erratum are already committed in 3ca1a41, followed by reviewed design 641fbe2. User's go-ahead authorizes this implementation without another approval cycle for a transcription of the same scope. + +## Global Constraints + +- Preserve Go runtime, existing HTTP envelope/response contract, stable client IDs, tenant scoping and commit-before-offset ordering. HTTP limits remain256KiB/event,1MiB/request,100events/batch. +- A202 means broker acknowledgement, never database persistence. Preserve ambiguous retries with identical IDs and bytes; first stored content wins. +- Broker process fsync bypass must be false, topic write caching false, PostgreSQL fsync/synchronous_commit enabled. Preserve historical raw captures with their correction; new measurements require committed clean code and actual settings. +- Chosen target: one self-contained Linux/Compose server. Only gateway80/443 public; no public database, Kafka/admin or metrics ports. No HA, remote provisioning, paid resources, DNS changes, registry releases or social/article posting. +- Generated secrets are ignored mode0600 files, not routine log output, source files or build context. Never overwrite existing configuration. Consumer database credentials have only required privileges. +- Every test/demo/study owns unique projects, volumes and ports and verifies ownership before control/cleanup. Preserve unrelated data and ordinary deployment volumes. No global prune, destructive operator restore/reset, or history rewrites. +- New study has exactly11DB,11pipeline and3recovery configurations; at least3 measured repetitions after warm-up. Pipeline large-payload cases use batch10 and its256B/batch10 control. +- Local TLS tests trust an explicit private CA; never disable certificate checks or claim public ACME was tested without a public host. Deployment host does not need Go. +- Keep implementation native, using small tested commits and a persistent task ledger. One fresh whole-branch review at completion; no implementer/reviewer per task. + +## Review Focus + +1. A shell hostname or existing output path must not inject commands, corrupt env files or overwrite secrets; Docker context/logging must not expose nested credentials. Task1/2 tests. +2. API acceptance must continue with the restricted writer role, but denied writes must make readiness false even when Ping succeeds; restart/grant/credential updates preserve stored IDs. Task2/3 tests. +3. A sender may die after HTTP acknowledgement before marking an outbox row; restart must reuse the exact event ID/body without duplicating storage, while permanent rejection remains inspectable. Task4/5 tests. +4. Observation cannot advance a timestamp cursor past a transaction that commits late; high load, late ACKs, missing rows and client misses must not become a false successful capacity claim. Task6/7 tests. +5. Interrupted/resumed studies and backup restores cannot act on another stack or mix revisions/controls; retain failure evidence and verify every configuration/repetition exists. Task3/7/8 tests. + +## File boundaries + +- deploy/: canonical deployment Compose, Caddy and database-role setup, config generation and operator guide. Root development Compose remains supported. +- internal/runenv/: owned deployment-profile support, trusted local HTTP client, explicit test-only loopback dependency bindings; existing ownership checks remain authoritative. +- internal/service/: safe bounded diagnostics; cmd/consumer only wires them alongside processing health. +- examples/checkout/: importable Python/Node HTTP helpers and thin current CLIs; examples/outbox/: one SQLite order/outbox application. +- internal/benchmark/: deterministic profiles/namespace, incremental observer, valid rate accounting,25-case registry, journal, compressed artifacts and recovery orchestration. +- cmd/bench/: existing single-run modes plus study CLI; docs/assets + figure sources: derived outputs; docs/: short reader paths and article. + +### Task 1: Safe first-use deployment configuration + +**Files:** Create deploy/configure.sh, deploy/.env.example, deploy/README.md, internal/runenv/deployment_config.go and deployment_config_test.go; update .gitignore/.dockerignore if needed. + +**Interfaces:** deploy/configure.sh HOSTNAME [OUTPUT_DIRECTORY] defaults output to deploy/.env; it requires only shell/OpenSSL. Produce DeploymentConfig{Domain string, APIKeys map[string]string, AdminPassword, WriterPassword string} and ReadDeploymentConfig(path string)(DeploymentConfig,error). Generated passwords/keys are64hex characters; initial tenant default. Multiple valid key mappings permit overlap rotation. Parse data, never source/eval env files. + +- [x] **1. RED tests:** TestConfigureCreatesPrivateUniqueSecrets, TestConfigureRejectsUnsafeHostname, TestConfigureNeverOverwrites, TestDeploymentConfigRejectsMissingOrDuplicateFields. Run the real script against temp directories. Assert0600 mode, fresh64hex values, no stdout/stderr secrets, exact localhost/events.example.com domain acceptance; reject schemes, ports, whitespace, shell substitutions and newline inputs. Failed generation leaves no misleading partial config; existing sentinel bytes remain unchanged. Config round-trip verifies a valid mapping; empty fields, malformed JSON, invalid tenant text and duplicate assignments fail. +- [x] **2. Run:** go test ./internal/runenv -run 'TestConfigure|TestDeploymentConfig'. Expected: missing implementation or incorrect script behavior, not a permission/config skip. +- [x] **3. Implement** only generation/parsing, safe exclusive file creation and ignored credential paths. Secrets keys: DOMAIN, API_KEYS, POSTGRES_ADMIN_PASSWORD, POSTGRES_WRITER_PASSWORD; optional retained controls get explicit defaults later. Add recursive env/private-data exclusions to Docker context without excluding required Go sources. +- [x] **4. Verify:** go test -race ./internal/runenv and go test -race ./...; expected all pass. Inspect generated non-secret field names, never dump credentials. Document configuration command only; full deployment commands arrive with Task2. +- [x] **5. Commit:** feat: generate safe self-hosted deployment configuration. + +### Task 2: Actual HTTPS deployment, private services and restricted writer + +**Files:** Create deploy/compose.yml, deploy/Caddyfile, deploy/roles.sql; extend internal/runenv/compose.go, create deployment.go and deployment integration checks under tests/integration/deployment_test.go; add owned override fixtures under tests/fixtures/deployment/; update deploy/README.md and CI test invocation/time budget as required. + +**Interfaces:** Extend runenv.Options with Profile string (empty/development or selfhost) and ExposeDependencies bool (selfhost test/study only). Stack records private profile/config/CA; add APIKey() string and HTTPClient()(*http.Client,error). Selfhost APIURL ishttps://localhost: in tests, trusting an extracted private CA. ExposeDependencies adds explicit loopback-only PostgreSQL/Kafka/consumer probes for tests/studies and sets existing DatabaseURL/Brokers/ConsumerURL fields; canonical deployment has none of those published ports. Root development behavior stays unchanged. + +- [x] **1. RED real checks:** TestSelfhostTLSFirstEventAndDuplicate, TestSelfhostPublishesOnlyGateway, TestSelfhostWriterPrivileges, TestSelfhostRestartPreservesIDs, TestSelfhostMissingConfigFails. Verify a valid TLS chain through gateway, default client rejection without its CA, authenticated single/batch delivery, duplicate row count1,404 on public metrics/admin routes and only80/443 bound by canonical services. Writer role is non-superuser, writes through the actual store and cannot create/drop permanent tables or act as admin. Data and migration ledger survive restart. Missing secrets/domain fail startup with field names, no secret echo. Existing forged-owner and startup cancellation checks continue passing. +- [x] **2. Run** scripts/test-integration.sh with the new tests selected; expected fail before deployment exists. Check pinned Caddy/broker CLI and image provenance against official documentation before adding exact versions/options. +- [x] **3. Implement** gateway + PostgreSQL admin/migration + idempotent restricted role/grants + existing API/consumer + broker/topics. No dev-container implicit defaults in canonical deployment; explicitly set safe fsync behavior, appropriate private listeners and documented container resource settings. Grant writer TEMP, schema USAGE and required event table privileges; migrations retain their separate ledger. Configure reload recreates services, not only restart. Add local-CA override only to owned tests, and dependency probe bindings only when ExposeDependencies=true. Keep generated env/CA files private; collect safe stack evidence and preserve failure cleanup. +- [x] **4. Verify** complete real integration suite, unit/race, vet/build, real rendered Compose config and image-build context exclusion using a nested credential canary. No manual source-text assertion replaces actual published-port/role/TLS checks. Document clone→configure→up→send→SQL verification→volume-preserving down and the public-domain80/443 prerequisite. +- [x] **5. Commit:** feat: deploy the collector behind HTTPS with private dependencies. + +### Task 3: Operator diagnostics, credential refresh and verified restore + +**Files:** Create internal/service/diagnostics.go/diagnostics_test.go; wire cmd/consumer/main.go; extend tests/integration/deployment_test.go; create docs/operations.md; finish deployment operator links. + +**Interfaces:** NewDiagnostics(logger *slog.Logger,cooldown time.Duration)*Diagnostics; Report(kind,topic string,partition int32,offset int64,err error). Known kinds only; emit safe error class/SQLSTATE and source coordinates, suppress repeats for10s with a count. No raw err.Error, keys, payloads or DSNs. Use existing messaging.Operation callback and processing health. Startup failures have explicit unavailable coordinates, not invented offsets. + +- [x] **1. RED:** TestDiagnosticsRedactsAndBoundsRepeatedFailures, TestWriteDeniedMakesDeploymentUnready, TestCredentialOverlapAndRefresh, TestBackupRestoresIntoOwnedReplacement. Controlled clock verifies initial failure, suppressed repeats, recovery and later failure. Deliberate error text contains secret/payload sentinels that must not appear in application logs. Revoke INSERT from actual restricted writer while Ping works: readiness503, accepted IDs pending; restore grant and verify successful persistence/readiness. Recreate API with overlapping old/new keys for the same tenant, then remove old key: existing data survives, old401/new202. Restore a PostgreSQL custom-format dump into a separate owned empty replacement, verify original IDs/content and subsequent new/duplicate ingestion; source stack remains untouched. +- [x] **2. Run** affected unit/real tests and observe failure before wiring diagnostics/recipes. +- [x] **3. Implement** safe classification/throttling and exact operator commands: status, safe logs, pending events, key overlap, retention/disk growth, upgrades, backup and fresh-target restore. Explain explicit replay from retained broker data when restoring an older DB with advanced offsets; never automate destructive live offset resets/schema rollback. Tests may replace only their own verified empty fixture database/schema. Secrets are not printed in command diagnostics. +- [x] **4. Verify** targeted tests plus full integration and race suite. Exercise the written backup/restore and configuration-recreate commands on owned resources. Preserve existing supervisor/drain semantics. +- [x] **5. Commit:** feat: expose safe operation diagnostics and verified recovery procedures. + +### Task 4: Importable application HTTP clients and API guide + +**Files:** Create examples/checkout/ingest_client.py, ingest-client.mjs and standard-library tests; refactor send.py/send.mjs; add minimal Python package markers as needed; create docs/integration.md and docs/api.md; update examples/README.md, checkout README and CI. + +**Interfaces:** Python Client(base_url,key,timeout=8,max_attempts=3,ca_file=None) with send(event) and send_batch(events); Node IngestClient({url,key,timeoutMs=8000,maxAttempts=3,caFile}) with send/sendBatch. Return validated acknowledgement IDs; typed/sanitized errors expose status/retryable/request ID. Node uses standard http/https to support an explicit test CA. CLIs retain API_URL, INGESTKIT_API_KEY, SEND_MODE, EVENTS_FILE and add INGESTKIT_CA_FILE. + +- [x] **1. RED controlled-server tests:** import has no side effects; single/batch return exact IDs;503/429/network ambiguity preserve serialized IDs/body and stop after bounded attempts;400/401/413 do not retry; mismatched ACKs cannot become success; key/DSN/payload are absent from error output; untrusted TLS fails and supplied CA succeeds. Retain existing real TestCallerModesPreserveRetryBytes and run both clients through owned HTTPS deployment. +- [x] **2. Run** python3 -m unittest discover -s examples/checkout -p 'test_*.py' and node --test examples/checkout/*.test.mjs; expected new behavior fails. +- [x] **3. Implement** small copyable modules, no generated SDK or package publishing. Caller supplies stable IDs and trusted backend credentials. Guide covers real backend usage, broker acceptance vs persistence, atomicity limits of sending after a business write, all status codes/limits and SQL verification. Browser secrets stay on its backend. +- [x] **4. Verify** both language suites, real integration contract checks, Go race suite and documented import/CLI commands. CI runs language suites after installing its existing Node version. +- [x] **5. Commit:** feat: provide reusable Python and Node ingestion clients. + +### Task 5: Durable application outbox example + +**Files:** Create examples/outbox/{app.py,__main__.py,__init__.py,schema.sql,test_outbox.py,README.md}; add tests/integration/outbox_test.go and test-only crash wrapper; extend integration guide. + +**Interfaces:** create_order(database,order_id,amount_cents)->event_id; dispatch_once(database,client,batch_size=100)->summary. CLI: python3 -m examples.outbox create-order|dispatch|status with --database; dispatch is a bounded one-shot command. One SQLite transaction stores order, UUID, timestamp and serialized event. Retried same order ID returns its original event; conflicting amount fails. Pending/acknowledged/rejected states are explicit; acknowledged always means broker ACK. + +- [x] **1. RED:** atomic order/outbox rollback, stable ID on retried business request, unchanged bytes after process restart, bounded pending retry, visible permanent rejection and no false acknowledgement. Real TestOutboxSurvivesBrokerOutage and TestOutboxCrashAfterAckReplaysSafely: crash wrapper pauses only the test dispatcher after real HTTP ACK before SQLite update; kill own child, restart, verify one stored UUID and eventual outbox ACK. No production HTTP/test failpoint. +- [x] **2. Run** standard Python outbox suite and affected real integration tests; expected fail before app exists. +- [x] **3. Implement** using Python sqlite3 and Task4 client. Retain retryable/ambiguous work, expose permanent rejection for operator repair, no silent dropping. Explain single-dispatcher scope and how to adapt the transaction to an application's own DB; include final SQL/outbox status commands. Do not build an analytics UI or queue framework. +- [x] **4. Verify** Python/client suites, Go race and full real integration; run documented order→dispatch→collector SQL workflow over HTTPS with the private CA. +- [x] **5. Commit:** feat: demonstrate durable application delivery with a transactional outbox. + +### Task 6: Measurement integrity before scaling experiments + +**Files:** Extend internal/benchmark/workload.go, database.go, pipeline.go/results.go/manifest.go and tests; create observer.go/observer_integration_test.go; update benchmark methodology. + +**Interfaces:** WorkloadConfig gains Namespace and PayloadProfile (legacy/fixed versus varied). Namespace scopes reproducible UUIDs and benchmark event type; varied payloads are deterministic ASCII entropy at the exact requested encoded size. PipelineConfig gains HTTPClient *http.Client and Namespace. PendingObserver uses one pool connection and a temporary pending-ID relation; Observe(ctx)([]StoredObservation,error), Close(ctx)error. It removes IDs only when a query sees their committed target rows. Keep a final independent content/set query. Add accepted-in-window vs late-ACK counts, query/poll overhead and explicit observation-bounded ambiguity fields. + +- [x] **1. RED:** seed/profile/namespace reproducibility and exact byte sizes; duplicate bytes preserved; invalid counts/NaN fractions rejected; different cases cannot reuse IDs. TestObserverSeesOutOfOrderCommits holds an earlier-received/insertion transaction open, observes a later transaction, then commits the first and must still see it. TestObserverCancellationReleasesConnection, TestIndependentReconciliationFindsMissingAndUnexpected, TestLateAckOutsideMeasuredWindow, TestClientQueueTailClassified, and secrets-redaction checks. Preserve unowned sentinel rows and refuse pre-existing case collisions before cleanup. +- [x] **2. Run** unit and tagged DB tests; verify failures identify the existing full-scan/cursor/accounting limitations. +- [x] **3. Implement** incremental temp-table observation and actual-source metadata, including current broker memory/CPU settings, deployment route, selected safe API controls and TLS use. Never use received_at/persisted_at as a commit cursor. Final verification checks expected IDs/content and unplanned IDs within the run's unique event-type namespace, not unrelated rows. Observational latency remains an upper bound. Acknowledged missing events fail; generator misses/rejections/ambiguous attempts are explicit limits, never a successful attained-load/capacity headline. Missing ambiguity observations are unknown-by-deadline, not proof of non-delivery. +- [x] **4. Verify** full Go race/vet/build and real observer/pipeline correctness checks. Capture no credentials when inspecting actual settings. Maintain historical report readers; do not edit historical raw captures. +- [x] **5. Commit:** fix: make expanded ingestion measurements reproducible and commit-aware. + +### Task 7: Owned25-case study runner, journal and recovery experiments + +**Files:** Create internal/benchmark/{cases,study,recovery,artifacts}.go and tests; extend cmd/bench/main.go and Makefile; add small integration smoke and benchmark guide. + +**Interfaces:** StudyCases()[]Case is the exact25-case registry from the spec; Case has ID, Kind and explicit controls. StudyConfig selects output directory, full/smoke, resume and seed. RunStudy(ctx,config)error owns a selfhost stack with test-only loopback observers and trusted HTTPS client. Existing single-run benchmark modes remain. Add make bench-study and make bench-study-smoke. Journal schema1 stores source SHA, image/config fingerprints, seed, run namespace, case/repetition progress and artifact hashes. Resume reruns incomplete work on a fresh owned stack and refuses differing source/config; completed captures stay immutable. + +- [x] **1. RED:** TestStudyRegistryHas25ControlledCases checks11DB/11pipeline/3recovery and matched large-payload batch10 baseline; serialized requests remain below1MiB. TestJournalRejectsRevisionOrControlChanges, TestStudyInterruptPreservesEvidenceAndOwnership, TestEveryMeasuredRepetitionRetained, TestCompressedArtifactsHaveStableChecksums. Real smoke covers one small DB and one HTTPS pipeline case,3reps each. Recovery tests record actual fault/restart timestamps and accepted/stored sets rather than synthetic curves. +- [x] **2. Run** targeted tests; expected missing registry/journal/recovery behavior, no silent service skip. +- [x] **3. Implement** sequential progress reporting and atomic journal writes. Full DB count5000,3reps, rotated methods; pipeline controls exactly spec (baseline10s,2s warm-up,30s drain,50ms target polling); CI smoke uses small counts/windows but3reps. Recovery: DB down at3s/up at8s of15s500/s; consumer kill at3s/restart at5s in same workload; outbox100events with broker down8s then restored. Clean with fresh bounded context, restoring stopped services before collecting evidence/destroying only owned resources. Public summaries JSON/CSV remain readable; large samples use gzip mtime0 and SHA256. Retain limited/inconclusive cases with reasons; correctness failures exit nonzero. No external DB/host flags in study CLI. +- [x] **4. Verify** registry/journal/artifact unit tests, race suite, full integration including new study smoke and all three recovery cases. Document full versus smoke commands and resume behavior. Commit the entire harness before measurements. +- [x] **5. Commit:** feat: run reproducible self-hosted ingestion studies and recovery experiments. + +### Task 8: Execute and audit corrected experimental evidence + +**Files:** Add bounded captures under benchmarks/results/selfhost-2026-11-04/ with index, manifests, raw artifacts, checksums and methodology; update results links only after validation. + +**Interfaces:** Execute the committed full25-case study sequentially; preserve its clean source SHA and every3-repetition outcome. Figure inputs are the study index plus case summaries, not a hardcoded old capture directory. + +- [x] **1. Run** an untimed feasibility/smoke check of the committed harness, then the full study with progress redirected to a readable log and bounded tool waits. Do not run unrelated load/tests concurrently. If a concrete environment limit needs changed timing, ledger it and apply it consistently to matched controls; never silently drop a case. +- [x] **2. Audit** all25 cases,3reps, correct method counts, timing populations, exact ID/content outcomes, actual fsync/settings/HTTPS route and no secret material. Recompute summaries/percentiles/checksums independently. Show target-vs-generated load and limits. Keep failed cases and investigate genuine correctness failures rather than deleting them. +- [x] **3. Evaluate** the DB crossover honestly. Do not advertise COPY as faster where it loses. Default-writer changes require a concrete separately recorded decision, equivalent failure tests, and rerunning affected pipeline captures from the resulting committed code; no guessed adaptive threshold. +- [x] **4. Verify** study artifacts against raw samples and manifest schema; integration/measurement code remains tested. No headline capacity, cost, public-TLS issuance or production-adoption claims. Old development-mode captures remain historical. +- [x] **5. Commit:** bench: record corrected self-hosted ingestion experiments. + +### Task 9: Readable code-backed diagrams and evidence figures + +**Files:** Add figure sources under docs/figures/, generated deployment.svg, delivery.svg, database-batching.svg, pipeline-load.svg and recovery.svg under docs/assets/; refactor benchmarks/plot_results.py to consume the study index and write reproducible SVG/PNG. Keep Archify candidate/HTML evidence in ignored artifact folders unless a small source is needed for reproduction. + +**Interfaces:** Scientific plots derive all values from Task8 captures; diagrams cite committed source using the inspected revision. Archify produces checked architecture/sequence artifacts and static SVG exports; no imagegen for data charts or code-native diagrams. + +- [x] **1. Verify inputs** and choose one coherent typography/color system. Deployment figure shows actual trust/port boundaries; sequence distinguishes broker ACK, DB commit, offset and replay; charts answer the batch/load/recovery questions with controls, units and all repetition variation. +- [x] **2. Generate** using matplotlib and the Archify skill's native authoring/export workflow. No invented data, smoothing that implies unmeasured points, decorative services or claims from invalid cases. Caption every omitted/limited population. Include standalone readable provenance/caveats where image reuse would otherwise mislead. +- [x] **3. Inspect** images at normal README width, a narrow viewport and light/dark backgrounds; inspect rendered Markdown too. Text remains readable with no cropped legends/arrows/labels. Repair visuals, not the underlying measurements. Keep exact data/control links beside each figure. +- [x] **4. Verify** deterministic regeneration, SVG validity and relevant artifact/browser gates. Editorial/generated-asset work earns visual/data checks rather than source-text unit tests. +- [x] **5. Commit:** docs: illustrate deployment integration and ingestion tradeoffs clearly. + +### Task 10: Reader documentation, article and final branch review + +**Files:** Rewrite README.md, docs/{architecture,delivery,development,integration,api,operations,article}.md, deploy/README.md, examples docs, benchmarks guide and publication/resume drafts; update plan/spec verification notes. + +**Interfaces:** README leads deploy→send→verify→operate, with concise limitations and links. Article connects deployable use, application/outbox integration and actual measured tradeoffs; all numbers point to clean revisions/captures. No publishing performed. + +- [x] **1. Inventory** every public command, local link and numeric/delivery claim against existing executable tests/source/results. Consolidate repeated setup; keep planning records off onboarding. Explain operator prerequisites and actual measured resource observations without inventing host sizing guarantees. +- [x] **2. Rewrite** the article and integration/operations narrative from final evidence. Show practical configuration and imports, screenshots/figures only when actually captured, and why each recovery result matters. Publication/HN/resume material remains a local draft with no adoption or popularity claims. +- [x] **3. Exercise** fresh owned deployment startup, trusted TLS, first event/SQL, clients/outbox, key refresh, backup/restore and stops using the documented commands. Check maintained Markdown links and rendered figures/article. Run Go race/vet/all builds, Python/Node tests, full integration, study-smoke validation, artifact audit and git diff --check. +- [x] **4. Commit** docs: document self-hosted ingestion and measured operating behavior. Complete task ledger, then request the one fresh whole-branch review required by native execution with the spec/plan/rulings and Review Focus above. Re-grade findings; fix Important/Critical in one RED→GREEN pass and rerun the affected and full regression gates. Record deferred minors/rulings; no re-review. +- [ ] **5. Finish** through the branch-finishing skill with actual evidence. Preserve user data and this checkout; do not infer authorization for real infrastructure or publication. Remove only this plan's completed scratch workspace after retaining its decisions/results for final reporting. + +## Plan self-review + +One dependency chain rather than independent projects: safe config→deployment→operator/integration→outbox→valid HTTPS measurement→25-case evidence→figures/article. Existing fsync correction already meets the prerequisite. Shared interfaces are named above. All five Review Focus classes have specific real behavioral tests. Reader docs and CI accompany their functional tasks; final writing uses only performed measurements. No important approved requirement is intentionally omitted. diff --git a/docs/superpowers/publication/2026-11-03-launch-drafts.md b/docs/superpowers/publication/2026-11-03-launch-drafts.md index 9055116..5a22943 100644 --- a/docs/superpowers/publication/2026-11-03-launch-drafts.md +++ b/docs/superpowers/publication/2026-11-03-launch-drafts.md @@ -1,39 +1,78 @@ -# Publication drafts — prepare only +# Publication drafts — updated 4 November 2026 -These drafts are unpublished. Replace the article URL after choosing a home for it. Review the first-person voice and add only personal context that actually happened. +These are local drafts. No article, repository release or social submission has +been published by this work. Check that the reviewed branch and referenced source +commits are available publicly before using these links. Add personal context only +if it happened; do not invent adoption, company impact or popularity. -## Primary article +## Article -Title: Building an event pipeline in Go—and testing what survives a crash +Title: Building an event collector around the failure boundaries -Alternate, focused on the measured surprise: COPY wasn't the fastest part of my Go event pipeline +Alternative: What HTTP 202 means in a self-hosted event pipeline -Source: [article](../../article.md). Publish the full article on the author's blog first if a suitable home exists. An optional DEV cross-post can point its canonical URL there; see [DEV's editor/cross-posting instructions](https://dev.to/help/writing-editing-scheduling). Convert repository-relative code/results links to absolute links at the measured revision before posting. Confirm the branch and referenced commits have been pushed so readers can resolve them. Keep the complete sample ranges and environment caveats. +Source: [publication-ready Markdown draft](../../article.md). Choose the author's +canonical blog home, replace relative code/results/image links with public URLs, +and preview the responsive figures on that platform. Keep the measured revision, +three-repetition ranges, unknown deliveries and shared-host caveats beside claims. +If cross-posting, retain one canonical article URL rather than splitting the story +across competing copies. No hosting destination is selected or created here. -## Regular Hacker News submission +The concrete hook: a deployable collector plus an application outbox, two separate +crash windows, and evidence that changed the default from COPY/staging/merge to +batch INSERT. The value is being able to run, break and inspect it. -Title: Building a Go event pipeline and testing the database-commit crash window +## Regular Hacker News article submission + +Title: Building an event collector and testing its failure boundaries URL: the final public article URL. -Optional author comment: I built a small HTTP → Redpanda → PostgreSQL collector to make acknowledgement and replay behavior inspectable. The repo includes real dependency-outage tests and a deterministic kill between database and offset commits. One result surprised me: with batches of 100, ordinary batch INSERT beat COPY/staging/merge. The local load runs reconcile every ID, but they are not a maximum-capacity result. I'm interested in feedback on the failure boundaries and benchmark method. +Optional author comment: + +> I built a small Go/Redpanda/PostgreSQL event collector with a self-contained +> HTTPS deployment and a runnable transactional-outbox example. The repo tests +> crashes after SQL commit and after HTTP acknowledgement, then reconciles the +> same event IDs. A corrected 25-case study favored batch INSERT over my COPY/merge +> path by median, so I changed the default and reran it. All repetitions and limits +> remain in the captures, including ambiguous deliveries; these are local results, +> not maximum-capacity claims. I'd welcome feedback on the failure model and method. -Do not call an article submission Show HN. [HN's guidelines](https://news.ycombinator.com/showhn.html) distinguish reading material from something people can try. +A blog post belongs in a regular submission. The [Show HN guidelines](https://news.ycombinator.com/showhn.html) +reserve Show HN for something people can try, rather than reading material. ## Potential separate Show HN -Title: Show HN: IngestKit – break an event pipeline and reconcile what survived +Title: Show HN: IngestKit – a self-hosted event collector with crash/replay tests -URL: the public repository once this branch is available. +URL: the public repository after this branch is made available. -Description: A small Go collector with an isolated checkout demo and a database-outage demo. Run make demo-recovery to acknowledge events while PostgreSQL is stopped, restore it, and compare the same IDs. The integration suite also kills the consumer after database commit but before offset commit. Plain Python and Node callers demonstrate reuse. Requires local Docker and Go; no hosted account or generated SDK. +Description draft: -Use only when the runnable project is publicly accessible. Do not coordinate votes or promise popularity. The article and runnable project serve different submissions; avoid duplicative promotion. +> Deploy a small HTTPS event collector with Docker Compose, send stable UUIDs from +> Python or Node, and inspect PostgreSQL storage. The application outbox persists +> orders and pending events atomically and replays the same IDs after a dispatcher +> crash. Local demos and real-service tests stop dependencies and check accepted +> IDs, stored content and source progress. Deployment builds Go inside Docker; +> owned local demos/studies require Go. It is one host with finite retention, not HA. + +Use only when readers can actually access and run the reviewed code. Prefer one +focused submission at a time; this file does not authorize posting, messaging, +vote coordination or account/hosting setup. ## Resume / project description -Built a Go event collector using Redpanda and PostgreSQL, with broker-acknowledged HTTP ingestion, tenant-scoped idempotent storage, bounded retries and acknowledged quarantine. Verified replay using a deterministic crash between database and offset commits and automated dependency-outage/rebalance tests. Recorded reproducible local database and pipeline experiments with exact ID reconciliation, raw samples and environment manifests. +Built a self-hosted Go event collector with HTTPS, Redpanda buffering and +PostgreSQL storage; supplied copyable Python/Node clients and a transactional +outbox. Verified tenant-scoped deduplication and crash replay with real dependency +outages, restricted-role/restore tests and a reproducible 25-configuration study. +Changed the default SQL writer based on measured batch/payload/duplicate results. + +Short bullet: -Resume bullet: Built and failure-tested a Go/Redpanda/PostgreSQL event pipeline; verified database-commit replay and tenant-scoped deduplication, and recorded reproducible local ingestion experiments with raw correctness evidence. +Built and failure-tested a self-hosted Go/Redpanda/PostgreSQL collector with HTTPS, +durable application outbox and replay-safe storage; recorded 25 reproducible +experiment configurations with raw samples, ID reconciliation and explicit limits. -Do not add claims about production adoption, business impact, cloud cost, maximum throughput or popularity without new evidence. +No claim of production adoption, business impact, cloud cost, maximum throughput +or popularity is supported by the local repository evidence. diff --git a/docs/superpowers/reviews/2026-11-04-self-hosted-ingestion.md b/docs/superpowers/reviews/2026-11-04-self-hosted-ingestion.md new file mode 100644 index 0000000..9dbe86e --- /dev/null +++ b/docs/superpowers/reviews/2026-11-04-self-hosted-ingestion.md @@ -0,0 +1,69 @@ +# Self-hosted ingestion: verification and review + +Implemented on `feat/self-hosted-ingestion` from base `698d7b8`. + +## Verification + +- Documentation/runtime head before review: `9252894`. +- Go race suite, vet and builds passed. +- Python client 11, Node client 7, outbox 5 and independent auditor 6 tests passed. +- Before-review real Docker integration: 31 top-level checks passed in 585.069 seconds, including trusted HTTPS, private ports, writer privileges, denied-write readiness, restart preservation, credential refresh, fresh-target backup restore, caller modes, outbox after-ACK crash, study smoke/resume/interruption and three recovery scenarios with three repetitions. +- Both complete 25-case studies independently audited: each 99 database rows, 33 pipeline windows, 9 recovery repetitions; all 9 limited cases retained. +- Fresh documented deploy→send→SQL→client→outbox→volume-preserving stop walkthrough passed against an owned trusted-CA deployment. Public ACME/DNS was not exercised. +- 20 maintained Markdown files / 146 local links and images checked; actual desktop/mobile article and figures inspected. Chart exports regenerate byte-identically; asset hashes in `docs/figures/verification.json`. + +## Fresh review and fix + +A read-only fresh-context review used gpt-6-astra with high reasoning effort over `698d7b8..9252894`, after all ten task completion gates. It inspected the runtime, harness, deployment/operations, clients/outbox, studies, figure sources and every ruling, independently reran both study audits and inspected the full integration evidence. No competing Docker or full timing study was run. + +The reviewer found no Critical issue and one Important issue: Python DNS resolution and sequential address/TLS setup could exceed the claimed per-attempt timeout. Its delayed DNS probe took 0.31s with a 0.03s configured timeout. + +Accepted and fixed in `802ce89`: a monotonic attempt deadline spans DNS, all address connection attempts, TLS and HTTP. At most eight DNS-only daemon workers may outlive a timeout; they hold no event/key data and cannot initiate a connection or POST. Socket failures close the failed connection, TLS keeps original-host verification/SNI, retries retain the original serialized body. + +Three regressions failed first: delayed DNS 0.319s, repeated address timeouts 0.192s and blocked DNS work 2.515s. All 11 Python tests then passed, along with Node 7/outbox 5/auditor 6 and Go race/vet/build. The full post-fix Docker integration passed all 31 checks in **570.789 seconds** on `802ce89`, including all three recovery scenarios with three repetitions. No re-review was dispatched, following the approved native one-fix-pass workflow. + +## Rulings I made + +1. Treat the user's go-ahead as approval to implement the already reviewed design and its concrete native plan — asking again would repeat an approval already supplied — detailed implementation choices receive regression tests and the final fresh review instead of another planning gate. Cost if wrong: reviewable implementation could exceed the intended planning scope; no public side effect is authorized. + +2. Reuse the existing ignored Git worktree — the app's native creation tool previously returned Not a git repository for this clone, so the established Git fallback is already isolated — the app does not manage this worktree; use its explicit path and preserve it for review. Cost if wrong: app lifecycle integration/bookkeeping is missing; the primary main checkout remains untouched. + +3. Pull the observer-clock correction forward from benchmark validity work — the full gate found negative host-minus-API timestamps, and an owned 20-query probe proved the deployment VM was about53.7ms ahead of host after each SQL response. Receipt and SQL observation now use the same deployment VM clock, while host monotonic timing retains scheduling/backlog duties. Query clock_timestamp after reading committed rows, include probe delay in the documented upper bound, and carry StoredObservation.ObservedAt into Task6's observer. Cost if wrong: same-clock assumptions would still be invalid with API/database on different hosts; the supported study/deployment is one host, and negatives still fail rather than clamp. Raw historical captures remain unchanged. + +4. Include the final independent ID/content query and observer disposal in the reported observation drain/total duration — the final census can discover a late ambiguous row, so using that row with an earlier denominator would overstate storage rate. Record VerificationNS and ObservedEvents separately; latency quantiles include only actual pending-observer samples. Cost if wrong: rates conservatively include benchmark verification overhead and are not intrinsic service capacity; captions and methodology state this, and old raw captures remain unchanged. + +5. During the deliberate PostgreSQL outage only, rebuild the observer's connection-owned pending relation from IDs not already observed after reconnecting — stopping PostgreSQL also destroys the observer session, so treating that expected gap as permanent would prevent the availability experiment from measuring recovery. Record unavailable observations and limits; retain strict final independent ID/content verification. Cost if wrong: visibility during the gap cannot establish a precise commit time, and the availability report must show the gap rather than imply continuous observation or capacity. + +6. Compare canonical image content layers plus full runtime configuration while excluding only the proven per-project Compose label; retain exact opaque image IDs in each immutable manifest — fresh owned projects necessarily receive different labels, so equality of opaque IDs alone cannot support resume. Cost if wrong: software that interprets that label as behavior would require it as a control; these runtime services do not read Docker labels, and all other configuration/content remains fingerprinted. + +7. Switch the deployed EventStore to one atomic multi-row INSERT with ON CONFLICT while preserving the explicit COPY/staging reference in the benchmark — batch INSERT had the lower median elapsed time in all11 corrected DB configurations, so retaining COPY as an assumed optimization would contradict the measured evidence and require unnecessary TEMP privileges. Preserve the entire first25-case study, test atomic failure/replay/restricted-role behavior, and run a new complete25-case study from clean final code. Cost if wrong: unmeasured hosts/workloads may favor COPY; this result is local, the comparison remains runnable, and no adaptive/universal cutoff is claimed. + +8. Keep the fully checked Archify sequence for desktop/detail and add small source-cited typographic SVG reading guides for narrow screens — the full five-participant export shrinks text at390px, and Archify's trial one-column workflow still exports786px wide. The guides are labelled companions, preserves ACK/SQL/offset distinctions and explicitly states concurrent HTTP/consumer timing; it is not presented as a second exact packet trace. Cost if wrong: the simplified guide can omit detailed interactions, so the full sequence/source remains linked and all facts cite the committed runtime. The compact deployment guide preserves the same trust and port boundaries. Main deployment/sequence continue through native Archify export; no data plots are hand-drawn. + +9. Apply the same decoded-duplicate-key rejection to server startup and the local deployment reader via a shared parser — source inspection after the walkthrough found that standard JSON map unmarshalling silently selected the last tenant for duplicate API keys, while tooling rejected them. Existing valid and overlapping maps retain their behavior; duplicate/escaped duplicate tests failed first, then pass, with credential-safe errors. Cost if wrong: an operator relying on ambiguous last-value-wins configuration must correct it before startup. Published measurements remain pinned to213e4cc's valid generated configuration; this invalid-config hardening does not retroactively remeasure them. + +10. HA, host/disk loss and beyond-retention recovery remain outside supported guarantees — one host/replica and finite retention are explicit in deployment/delivery/article, so these are stated limits rather than hidden recovery promises. Cost if wrong: operators expecting redundancy could lose events after the documented failure boundary. + +11. Multiple concurrent outbox dispatchers require an application-specific claim/lease protocol — this reference explicitly supports one dispatcher and does not promise coordination. Cost if wrong: parallel dispatch can send redundant requests or race local status updates. + +12. Public DNS/ACME issuance and external deployment remain unperformed — trusted private-CA tests exercise the actual route without claiming external reachability or authorizing infrastructure changes. Cost if wrong: an operator still has to diagnose real DNS/firewall/certificate setup. + +13. Cross-host receipt/observation timing remains unsupported — API and database clocks share the measured deployment VM; captions describe observed upper bounds and make no distributed-clock claim. Cost if wrong: copying the benchmark to multiple hosts without clock analysis can invalidate visibility durations. + +14. Uncatchable process/host kills can require manual owned-project inspection and cleanup — graceful interruption is tested, while SIGKILL/power loss cannot run a cleanup handler. Cost if wrong: orphan test resources may keep consuming disk or memory until inspected. + +15. Universal performance/isolated-host capacity remains unclaimed — both studies retain actual source/runtime controls, repetitions, shared-host caveats, limited generation and unknown IDs. Cost if wrong: a reader extrapolating these local samples could choose inadequate resources. + +16. Keep the native-generated SVG export bytes and their provenance/hash checks intact — normalization after native export changes the checked artifact without improving diagram behavior; the cosmetic whitespace observation is separately recorded as deferred Minor. Cost if wrong: a whole-branch whitespace style gate remains noisy for these generated files. + +## Deferred minors + +- Native deployment.svg/delivery.svg include exporter-generated trailing whitespace; rendered output and deterministic native export checks pass, but git diff --check 698d7b8..HEAD reports those historical added lines. + +## Evidence boundaries and integration state + +The two measured studies remain byte-identical at their cited source revisions. Later configuration validation and Python deadline hardening have regression evidence; they are not new performance captures. No maximum-capacity, replication or public-ACME verification claim is added. + +The final whole-branch whitespace check reports 83 native-export whitespace lines in `docs/assets/deployment.svg` and `docs/assets/delivery.svg`; ordinary working-tree whitespace checks pass. This is the sole deferred Minor. + +Implementation was verified and committed on `feat/self-hosted-ingestion` before any push or merge. The user subsequently authorized pushing the branch, opening a pull request and merging after checks. Integration is tracked by the pull request and Git history. Public deployment and article publication remain separate. The existing worktree and private owned-run evidence were preserved; only this plan's completed temporary Superpowers workspace was removed after retaining this record. diff --git a/docs/superpowers/specs/2026-11-03-self-hosted-ingestion-design.md b/docs/superpowers/specs/2026-11-03-self-hosted-ingestion-design.md new file mode 100644 index 0000000..2e2b66b --- /dev/null +++ b/docs/superpowers/specs/2026-11-03-self-hosted-ingestion-design.md @@ -0,0 +1,308 @@ +# Self-hosted IngestKit: deployment, integration and experimental evidence + +Status: approved 4 November 2026. Native execution remains the user's chosen method. +This extends the completed showcase rather than replacing the collector again. + +## Intent and user decisions + +A reader should be able to deploy IngestKit, send application events to it, verify +storage and understand how to operate it when dependencies fail. The repository +and article should demonstrate those capabilities clearly enough for professional +review and technical readers. Reuse and deployability are now primary outcomes. + +The user chose a self-contained Docker Compose server containing PostgreSQL and +Redpanda. They asked for better documentation and images, substantially more +experiments, and examples showing actual application integration. + +Builder proposals, not additional user decisions: start with a single Linux host, +Caddy for public HTTPS, copyable Python/Node HTTP helpers, and one Python/SQLite +transactional-outbox example. Run experiments locally on owned resources before +considering an external server. Keep the Go ingestion runtime and HTTP contract. + +## Approaches considered + +1. **Self-contained Compose deployment — chosen.** One documented deployment + contains the gateway, API, consumer, broker and database. Lowest setup burden; + the operator still owns disks, secrets, upgrades, backups and a single-host + failure domain. +2. **Application containers with existing database/broker.** Fits organizations + that already operate PostgreSQL and Kafka-compatible infrastructure. More + credentials, networking, version and retention choices. Keep runtime connection + configuration compatible, but a supported managed-services matrix is later work. + +A hosted SaaS, Kubernetes distribution, generated SDKs and a dashboard would add +independent products and are outside this iteration. + +## Current findings and immediate correction + +The current root Compose is a development environment with loopback ports, +local credentials and Redpanda's dev-container mode. It is not the deployment +package this user now wants. The examples are fixture-sending scripts, not an +application integration. Benchmark documentation still contains a stale sentence +saying evidence will be added; plotting is hardcoded to one historical directory. + +A concrete durability error was found during this audit. The pinned Redpanda +v26.2.6 image's real process arguments include --unsafe-bypass-fsync=true when +started with dev-container mode. Setting topic write.caching=false did not remove +this process-level bypass. A network-isolated disposable probe confirmed that +--unsafe-bypass-fsync=false produces an actual false broker argument. + +Correct this already-approved durability contract first, with a failing real +runtime regression. Record the effective bypass state in future manifests. +Preserve historical raw captures, clearly label their pipeline measurements as +development-mode results, and withdraw any implication that they establish +fsync-enabled broker throughput. PostgreSQL-only comparison samples retain their +recorded database settings; they are not replacement pipeline evidence. New +headlines require new measurements of the corrected code and configuration. + +## Goals and completion boundaries + +- A versioned Compose deployment starts from a fresh checkout using Docker, + Compose, Git and the documented local secret-generation utility; Go is built + inside Docker and is not a prerequisite on the deployment host. +- Only the HTTPS gateway is public. Database, Kafka, admin and metrics interfaces + are private. Tests verify published ports, not only YAML text. +- First-use commands create configuration, start services, send one event and + verify its UUID in PostgreSQL. Missing/placeholder configuration fails clearly. +- The integration helpers can be imported into application code, and the outbox + example demonstrates business-state persistence, ambiguous delivery and retry. +- Experiments answer named questions with controls, at least three measured + repetitions, raw evidence and correct ID reconciliation. +- Figures explain deployment, acknowledgement/replay and the measured results at + normal README/article width. Every graph is generated from its cited data. +- The article is rewritten from the new evidence and the root README leads with + use, deployment and integration. No inflated capacity/cost/adoption claims. + +Non-goals: automatic remote provisioning, paid infrastructure, public DNS/domain +changes, package/registry publication, HA, multi-region operation, browser-visible +secret API keys, business schemas, automatic legacy-data import or broad connector +support. A single host is an explicit first deployment target, not a resilience +claim. No existing databases, volumes, releases or Git history are destroyed. + +## Deployment package and operations + +Keep the root development stack distinct. Add a deployment directory with one +canonical Compose configuration, gateway configuration, non-secret environment +template and a small noninteractive configuration script. The script accepts the +operator's hostname, generates fresh secrets into a mode-0600 ignored file, and +refuses to overwrite existing configuration. It does not install host software, +change the firewall, contact a server or print secrets into routine logs. + +Use verified pinned image versions. The deployed broker must not enable fsync +bypass; topic write caching is disabled and PostgreSQL fsync/synchronous_commit +remain enabled. Inspect actual broker arguments and settings in a preflight and +integration check. Avoid inheriting other development-only behavior implicitly. +Document and test the Linux/container resource prerequisites without privileged +host-tuning scripts or invented minimum-resource/capacity claims. + +Caddy fronts the ingestion routes and an intentionally chosen health route. +Public access to metrics, database and Kafka/admin ports is not configured. A +public hostname and reachable 80/443 are operator prerequisites for public ACME. +Local/CI tests use an explicit private test CA, verify certificates with that CA, +and exercise the same routing; they do not disable TLS verification or claim to +have tested real public DNS/certificate issuance. + +Separate database migration/admin credentials from the consumer's limited writer +role. Grant the actual store's required TEMP/schema/table privileges and no +superuser access to the consumer. Initialization and grants are idempotent; +restarts preserve data. Ordinary configuration refresh recreates affected +services with new environment, rather than relying on restart to reload it. + +Provide operator recipes for status, safe logs, accepted-but-pending events, +credential overlap/rotation, retention/disk growth, application upgrade and +volume-preserving stop. Add bounded structured consumer error diagnostics with +operation, safe error classification and source coordinates; no API keys, +payloads or credentialled DSNs. Keep readiness distinct from connectivity. + +Provide a PostgreSQL backup/restore recipe and verify restore in a separate +owned stack. Document that restoring an older database with newer committed +broker offsets requires deliberate replay from retained data, while deduplication +handles repeats. Retention expiry or loss of the only broker disk can prevent +full recovery. Do not automate destructive offset resets or unsafe database +rollback on an operator's running deployment. + +## Application integration + +Publish a concise API reference with exact request/response/error examples, +limits, tenant mapping, stable IDs and the distinction between broker acceptance +and PostgreSQL storage. Secrets stay in trusted server-side configuration. +Browser applications call their own backend; this iteration does not introduce +public browser credentials or a new browser collector. + +Refactor the existing Python/Node examples into small importable standard-HTTP +helpers plus their existing command-line walkthroughs. Callers provide the URL, +key and stable event IDs. Support single/batch requests, bounded timeouts, +retryable versus permanent failures, matching acknowledgement IDs and byte-stable +ambiguous retries. Return useful sanitized outcomes instead of silently dropping +failures. Keep these copyable reference modules, not new registry SDK releases. + +Add one runnable order/outbox example using Python's standard SQLite support. +Creating an order and an outbox row is one local database transaction. Persist +the event UUID and serialized body before attempting HTTP. The dispatcher marks +broker acknowledgement only after matching 202 IDs, retains retryable/ambiguous +work across process restarts, and keeps permanent rejection visible for repair. +A 202 must never be labelled database-persisted. Document the example's single- +dispatcher scope and map its SQL pattern onto a reader's own application database. + +Exercise the full example against the owned collector: normal delivery, broker +unavailability, dispatcher restart with pending events, stable-ID replay, and +one stored event per ID. Show the final SQL query and application/outbox state. + +## Experimental design + +The study runner owns one isolated stack at a time and has an explicit case +registry, progress journal and bounded cleanup. Standard cases use the corrected +broker settings and, once available, the deployment profile/gateway rather than +silently presenting direct-local-HTTP measurements as HTTPS deployment results. +Capture the route, effective settings, image digests, source SHA, host/VM resources, +seed, payload profile and all case controls. Preserve failures and interrupted +cases. A resumable study must reject mismatched source/configuration and never +reuse another run's data. Runs remain sequential for timing comparisons. + +Do not run a full Cartesian product. Begin with these 25 deliberate configurations +and a small CI smoke subset. Each full configuration has warm-up and at least +three measured repetitions. Builder may settle safe durations after an untimed +feasibility check, but cannot silently drop cases or change a control when +comparing their results. + +### Database: 11 configurations + +Use 5,000 submissions per method/repetition. All three methods retain the same +schema, indexes, durability, first-content conflict policy and natural transaction +boundaries, with rotated method order. Generation, reset and verification stay +outside the timer. + +| Question | Variable | Other controls | +| --- | --- | --- | +| Where does batching/COPY pay off? | batch 1, 10, 50, 100, 500, 1000 (6 cases) | 256-byte payload, 0% duplicates | +| What changes with larger payloads? | 1 KiB and 16 KiB (2 additional cases) | batch100, 0% duplicates; 256B baseline above | +| What does duplicate-heavy work cost? | 10%, 50%, 90% duplicate submissions (3 additional cases) | batch100, 256B; 0% baseline above | + +Distinguish submitted/s from inserted unique/s. Duplicate cases perform fewer new +writes, so their elapsed ratios do not isolate a pure deduplication-overhead +percentage. Compare repetitions and report their variation. + +### Pipeline: 11 configurations + +Baseline: 256-byte payload, 1,000 offered events/s, HTTP batch100, concurrency32, +a ten-second window, two-second warm-up and a bounded post-window drain. + +| Question | Variable | Additional cases | +| --- | --- | ---: | +| HTTP batching | batch1, 10, 100 | 3 including baseline | +| Offered load and observed limits | 100, 5,000, 10,000 events/s | 3 | +| Payload pressure | 1 KiB, 16 KiB, using batch10 | 2 | +| Burst versus steady | baseline count offered in first quarter of window | 1 | +| Client concurrency | 8 and 64 workers with batch1 at1,000/s | 2 | + +For the payload sweep, use HTTP batch10 for both larger payloads and compare +against the 256B/batch10 case already in the batching sweep. This keeps the +request under 1 MiB and holds batch size constant; do not raise the API limit. +This is a builder decision resolving the fresh design check. + +Actual generated/attempted load, queue misses, request failures and client limits +remain visible. A missed target is an observed limit, not proof of collector +capacity. Report HTTP ACK latency separately from committed-row visibility, +including p50/p95/p99, sample populations, complete timing intervals and drain. + +Before increasing load, replace repeated full-ID-array polling with a connection- +owned incremental observer, such as a temporary pending-ID relation. A target +row only becomes observed after a completed query sees it committed. Receipt or +insertion timestamps alone are unsafe cursors: tests must cover transactions +committing out of order. Capture query duration, late polls and generator/resource +limits. Final reconciliation is independent of the observation bookkeeping. + +Use deterministic varied payload contents for the new size study and record the +profile; historical repeated-x padding compresses unusually well. Exact byte +sizes, IDs and duplicate copies remain reproducible. Preserve per-request/event +samples in bounded raw captures; summary CSV/JSON is directly readable, while +large raw samples may be deterministically gzip-compressed with checksums. + +### Recovery: three separate experiments + +1. PostgreSQL stopped for five seconds during a fifteen-second 500-events/s run: + acknowledgement, backlog and recovery/drain timeline. +2. Consumer forcibly restarted during that workload: pending IDs, group recovery + and final reconciliation. This does not pretend every arbitrary kill lands + inside the database/offset commit window; retain the deterministic crash test. +3. Broker unavailable long enough to exceed publish timeout while the application + outbox retains 100 events: failed/ambiguous attempts, dispatcher restart, + broker restoration and stable-ID replay to one stored row per event. + +Recovery timelines have recorded fault/restoration times. They are availability +experiments, not headline throughput measurements. Count ambiguous/late deliveries +explicitly and never turn an accepted-but-missing event into a successful speed +result. Expected rejection/backpressure does not erase correctness failures. + +## Documentation and visual presentation + +Root README: short use case, topology figure, self-host quick start, first event, +links to application integration, measured results and operations. Keep technical +contracts in focused guides. Remove stale future-tense evidence text and repeated +setup instructions; retain historical planning and raw captures off onboarding. + +Provide readable SVGs with optional PNG fallbacks: deployment/trust boundaries, +acknowledgement/commit/replay sequence, database batch crossover, pipeline latency +versus actual load, and recovery backlog timeline. Diagrams are code-backed; +charts are generated from the new study index, not hardcoded historical paths. +Use one typography/color system, direct labels and short captions. At normal +README width the labels must remain readable; test light/dark and narrow layouts. +Visual quality requires inspection, not merely a successful SVG export. No fake +screenshots, fabricated chart values or decorative architecture components. + +Restructure the article around deploying/integrating the collector, the measured +tradeoffs and failure evidence. Explain which runtime/storage choices the new +results support and which remain provisional. Do not retain COPY for a performance +story if broader evidence contradicts it; a default-storage change, if justified, +needs a separate concrete decision with equivalent failure/duplicate tests. + +## Verification and delivery + +Run regression tests for changed behavior, real HTTPS deployment smoke, port and +role checks, first event/duplicate/restart preservation, outbox recovery, backup +restore and a small study correctness subset in CI. Keep full timing studies out +of ordinary CI. Native execution uses small verified commits and one fresh whole- +branch review, preserving the user's earlier execution choice. + +Complete the corrected-contract commit before the expanded measurements. Commit +new harness code before measuring, pin results to that clean revision and publish +only values independently recomputed from raw samples. Every documented command +and local link must work from the new checkout. No actual cloud deployment, +package publication or social/article posting is authorized by this proposal. + + +## Design check and research + +A fresh builder check identified that 100 ×16 KiB exceeds the current 1 MiB +request limit before envelope overhead. The revised payload sweep uses batch10 +and its already-present 256B/batch10 control. This resolves the question without +changing the HTTP contract or confusing successful ingestion with rejection. +The remaining implementation choices are explicitly delegated above. + +Primary references used for the deployment/operator-guide design: + +- [Docker Compose in production](https://docs.docker.com/compose/how-tos/production/) +- [Caddy automatic HTTPS](https://caddyserver.com/docs/automatic-https) +- [Plausible Community Edition self-hosting guide](https://github.com/plausible/community-edition) +- [Redpanda startup mode flags](https://docs.redpanda.com/streaming/current/reference/rpk/rpk-redpanda/rpk-redpanda-start/) + +The fsync finding was also reproduced against the pinned v26.2.6 container, +rather than inferred from current documentation alone. Both temporary audit +containers had networking disabled, no host ports or volumes, and were removed. +The corrective runtime regression failed with true and passed with false; the +full corrected integration/recovery suite passed in114.569s. This immediate +contract correction is separate from approval of the expanded design. + +## Implementation evidence + +Native execution produced the canonical deployment, operator procedures, clients +and outbox, and the registered studies. The [final writer capture](../../../benchmarks/results/selfhost-2026-11-04/README.md) +pins clean runtime revision213e4cc; the complete earlier COPY-writer study remains +separate. The measured comparison led to atomic batch INSERT with no TEMP +privilege; its original COPY transaction remains an explicit benchmark reference. +[Figure sources and verification](../../figures/README.md) retain provenance and +responsive layouts. Final regression and fresh whole-branch review are complete; +the one important Python deadline finding was reproduced, fixed and verified by +the full suite. The [verification and review record](../reviews/2026-11-04-self-hosted-ingestion.md) +preserves all rulings, costs and the deferred cosmetic issue. No public deployment or +publication is part of this implementation. diff --git a/examples/README.md b/examples/README.md index 9d6e994..dcae4a3 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,3 +1,15 @@ -# Examples +# Application examples -The [checkout scenario](checkout/) uses ordinary HTTP envelopes. No generated client or event-specific storage is required. +- [Checkout](checkout/README.md): copyable Python/Node HTTP clients, single/batch + fixture CLIs, explicit CA trust and bounded stable-ID retries. +- [Transactional outbox](outbox/README.md): atomically store a business order and + serialized event, then dispatch safely across process restarts. +- [Backend integration guide](../docs/integration.md): import and use the clients + from application code. +- [HTTP contract](../docs/api.md): limits, responses, retries and persistence checks. + +Start with the [self-hosted deployment](../deploy/README.md); the application +examples do not require Go or a package registry SDK. + +A 202 acknowledges the broker. Verify storage separately when your workflow +requires it. Keep API keys in your backend and retain event IDs across restarts. diff --git a/examples/checkout/README.md b/examples/checkout/README.md index 8d3129a..bd8e54c 100644 --- a/examples/checkout/README.md +++ b/examples/checkout/README.md @@ -3,34 +3,49 @@ Three ordinary envelopes describe a product view, checkout start and completed order. The fixed UUIDs make retry/deduplication easy to observe. +For a deployed collector, follow the [server setup](../../deploy/README.md), load +its backend key and set the URL: + ~~~sh -make demo -make demo-recovery +export API_URL=https://events.example.com +export INGESTKIT_API_KEY +python3 examples/checkout/send.py +SEND_MODE=single node examples/checkout/send.mjs ~~~ -Each command starts an isolated stack, prints acknowledgements and stored IDs, -reconciles them, saves evidence, and stops with volumes preserved. -Use DEMO_FLAGS=-cleanup to remove only the run's resources after collecting evidence. +These read `events.json` and retain its IDs on retry. Running both repeatedly +still stores three logical events for that tenant. Use fresh explicit UUIDs for +new business events. Both default to the batch endpoint; `SEND_MODE=single` sends +individual requests and `EVENTS_FILE=/path/to/events.json` selects your own +`{ "events": [...] }` fixture. A 202 acknowledges the broker, not PostgreSQL. -With make up running, use either caller without installing dependencies: +For an isolated local walkthrough with Docker and Go: ~~~sh -python3 examples/checkout/send.py -node examples/checkout/send.mjs +make demo DEMO_FLAGS=-cleanup +make demo-recovery DEMO_FLAGS=-cleanup ~~~ -Both read events.json and retain its IDs on retry. Running both against the same -stack still stores three logical events. Supply API_URL and INGESTKIT_API_KEY -to use the same contract from another application. The included key is local only. +Each owns its services and checks accepted/stored IDs. Omitting `-cleanup` stops +its services and preserves volumes; the command prints its exact cleanup recipe. +The root `make up` development stack also supports the callers' local defaults, +including `local-demo-key`; those defaults are not deployed credentials. + +## Copy the client into an application -Both callers default to the batch endpoint. Use `SEND_MODE=single` to send the -same fixture as individual requests, or `EVENTS_FILE=/path/to/events.json` for -your own `{ "events": [...] }` fixture with stable explicit IDs. For example: +`ingest_client.py` exports `Client.send` / `Client.send_batch` and `IngestError`. +`ingest-client.mjs` exports `IngestClient.send` / `sendBatch` and `IngestError`. +The modules perform no work at import time and have no package dependencies. +See the [backend guide](../../docs/integration.md) for imports and usage, and the +[API contract](../../docs/api.md) for acknowledgement and retry rules. + +For the self-hosted HTTPS deployment, set API_URL and INGESTKIT_API_KEY. Public +certificates use normal system trust. `INGESTKIT_CA_FILE` selects an explicit +private CA for local tests; neither helper disables certificate checks. + +Run their controlled-server tests (including TLS and interrupted requests): ~~~sh -SEND_MODE=single python3 examples/checkout/send.py -SEND_MODE=single node examples/checkout/send.mjs +python3 -m unittest discover -s examples/checkout -p 'test_*.py' +node --test examples/checkout/*.test.mjs ~~~ - -Each event or batch keeps identical serialized bytes across its bounded retries. -A 202 acknowledges broker delivery; verify storage separately. diff --git a/examples/checkout/ingest-client.mjs b/examples/checkout/ingest-client.mjs new file mode 100644 index 0000000..7143cf7 --- /dev/null +++ b/examples/checkout/ingest-client.mjs @@ -0,0 +1,74 @@ +// Copyable backend client. No npm dependencies and no redirect following. +import http from 'node:http'; +import https from 'node:https'; +import {readFileSync} from 'node:fs'; +const uuid=/^[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i; +export class IngestError extends Error { + constructor(message,{status=null,retryable=false,requestID=null}={}) { + super(message);this.name='IngestError';this.status=status;this.retryable=retryable; + this.requestID=typeof requestID==='string'&&uuid.test(requestID)?requestID:null; + } +} +export class IngestClient { + constructor({url,key,timeoutMs=8000,maxAttempts=3,caFile}={}) { + try { + const base=new URL(url); + if(!['http:','https:'].includes(base.protocol)||base.username||base.password||base.search||base.hash|| + typeof key!=='string'||!/^[\x21-\x7e]+$/.test(key)||!Number.isFinite(timeoutMs)||timeoutMs<=0|| + !Number.isInteger(maxAttempts)||maxAttempts<1||maxAttempts>10)throw new Error(); + this.base=base;this.key=key;this.timeoutMs=timeoutMs;this.maxAttempts=maxAttempts; + this.ca=caFile?readFileSync(caFile):undefined; + }catch{throw new IngestError('invalid client configuration');} + } + send(event){return this._send([event],false);} + sendBatch(events){return this._send(events,true);} + async _send(events,batch) { + let body,expected; + try { + expected=events.map(e=>e.event_id); + if(!expected.length||expected.some(id=>typeof id!=='string'||!uuid.test(id)))throw new Error(); + expected=expected.map(id=>id.toLowerCase()); + body=JSON.stringify(batch?{events}:events[0]); + }catch{throw new IngestError('event serialization or event ID is invalid');} + const path=this.base.pathname.replace(/\/$/,'')+(batch?'/v1/events/batch':'/v1/events'); + let error; + for(let attempt=0;attemptsetTimeout(resolve,100*2**attempt)); + } + throw error; + } + _attempt(path,body,expected) { + return new Promise((resolve,reject)=>{ + let done=false,timer; + const finish=(error,value)=>{if(done)return;done=true;clearTimeout(timer);error?reject(error):resolve(value);}; + let req; + try { + const transport=this.base.protocol==='https:'?https:http; + req=transport.request({protocol:this.base.protocol,hostname:this.base.hostname.replace(/^\[|\]$/g,''),port:this.base.port, + path,method:'POST',ca:this.ca,rejectUnauthorized:true,headers:{'Content-Type':'application/json', + 'Content-Length':Buffer.byteLength(body),Authorization:'Bearer '+this.key}},res=>{ + const requestID=res.headers['x-request-id'],status=res.statusCode; + if(status!==202){finish(new IngestError('HTTP '+status,{status,retryable:status===429||status>=500,requestID}));res.destroy();return;} + const chunks=[];let length=0; + res.on('data',chunk=>{length+=chunk.length;if(length>65536){finish(new IngestError('acknowledgement too large; delivery uncertain',{status,retryable:true,requestID}));res.destroy();}else chunks.push(chunk);}); + res.on('error',()=>finish(new IngestError('response interrupted; delivery uncertain',{retryable:true}))); + res.on('end',()=>{ + let ack;try{ack=JSON.parse(Buffer.concat(chunks).toString());}catch{} + if(ack?.status!=='accepted'||JSON.stringify(ack?.event_ids)!==JSON.stringify(expected)){ + finish(new IngestError('acknowledgement differs; delivery uncertain',{status,retryable:true,requestID}));return; + } + finish(null,expected); + }); + }); + req.on('error',e=>{ + const invalidTLS=['DEPTH_ZERO_SELF_SIGNED_CERT','SELF_SIGNED_CERT_IN_CHAIN','UNABLE_TO_VERIFY_LEAF_SIGNATURE','CERT_HAS_EXPIRED','ERR_TLS_CERT_ALTNAME_INVALID','UNABLE_TO_GET_ISSUER_CERT_LOCALLY'].includes(e.code); + finish(new IngestError(invalidTLS?'TLS certificate is not trusted':'connection failed; delivery uncertain',{retryable:!invalidTLS})); + }); + timer=setTimeout(()=>{finish(new IngestError('request timed out; delivery uncertain',{retryable:true}));req.destroy();},this.timeoutMs); + req.end(body); + }catch{req?.destroy();finish(new IngestError('request failed; delivery uncertain',{retryable:true}));} + }); + } +} diff --git a/examples/checkout/ingest-client.test.mjs b/examples/checkout/ingest-client.test.mjs new file mode 100644 index 0000000..e08e49d --- /dev/null +++ b/examples/checkout/ingest-client.test.mjs @@ -0,0 +1,78 @@ +import test from 'node:test'; +import assert from 'node:assert/strict'; +import http from 'node:http'; +import https from 'node:https'; +import {mkdtempSync,writeFileSync,readFileSync,rmSync} from 'node:fs'; +import {tmpdir} from 'node:os'; +import {join} from 'node:path'; +import {execFileSync} from 'node:child_process'; +import {IngestClient,IngestError} from './ingest-client.mjs'; + +const event={event_id:'dc12060f-f3a6-4ed3-9ea9-2d396b260b41',event_type:'order_completed',occurred_at:'2026-11-04T00:00:00Z',payload:{private:'payload-canary'}}; +const requestID='f8c22d85-5e93-4cb5-a456-18b0f104bcca'; +async function withServer(actions,run,tls){ + const seen=[]; + const handler=async(req,res)=>{ + const chunks=[];for await(const chunk of req)chunks.push(chunk); + seen.push({path:req.url,body:Buffer.concat(chunks).toString(),key:req.headers.authorization}); + const action=actions[Math.min(seen.length-1,actions.length-1)]; + if(action==='close'){req.socket.destroy();return;} + if(action==='hang'){setTimeout(()=>res.destroy(),250);return;} + res.writeHead(action[0],{'X-Request-ID':requestID});res.end(JSON.stringify({status:'accepted',event_ids:action[1],message:'secret-key payload-canary postgres://credential'})); + }; + const server=tls?https.createServer(tls,handler):http.createServer(handler); + await new Promise(resolve=>server.listen(0,'127.0.0.1',resolve)); + try{await run(`${tls?'https':'http'}://127.0.0.1:${server.address().port}`,seen);} + finally{server.closeAllConnections();await new Promise(resolve=>server.close(resolve));} +} +test('import has no I/O side effects',()=>{ + assert.equal(execFileSync(process.execPath,['--input-type=module','-e',"await import('./examples/checkout/send.mjs'); await import('./examples/checkout/ingest-client.mjs');"],{env:{...process.env,EVENTS_FILE:'/absent'}}).toString(),''); +}); +test('single and batch exact ACK',async()=>{ + for(const batch of [false,true])await withServer([[202,[event.event_id]]],async(url,seen)=>{ + const client=new IngestClient({url,key:'secret-key'}); + assert.deepEqual(await(batch?client.sendBatch([event]):client.send(event)),[event.event_id]); + assert.equal(seen[0].path,batch?'/v1/events/batch':'/v1/events');assert.equal(seen[0].key,'Bearer secret-key'); + }); +}); +test('transient retries reuse bytes, and stop',async()=>{ + for(const failure of [429,503,'close','hang']){ + const action=typeof failure==='string'?failure:[failure,[]]; + await withServer([action,[202,[event.event_id]]],async(url,seen)=>{ + assert.deepEqual(await new IngestClient({url,key:'secret-key',timeoutMs:60}).send(event),[event.event_id]); + assert.equal(seen.length,2);assert.equal(seen[0].body,seen[1].body); + }); + await withServer([action],async(url,seen)=>{ + const at=Date.now();await assert.rejects(new IngestClient({url,key:'secret-key',timeoutMs:60,maxAttempts:2}).send(event),e=>{ + assert(e instanceof IngestError);assert.equal(e.retryable,true); + for(const secret of ['secret-key','payload-canary','postgres://'])assert(!String(e).includes(secret));return true; + });assert.equal(seen.length,2);assert(Date.now()-at<2000); + }); + } +}); +test('permanent rejection does not retry; safe request ID',async()=>{ + for(const status of [400,401,413])await withServer([[status,[]]],async(url,seen)=>{ + await assert.rejects(new IngestClient({url,key:'secret-key'}).send(event),e=>{assert.equal(e.status,status);assert.equal(e.retryable,false);assert.equal(e.requestID,requestID);return true;});assert.equal(seen.length,1); + }); +}); +test('mismatched ACK and redirect cannot succeed',async()=>{ + for(const action of [[202,['wrong']],[302,[]]])await withServer([action],async(url,seen)=>{ + await assert.rejects(new IngestClient({url,key:'secret-key',maxAttempts:2}).send(event),IngestError);assert(seen.length<=2); + }); +}); +test('TLS requires explicit CA',async()=>{ + const dir=mkdtempSync(join(tmpdir(),'ingestkit-client-')); + try{ + const config=join(dir,'openssl.conf'),cert=join(dir,'cert.pem'),key=join(dir,'key.pem'); + writeFileSync(config,'[req]\nprompt=no\ndistinguished_name=dn\nx509_extensions=v3\n[dn]\nCN=localhost\n[v3]\nsubjectAltName=DNS:localhost,IP:127.0.0.1\nbasicConstraints=critical,CA:TRUE\n'); + execFileSync('openssl',['req','-x509','-nodes','-newkey','rsa:2048','-days','1','-config',config,'-out',cert,'-keyout',key],{stdio:'ignore'}); + await withServer([[202,[event.event_id]]],async(url)=>{ + await assert.rejects(new IngestClient({url,key:'secret-key',maxAttempts:1}).send(event),IngestError); + assert.deepEqual(await new IngestClient({url,key:'secret-key',caFile:cert}).send(event),[event.event_id]); + },{cert:readFileSync(cert),key:readFileSync(key)}); + }finally{rmSync(dir,{recursive:true,force:true});} +}); + +test('invalid credential header is a permanent safe configuration error',()=>{ + assert.throws(()=>new IngestClient({url:'http://localhost',key:'private-key\nInjected: payload-canary'}),e=>e instanceof IngestError&&!e.retryable&&!String(e).includes('private-key')); +}); diff --git a/examples/checkout/ingest_client.py b/examples/checkout/ingest_client.py new file mode 100644 index 0000000..07316b3 --- /dev/null +++ b/examples/checkout/ingest_client.py @@ -0,0 +1,169 @@ +"""Copyable backend HTTP client. The caller creates and retains each event ID.""" +import http.client +import json +import math +import re +import socket +import ssl +import threading +import time +from urllib.parse import urlsplit + +# DNS has no cancellable stdlib API. Only these bounded daemon workers may +# outlive a timed-out attempt; they never connect or receive event/key data. +_DNS_SLOTS = threading.BoundedSemaphore(8) + +def _remaining(deadline): + budget = deadline-time.monotonic() + if budget <= 0: + raise TimeoutError() + return budget + +def _resolve(host, port, deadline): + if not _DNS_SLOTS.acquire(timeout=_remaining(deadline)): + raise TimeoutError() + result, done = [], threading.Event() + def lookup(): + try: + try: + result.append(socket.getaddrinfo(host, port, type=socket.SOCK_STREAM)) + except (OSError, UnicodeError): + result.append(None) + finally: + _DNS_SLOTS.release() + done.set() + try: + threading.Thread(target=lookup, daemon=True).start() + except RuntimeError: + _DNS_SLOTS.release() + raise OSError("resolver unavailable") from None + if not done.wait(_remaining(deadline)): + raise TimeoutError() + _remaining(deadline) # Discard results that arrived after the deadline. + if result[0] is None: + raise OSError("resolution failed") + return result[0] + +_UUID = re.compile(r"^[0-9a-fA-F]{8}-(?:[0-9a-fA-F]{4}-){3}[0-9a-fA-F]{12}$") + +class IngestError(Exception): + def __init__(self, message, *, status=None, retryable=False, request_id=None): + super().__init__(message) + self.status, self.retryable = status, retryable + self.request_id = request_id if isinstance(request_id, str) and _UUID.fullmatch(request_id) else None + +class Client: + def __init__(self, base_url, key, timeout=8, max_attempts=3, ca_file=None): + try: + url = urlsplit(base_url) + if (url.scheme not in ("http", "https") or not url.hostname or url.username is not None + or url.password is not None or url.query or url.fragment or not isinstance(key, str) + or not key or any(ord(c)<33 or ord(c)>126 for c in key) or not math.isfinite(timeout) or timeout <= 0 + or not isinstance(max_attempts, int) or not 1 <= max_attempts <= 10): + raise ValueError() + self._host, self._port, self._secure = url.hostname, url.port, url.scheme == "https" + self._path, self._key = url.path.rstrip("/"), key + self._timeout, self._attempts = timeout, max_attempts + self._context = ssl.create_default_context(cafile=ca_file) if self._secure else None + except (ValueError, TypeError, OSError): + raise IngestError("invalid client configuration") from None + + def send(self, event): + return self._send([event], False) + + def send_batch(self, events): + return self._send(events, True) + + def _send(self, events, batch): + try: + ids = [event["event_id"] for event in events] + if not ids or any(not isinstance(i, str) or not _UUID.fullmatch(i) for i in ids): + raise ValueError() + expected = [i.lower() for i in ids] + body = json.dumps({"events": events} if batch else events[0], + ensure_ascii=False, allow_nan=False, separators=(",", ":")).encode() + except (KeyError, TypeError, ValueError, IndexError, OverflowError): + raise IngestError("event serialization or event ID is invalid") from None + path = self._path + ("/v1/events/batch" if batch else "/v1/events") + error = IngestError("delivery uncertain; retain the same event IDs", retryable=True) + for attempt in range(self._attempts): + try: + return self._attempt(path, body, expected) + except IngestError as failure: + error = failure + if not error.retryable: + raise error from None + if attempt+1 < self._attempts: + time.sleep(.1 * 2**attempt) + raise error from None + + def _connect(self, deadline): + port = self._port if self._port is not None else (443 if self._secure else 80) + for family, kind, protocol, _, address in _resolve(self._host, port, deadline): + sock = None + try: + budget = _remaining(deadline) + sock = socket.socket(family, kind, protocol) + sock.settimeout(budget) + sock.connect(address) + sock.setsockopt(socket.IPPROTO_TCP, socket.TCP_NODELAY, 1) + if self._secure: + sock.settimeout(_remaining(deadline)) + sock = self._context.wrap_socket(sock, server_hostname=self._host) + _remaining(deadline) + return sock + except ssl.SSLCertVerificationError: + if sock: + sock.close() + raise + except OSError: + if sock: + sock.close() + raise OSError("connection failed") + + def _attempt(self, path, body, expected): + deadline = time.monotonic()+self._timeout + connection = (http.client.HTTPSConnection(self._host, self._port, timeout=self._timeout, + context=self._context) if self._secure else + http.client.HTTPConnection(self._host, self._port, timeout=self._timeout)) + timer = None + response = None + try: + connection.sock = self._connect(deadline) + sock = connection.sock + def stop(): + try: + sock.shutdown(socket.SHUT_RDWR) + except OSError: + pass + timer = threading.Timer(_remaining(deadline), stop) + timer.daemon = True + timer.start() + connection.request("POST", path, body=body, headers={"Content-Type":"application/json", + "Authorization":"Bearer " + self._key}) + response = connection.getresponse() + request_id = response.getheader("X-Request-ID") + status = response.status + if status != 202: + raise IngestError("HTTP " + str(status), status=status, + retryable=status == 429 or status >= 500, request_id=request_id) + raw = response.read(65537) + try: + ack = json.loads(raw) if len(raw) <= 65536 else None + except (ValueError, UnicodeError): + ack = None + if not isinstance(ack, dict) or ack.get("event_ids") != expected or ack.get("status") != "accepted": + raise IngestError("acknowledgement differs; delivery uncertain", status=202, + retryable=True, request_id=request_id) + _remaining(deadline) + return expected + except ssl.SSLCertVerificationError: + raise IngestError("TLS certificate is not trusted") from None + except (OSError, http.client.HTTPException): + raise IngestError("connection failed; delivery uncertain", retryable=True) from None + finally: + if timer: + timer.cancel() + if response: + response.close() + connection.close() diff --git a/examples/checkout/send.mjs b/examples/checkout/send.mjs index bcd432c..4cfc85a 100644 --- a/examples/checkout/send.mjs +++ b/examples/checkout/send.mjs @@ -1,30 +1,18 @@ -// No npm dependencies. Reuse serialized event IDs on every uncertain retry. -import { readFileSync } from 'node:fs'; -const events = JSON.parse(readFileSync(process.env.EVENTS_FILE || new URL('./events.json', import.meta.url))).events; -const mode = process.env.SEND_MODE || 'batch'; -if (!['single', 'batch'].includes(mode)) { console.error('SEND_MODE must be single or batch'); process.exit(1); } -const base = (process.env.API_URL || 'http://localhost:8080').replace(/\/$/, ''); -const key = process.env.INGESTKIT_API_KEY || 'local-demo-key'; -for (const group of mode === 'single' ? events.map(event => [event]) : [events]) { - const body = JSON.stringify(mode === 'single' ? group[0] : { events: group }); - const url = base + (mode === 'single' ? '/v1/events' : '/v1/events/batch'); - let accepted = false; - for (let attempt = 0; attempt < 3; attempt++) { - try { - const response = await fetch(url, { method: 'POST', body, - headers: { 'Content-Type': 'application/json', Authorization: 'Bearer ' + key }, - signal: AbortSignal.timeout(8000) }); - if (response.status === 202) { - const ack = await response.json(); - if (JSON.stringify(ack.event_ids) !== JSON.stringify(group.map(event => event.event_id))) - throw new Error('acknowledgement IDs differ'); - console.log(JSON.stringify(ack)); accepted = true; break; - } - if (![429, 503].includes(response.status)) { - console.error('HTTP ' + response.status); process.exit(1); - } - } catch { /* Delivery is ambiguous; retain the same IDs. */ } - if (attempt < 2) await new Promise(resolve => setTimeout(resolve, 100 * (2 ** attempt))); - } - if (!accepted) { console.error('delivery uncertain; retry with the same event IDs'); process.exit(1); } +import {readFileSync} from 'node:fs'; +import {resolve} from 'node:path'; +import {fileURLToPath} from 'node:url'; +import {IngestClient,IngestError} from './ingest-client.mjs'; +export async function main() { + try { + const events=JSON.parse(readFileSync(process.env.EVENTS_FILE||new URL('./events.json',import.meta.url))).events; + const mode=process.env.SEND_MODE||'batch'; + if(!['single','batch'].includes(mode))throw new Error(); + const client=new IngestClient({url:process.env.API_URL||'http://localhost:8080',key:process.env.INGESTKIT_API_KEY||'local-demo-key',caFile:process.env.INGESTKIT_CA_FILE}); + for(const group of mode==='single'?events.map(e=>[e]):[events]) { + const ids=await(mode==='single'?client.send(group[0]):client.sendBatch(group)); + console.log(JSON.stringify({status:'accepted',event_ids:ids})); + } + return 0; + }catch(e){console.error(e instanceof IngestError?e.message:'invalid fixture or caller configuration');return 1;} } +if(process.argv[1]&&resolve(process.argv[1])===fileURLToPath(import.meta.url))process.exitCode=await main(); diff --git a/examples/checkout/send.py b/examples/checkout/send.py index d387d99..e187c14 100644 --- a/examples/checkout/send.py +++ b/examples/checkout/send.py @@ -1,41 +1,33 @@ #!/usr/bin/env python3 -"""Plain HTTP; reuse serialized event IDs on every uncertain retry.""" +"""Run the checkout fixture; import ingest_client from backend application code.""" import json import os from pathlib import Path import sys -import time -import urllib.error -import urllib.request +if __package__: + from .ingest_client import Client, IngestError +else: + from ingest_client import Client, IngestError -fixture = Path(os.environ.get("EVENTS_FILE", str(Path(__file__).with_name("events.json")))) -events = json.loads(fixture.read_text())["events"] -mode = os.environ.get("SEND_MODE", "batch") -if mode not in ("single", "batch"): - sys.exit("SEND_MODE must be single or batch") -base = os.environ.get("API_URL", "http://localhost:8080").rstrip("/") -key = os.environ.get("INGESTKIT_API_KEY", "local-demo-key") -for group in ([[event] for event in events] if mode == "single" else [events]): - body = json.dumps(group[0] if mode == "single" else {"events": group}).encode() - url = base + ("/v1/events" if mode == "single" else "/v1/events/batch") - for attempt in range(3): - request = urllib.request.Request(url, data=body, headers={ - "Content-Type": "application/json", "Authorization": "Bearer " + key}) - try: - with urllib.request.urlopen(request, timeout=8) as response: - if response.status != 202: - raise RuntimeError("expected broker acknowledgement") - ack = json.load(response) - if ack["event_ids"] != [event["event_id"] for event in group]: - sys.exit("acknowledgement IDs differ; delivery uncertain") - print(json.dumps(ack)) - break - except urllib.error.HTTPError as error: - if error.code not in (429, 503): - sys.exit("HTTP " + str(error.code)) - except (urllib.error.URLError, TimeoutError): - pass - if attempt < 2: - time.sleep(0.1 * (2 ** attempt)) - else: - sys.exit("delivery uncertain; retry with the same event IDs") +def main(): + try: + fixture = Path(os.environ.get("EVENTS_FILE", str(Path(__file__).with_name("events.json")))) + events = json.loads(fixture.read_text())["events"] + mode = os.environ.get("SEND_MODE", "batch") + if mode not in ("single", "batch"): + raise ValueError() + client = Client(os.environ.get("API_URL", "http://localhost:8080"), + os.environ.get("INGESTKIT_API_KEY", "local-demo-key"), + ca_file=os.environ.get("INGESTKIT_CA_FILE")) + for group in ([[event] for event in events] if mode == "single" else [events]): + ids = client.send(group[0]) if mode == "single" else client.send_batch(group) + print(json.dumps({"status":"accepted", "event_ids":ids})) + return 0 + except IngestError as error: + print(str(error), file=sys.stderr) + except (OSError, ValueError, KeyError, TypeError): + print("invalid fixture or caller configuration", file=sys.stderr) + return 1 + +if __name__ == "__main__": + sys.exit(main()) diff --git a/examples/checkout/test_ingest_client.py b/examples/checkout/test_ingest_client.py new file mode 100644 index 0000000..df4c6f9 --- /dev/null +++ b/examples/checkout/test_ingest_client.py @@ -0,0 +1,222 @@ +import gc +import warnings +import contextlib +import http.server +import json +import os +from pathlib import Path +import socket +import ssl +import subprocess +import tempfile +import threading +import time +import unittest +from unittest.mock import patch + +from ingest_client import Client, IngestError + +EVENT = {"event_id": "dc12060f-f3a6-4ed3-9ea9-2d396b260b41", "event_type": "order_completed", + "occurred_at": "2026-11-04T00:00:00Z", "payload": {"private": "payload-canary"}} +REQUEST_ID = "f8c22d85-5e93-4cb5-a456-18b0f104bcca" + +@contextlib.contextmanager +def server(actions, tls=None): + seen = [] + class Handler(http.server.BaseHTTPRequestHandler): + def log_message(self, *_): + pass + def do_POST(self): + body = self.rfile.read(int(self.headers["Content-Length"])) + seen.append((self.path, body, self.headers.get("Authorization"))) + action = actions[min(len(seen)-1, len(actions)-1)] + if action == "close": + self.connection.shutdown(socket.SHUT_RDWR) + return + if action == "hang": + time.sleep(.2) + return + status, ids = action + self.send_response(status) + self.send_header("X-Request-ID", REQUEST_ID) + self.end_headers() + try: + self.wfile.write(json.dumps({"status":"accepted", "event_ids":ids, + "message":"secret-key payload-canary postgres://credential"}).encode()) + except OSError: + pass + httpd = http.server.ThreadingHTTPServer(("127.0.0.1", 0), Handler) + httpd.daemon_threads = True + if tls: + httpd.socket = tls.wrap_socket(httpd.socket, server_side=True) + thread = threading.Thread(target=httpd.serve_forever, daemon=True) + thread.start() + try: + yield ("https" if tls else "http") + "://127.0.0.1:" + str(httpd.server_port), seen + finally: + httpd.shutdown() + httpd.server_close() + thread.join() + +class ClientTest(unittest.TestCase): + def test_import_has_no_side_effects(self): + result = subprocess.run(["python3", "-c", "import send; import ingest_client"], + cwd=Path(__file__).parent, env=dict(os.environ, EVENTS_FILE="/absent"), + capture_output=True) + self.assertEqual(result.returncode, 0, result.stderr) + self.assertEqual(result.stdout, b"") + + def test_single_and_batch_exact_ack(self): + for batch in (False, True): + with server([(202, [EVENT["event_id"]])]) as (url, seen): + client = Client(url, "secret-key") + ids = client.send_batch([EVENT]) if batch else client.send(EVENT) + self.assertEqual(ids, [EVENT["event_id"]]) + self.assertEqual(seen[0][0], "/v1/events/batch" if batch else "/v1/events") + self.assertEqual(seen[0][2], "Bearer secret-key") + + def test_retry_reuses_bytes_and_is_bounded(self): + for failure in (429, 503, "close", "hang"): + action = failure if isinstance(failure, str) else (failure, []) + with server([action, (202, [EVENT["event_id"]])]) as (url, seen): + self.assertEqual(Client(url, "secret-key", timeout=.06).send(EVENT), [EVENT["event_id"]]) + self.assertEqual(len(seen), 2) + self.assertEqual(seen[0][1], seen[1][1]) + with server([action]) as (url, seen): + started = time.monotonic() + with self.assertRaises(IngestError) as raised: + Client(url, "secret-key", timeout=.06, max_attempts=2).send(EVENT) + self.assertTrue(raised.exception.retryable) + self.assertEqual(len(seen), 2) + self.assertLess(time.monotonic()-started, 2) + for private in ("secret-key", "payload-canary", "postgres://"): + self.assertNotIn(private, str(raised.exception)) + + def test_attempt_deadline_includes_dns_without_late_post(self): + # A slow resolver must not hold up send() or publish after it returns. + resolve = socket.getaddrinfo + released, finished = threading.Event(), threading.Event() + def delayed(*args, **kwargs): + try: + released.wait(.3) + return resolve(*args, **kwargs) + finally: + finished.set() + with server([(202, [EVENT["event_id"]])]) as (url, seen): + url = url.replace("127.0.0.1", "localhost") + with patch("socket.getaddrinfo", delayed): + started = time.monotonic() + try: + with self.assertRaises(IngestError) as raised: + Client(url, "secret-key", timeout=.03, max_attempts=1).send(EVENT) + elapsed = time.monotonic()-started + self.assertTrue(raised.exception.retryable) + self.assertLess(elapsed, .18) + finally: + released.set() + self.assertTrue(finished.wait(1)) + self.assertEqual(seen, []) + + def test_attempt_deadline_is_shared_by_all_addresses(self): + # socket.create_connection otherwise grants each address a fresh timeout. + addresses = [(socket.AF_INET, socket.SOCK_STREAM, socket.IPPROTO_TCP, "", + ("192.0.2.1", 80))] * 4 + sockets = [] + def stalled_connect(sock, address): + sockets.append(sock) + threading.Event().wait(sock.gettimeout()) + raise socket.timeout() + with patch("socket.getaddrinfo", return_value=addresses), \ + patch.object(socket.socket, "connect", stalled_connect): + started = time.monotonic() + with self.assertRaises(IngestError) as raised: + Client("http://example.invalid", "secret-key", timeout=.04, + max_attempts=1).send(EVENT) + self.assertTrue(raised.exception.retryable) + self.assertLess(time.monotonic()-started, .12) + self.assertTrue(sockets) + self.assertTrue(all(sock.fileno() == -1 for sock in sockets)) + + def test_unresolved_dns_work_is_bounded(self): + # Timed-out DNS must not create one forever-blocked thread per send. + release = threading.Event() + lock = threading.Lock() + active, peak = 0, 0 + def stalled(*args, **kwargs): + nonlocal active, peak + with lock: + active += 1 + peak = max(peak, active) + try: + release.wait(.2) + raise socket.gaierror() + finally: + with lock: + active -= 1 + with patch("socket.getaddrinfo", stalled): + try: + started = time.monotonic() + for _ in range(12): + with self.assertRaises(IngestError) as raised: + Client("http://example.invalid", "secret-key", timeout=.01, + max_attempts=1).send(EVENT) + self.assertTrue(raised.exception.retryable) + self.assertLess(time.monotonic()-started, .4) + self.assertLessEqual(peak, 8) + finally: + release.set() + deadline = time.monotonic()+1 + while active and time.monotonic() < deadline: + threading.Event().wait(.005) + self.assertEqual(active, 0) + + def test_permanent_status_and_request_id(self): + for status in (400, 401, 413): + with server([(status, [])]) as (url, seen): + with self.assertRaises(IngestError) as raised: + Client(url, "secret-key").send(EVENT) + self.assertEqual(raised.exception.status, status) + self.assertFalse(raised.exception.retryable) + self.assertEqual(raised.exception.request_id, REQUEST_ID) + self.assertEqual(len(seen), 1) + + def test_ack_mismatch_and_redirect_never_succeed(self): + for action in ((202, ["wrong"]), (302, [])): + with server([action]) as (url, seen): + with self.assertRaises(IngestError): + Client(url, "secret-key", max_attempts=2).send(EVENT) + self.assertLessEqual(len(seen), 2) + + def test_invalid_header_key_is_a_safe_configuration_error(self): + with self.assertRaises(IngestError) as raised: + Client("http://localhost", "private-key\nInjected: payload-canary") + self.assertFalse(raised.exception.retryable) + self.assertNotIn("private-key", str(raised.exception)) + + def test_response_sockets_are_closed_on_http_rejection(self): + with server([(401, [])]) as (url, _): + with warnings.catch_warnings(record=True) as captured: + warnings.simplefilter("always", ResourceWarning) + with self.assertRaises(IngestError): + Client(url, "secret-key").send(EVENT) + gc.collect() + self.assertFalse([w for w in captured if issubclass(w.category, ResourceWarning)], + "HTTP rejection must close its response/socket") + + def test_tls_requires_explicit_trust(self): + with tempfile.TemporaryDirectory() as directory: + path = Path(directory) + conf = path/"openssl.conf" + conf.write_text("[req]\nprompt=no\ndistinguished_name=dn\nx509_extensions=v3\n[dn]\nCN=localhost\n[v3]\nsubjectAltName=DNS:localhost,IP:127.0.0.1\nbasicConstraints=critical,CA:TRUE\n") + cert, key = path/"cert.pem", path/"key.pem" + subprocess.run(["openssl","req","-x509","-nodes","-newkey","rsa:2048","-days","1", + "-config",str(conf),"-keyout",str(key),"-out",str(cert)], check=True, capture_output=True) + context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) + context.load_cert_chain(str(cert), str(key)) + with server([(202,[EVENT["event_id"]])], context) as (url, _): + with self.assertRaises(IngestError): + Client(url,"secret-key", max_attempts=1).send(EVENT) + self.assertEqual(Client(url,"secret-key",ca_file=str(cert)).send(EVENT),[EVENT["event_id"]]) + +if __name__ == "__main__": + unittest.main() diff --git a/examples/outbox/README.md b/examples/outbox/README.md new file mode 100644 index 0000000..86b3c38 --- /dev/null +++ b/examples/outbox/README.md @@ -0,0 +1,96 @@ +# Checkout with a transactional outbox + +This is one small SQLite application, not another collector service. Creating an +order saves its business row and serialized event in the same transaction. A +separate, bounded dispatch command sends pending events through the reusable +Python HTTP client. The collector still acknowledges the broker before storage. + +From the repository root, with the HTTPS collector deployed and its backend key +loaded as described in the [deployment guide](../../deploy/README.md): + +~~~sh +umask 077 +export API_URL=https://events.example.com +export INGESTKIT_API_KEY +python3 -m examples.outbox create-order --database private/orders.db \ + --order-id order-123 --amount-cents 2500 +python3 -m examples.outbox status --database private/orders.db +python3 -m examples.outbox dispatch --database private/orders.db +python3 -m examples.outbox status --database private/orders.db +~~~ + +The first command prints its persisted event UUID. Repeating the same order ID +and amount returns that UUID; a conflicting amount fails. The UUID, occurred_at +and serialized payload do not change when the process restarts. Use a new order +ID for a new order. The private directory and SQLite business data belong on a +persistent disk and in your own application backup strategy. + +`dispatch` attempts at most 100 pending records once, with bounded retries inside +the HTTP helper. `--batch-size 10` lowers the selection size; `--max-attempts 1` +limits transport attempts. Set `INGESTKIT_CA_FILE` when using an explicit local +CA. Public HTTPS uses ordinary certificate verification. + +The command prints attempted/acknowledged/rejected counts and the remaining +pending count. It exits nonzero when the selected work could not be acknowledged +or was rejected. An empty queue exits successfully. States mean: + +| State | Meaning | +| --- | --- | +| pending | Still needs broker acknowledgement; network ambiguity, authentication/configuration failures and server errors remain here | +| acknowledged | HTTP 202 with exactly the selected IDs; PostgreSQL may still be catching up | +| rejected | A 400/413 requires an operator decision; the event and safe error code remain inspectable | + +`status` reports all state counts and a bounded list of problem IDs, attempts and +safe error codes. Attempts count dispatcher calls, not each internal HTTP retry. +No payload, key, response body or database URL is copied into error summaries. +Do not silently discard a rejected event. Decide whether to repair the business +input, split an oversized batch, retry, or compensate. This example deliberately +has no automatic rejection reset that could rewrite an already delivered event. + +## The crash boundary + +The dispatcher reads pending work, releases the SQLite connection, sends HTTP, +and only then marks the selected rows acknowledged in another transaction. It +holds no business write lock while waiting on the network. If it dies after the +broker ACK but before that update, the rows remain pending. The next process +resends their original IDs and content; PostgreSQL keeps one row per tenant/ID. +The integration test pauses a test-only wrapper precisely after a real ACK, +kills that child process, dispatches again and checks one stored row. + +Run one dispatcher at a time. Adapting this to multiple dispatchers needs a lease +or claim protocol in your application's database; this example does not claim +that behavior. A timer/cron/application worker can invoke the one-shot command, +but deploy that scheduling only after choosing your application's lifecycle. + +## Verify at the collector + +Copy the created event UUID into this query on the collector host: + +~~~sh +docker compose --env-file deploy/.env -f deploy/compose.yml exec -T postgres \ + psql -U ingestkit_admin -d ingestkit -c \ + "SELECT event_id,event_type,payload FROM ingestkit.events WHERE tenant_id='default' AND event_id='YOUR-EVENT-UUID';" +~~~ + +The payload includes the order ID and amount. Acknowledged outbox state alone +does not replace this persistence check. + +To adapt the pattern, place your real business write and the serialized outbox +row inside the same database transaction. Keep the event ID stable, dispatch +outside the transaction, and mark acknowledgement only after validating the +response. An HTTP call after a standalone business commit leaves a creation gap +that retries alone cannot repair. SQLite here is a concrete teaching example; +you do not need another SQLite database when your application already uses +PostgreSQL or another transactional store. + +~~~sh +python3 -m unittest discover -s examples/outbox -p 'test_*.py' +# Real outage and after-ACK process-kill checks over HTTPS: +scripts/test-integration.sh -run TestOutbox -v +~~~ + +The [recorded recovery study](../../benchmarks/results/selfhost-2026-11-04/README.md) +uses 100 saved events per repetition and a broker outage longer than the publish +deadline. It retains pending state and replays from a new dispatcher. This is +separate from the deterministic after-ACK kill check described above; neither +replaces your own application database's transaction/worker design. diff --git a/examples/outbox/__init__.py b/examples/outbox/__init__.py new file mode 100644 index 0000000..78d5c9f --- /dev/null +++ b/examples/outbox/__init__.py @@ -0,0 +1 @@ +"""A small durable application outbox using the ordinary HTTP event contract.""" diff --git a/examples/outbox/__main__.py b/examples/outbox/__main__.py new file mode 100644 index 0000000..48f797b --- /dev/null +++ b/examples/outbox/__main__.py @@ -0,0 +1,41 @@ +import argparse +import json +import os +import sqlite3 +import sys +from examples.checkout.ingest_client import Client, IngestError +from .app import create_order, dispatch_once, status + +def main(): + parser = argparse.ArgumentParser(description="One-shot transactional outbox example") + commands = parser.add_subparsers(dest="command", required=True) + create = commands.add_parser("create-order") + create.add_argument("--database", required=True) + create.add_argument("--order-id", required=True) + create.add_argument("--amount-cents", type=int, required=True) + dispatch = commands.add_parser("dispatch") + dispatch.add_argument("--database", required=True) + dispatch.add_argument("--batch-size", type=int, default=100) + dispatch.add_argument("--max-attempts", type=int, default=3) + inspect = commands.add_parser("status") + inspect.add_argument("--database", required=True) + args = parser.parse_args() + try: + if args.command == "create-order": + result = {"event_id":create_order(args.database,args.order_id,args.amount_cents)} + elif args.command == "status": + result = status(args.database) + else: + client = Client(os.environ["API_URL"],os.environ["INGESTKIT_API_KEY"], + max_attempts=args.max_attempts,ca_file=os.environ.get("INGESTKIT_CA_FILE")) + result = dispatch_once(args.database,client,args.batch_size) + print(json.dumps(result)) + return 1 if result.get("error") else 0 + except IngestError as error: + print(json.dumps({"error":str(error)})) + except (ValueError,KeyError,OSError,sqlite3.Error): + print(json.dumps({"error":"invalid outbox input, database or configuration"})) + return 1 + +if __name__ == "__main__": + sys.exit(main()) diff --git a/examples/outbox/app.py b/examples/outbox/app.py new file mode 100644 index 0000000..9cd654a --- /dev/null +++ b/examples/outbox/app.py @@ -0,0 +1,90 @@ +"""One business transaction, one stored event, one bounded dispatcher.""" +from contextlib import closing +from datetime import datetime, timezone +import json +import os +from pathlib import Path +import sqlite3 +from uuid import uuid4 + +from examples.checkout.ingest_client import IngestError + +_SCHEMA = Path(__file__).with_name("schema.sql").read_text() + +def _connect(database): + path = Path(database) + path.parent.mkdir(mode=0o700, parents=True, exist_ok=True) + try: + descriptor = os.open(path, os.O_CREAT | os.O_EXCL | os.O_RDWR, 0o600) + except FileExistsError: + pass + else: + os.close(descriptor) + connection = sqlite3.connect(path, timeout=5) + try: + connection.execute("PRAGMA foreign_keys=ON") + connection.execute("PRAGMA synchronous=FULL") + connection.executescript(_SCHEMA) + return connection + except Exception: + connection.close() + raise + +def create_order(database, order_id, amount_cents): + if (not isinstance(order_id, str) or not order_id or "\0" in order_id + or len(order_id.encode("utf-8")) > 128 or type(amount_cents) is not int + or not 0 <= amount_cents <= 9223372036854775807): + raise ValueError("invalid order") + with closing(_connect(database)) as connection, connection: + connection.execute("BEGIN IMMEDIATE") + existing = connection.execute("SELECT amount_cents,event_id FROM orders WHERE order_id=?", (order_id,)).fetchone() + if existing: + if existing[0] != amount_cents: + raise ValueError("order already exists with a different amount") + return existing[1] + event_id = str(uuid4()) + body = json.dumps({"event_id":event_id,"event_type":"order_completed", + "occurred_at":datetime.now(timezone.utc).isoformat(), + "payload":{"order_id":order_id,"amount_cents":amount_cents}}, + ensure_ascii=False, allow_nan=False, separators=(",", ":")) + connection.execute("INSERT INTO orders(order_id,amount_cents,event_id) VALUES(?,?,?)", + (order_id, amount_cents, event_id)) + connection.execute("INSERT INTO outbox(event_id,order_id,body) VALUES(?,?,?)", + (event_id, order_id, body)) + return event_id + +def status(database): + with closing(_connect(database)) as connection: + counts = {"pending":0,"acknowledged":0,"rejected":0} + counts.update(connection.execute("SELECT state,count(*) FROM outbox GROUP BY state")) + counts["issues"] = [{"event_id":row[0],"attempts":row[1],"error":row[2]} for row in + connection.execute("SELECT event_id,attempts,last_error FROM outbox WHERE last_error IS NOT NULL ORDER BY rowid LIMIT 100")] + return counts + +def dispatch_once(database, client, batch_size=100): + if type(batch_size) is not int or not 1 <= batch_size <= 100: + raise ValueError("batch_size must be 1..100") + with closing(_connect(database)) as connection: + selected = connection.execute("SELECT event_id,body FROM outbox WHERE state='pending' ORDER BY rowid LIMIT ?", (batch_size,)).fetchall() + result = {"attempted":len(selected),"acknowledged":0,"rejected":0,"pending":0,"error":None} + if selected: + ids = [row[0] for row in selected] + state, code = "acknowledged", None + try: + acknowledgement = client.send_batch([json.loads(row[1]) for row in selected]) + if acknowledgement != ids: + raise IngestError("invalid acknowledgement", retryable=True) + except IngestError as error: + # Authentication/configuration problems retain work for a repaired + # caller. Only known bad-input/size rejections are parked as rejected. + http_status = error.status if type(error.status) is int and 100 <= error.status <= 599 else None + state = "rejected" if http_status in (400, 413) else "pending" + code = "http_" + str(http_status) if http_status is not None else "delivery_uncertain" + with closing(_connect(database)) as connection, connection: + connection.executemany("UPDATE outbox SET state=?,attempts=attempts+1,last_error=?,acknowledged_at=? WHERE event_id=? AND state='pending'", + [(state,code,datetime.now(timezone.utc).isoformat() if state == "acknowledged" else None,event_id) for event_id in ids]) + result["acknowledged"] = len(ids) if state == "acknowledged" else 0 + result["rejected"] = len(ids) if state == "rejected" else 0 + result["error"] = code + result["pending"] = status(database)["pending"] + return result diff --git a/examples/outbox/schema.sql b/examples/outbox/schema.sql new file mode 100644 index 0000000..8a237d0 --- /dev/null +++ b/examples/outbox/schema.sql @@ -0,0 +1,14 @@ +CREATE TABLE IF NOT EXISTS orders ( + order_id TEXT PRIMARY KEY, + amount_cents INTEGER NOT NULL CHECK(amount_cents >= 0), + event_id TEXT NOT NULL UNIQUE +); +CREATE TABLE IF NOT EXISTS outbox ( + event_id TEXT PRIMARY KEY, + order_id TEXT NOT NULL UNIQUE REFERENCES orders(order_id), + body TEXT NOT NULL, + state TEXT NOT NULL DEFAULT 'pending' CHECK(state IN ('pending','acknowledged','rejected')), + attempts INTEGER NOT NULL DEFAULT 0, + last_error TEXT, + acknowledged_at TEXT +); diff --git a/examples/outbox/test_outbox.py b/examples/outbox/test_outbox.py new file mode 100644 index 0000000..678cf3d --- /dev/null +++ b/examples/outbox/test_outbox.py @@ -0,0 +1,86 @@ +import json +from pathlib import Path +import sqlite3 +import subprocess +import tempfile +import unittest + +from examples.checkout.ingest_client import IngestError +from examples.outbox.app import create_order, dispatch_once, status + +class Transport: + def __init__(self, error=None, wrong=False): + self.error, self.wrong, self.bodies = error, wrong, [] + def send_batch(self, events): + self.bodies.append(json.dumps(events, separators=(",", ":"))) + if self.error: + raise self.error + return ["wrong"] if self.wrong else [event["event_id"] for event in events] + +class OutboxTest(unittest.TestCase): + def setUp(self): + self.temp = tempfile.TemporaryDirectory() + self.addCleanup(self.temp.cleanup) + self.database = str(Path(self.temp.name)/"orders.db") + def row(self, order_id="order-1"): + with sqlite3.connect(self.database) as connection: + return connection.execute("SELECT event_id,body,state,attempts,last_error FROM outbox WHERE order_id=?", (order_id,)).fetchone() + def test_order_and_outbox_are_one_transaction(self): + create_order(self.database,"seed",100) + with sqlite3.connect(self.database) as connection: + connection.execute("CREATE TRIGGER fail_outbox BEFORE INSERT ON outbox BEGIN SELECT RAISE(ABORT, 'test failure'); END;") + with self.assertRaises(sqlite3.IntegrityError): + create_order(self.database,"order-1",2500) + with sqlite3.connect(self.database) as connection: + self.assertEqual(connection.execute("SELECT count(*) FROM orders WHERE order_id='order-1'").fetchone()[0],0) + def test_business_retry_keeps_id_and_bytes_across_processes(self): + event_id = create_order(self.database,"order-1",2500) + before = self.row() + result = subprocess.check_output(["python3","-m","examples.outbox","create-order","--database",self.database,"--order-id","order-1","--amount-cents","2500"],text=True) + self.assertEqual(json.loads(result)["event_id"],event_id) + self.assertEqual(self.row(),before) + with self.assertRaises(ValueError): + create_order(self.database,"order-1",2600) + self.assertEqual(self.row(),before) + def test_transient_and_authentication_failures_stay_pending(self): + for failure in (IngestError("payload-canary",retryable=True),IngestError("private-key",status=401), + IngestError("private-key",status="private-key")): + create_order(self.database,"order-1",2500) + transport = Transport(error=failure) + summary = dispatch_once(self.database,transport) + self.assertEqual(summary["attempted"],1) + self.assertEqual(summary["acknowledged"],0) + self.assertEqual(self.row()[2],"pending") + self.assertNotIn("payload-canary",json.dumps(summary)) + self.assertNotIn("private-key",json.dumps(summary)) + success = Transport() + summary = dispatch_once(self.database,success) + self.assertEqual(summary["acknowledged"],1) + self.assertEqual(self.row()[2],"acknowledged") + self.assertEqual(transport.bodies[-1],success.bodies[0]) + self.assertEqual(dispatch_once(self.database,success)["attempted"],0) + def test_permanent_rejection_is_visible(self): + event_id=create_order(self.database,"order-1",2500) + result=dispatch_once(self.database,Transport(error=IngestError("private payload",status=400))) + self.assertEqual(result["rejected"],1) + self.assertEqual(self.row()[2],"rejected") + self.assertEqual(self.row()[4],"http_400") + self.assertEqual(status(self.database)["rejected"],1) + self.assertEqual(self.row()[0],event_id) + self.assertEqual(dispatch_once(self.database,Transport())["attempted"],0) + def test_dispatch_is_bounded_and_bad_ack_is_not_success(self): + for i in range(3): + create_order(self.database,"order-"+str(i),100) + result=dispatch_once(self.database,Transport(wrong=True),batch_size=2) + self.assertEqual(result["attempted"],2) + self.assertEqual(result["acknowledged"],0) + self.assertEqual(result["pending"],3) + result=dispatch_once(self.database,Transport(),batch_size=2) + self.assertEqual(result["acknowledged"],2) + self.assertEqual(result["pending"],1) + for invalid in (0,101): + with self.assertRaises(ValueError): + dispatch_once(self.database,Transport(),batch_size=invalid) + +if __name__ == "__main__": + unittest.main() diff --git a/internal/benchmark/artifacts.go b/internal/benchmark/artifacts.go new file mode 100644 index 0000000..2681ad0 --- /dev/null +++ b/internal/benchmark/artifacts.go @@ -0,0 +1,180 @@ +package benchmark + +import ( + "bytes" + "compress/gzip" + "crypto/sha256" + "encoding/hex" + "encoding/json" + "errors" + "io" + "os" + "path/filepath" + "time" +) + +const maxRawArtifact = 128 << 20 +const maxCompressedArtifact = 64 << 20 + +type ArtifactRef struct { + Codec string + Path, SHA256 string + Size, RawBytes int64 +} + +func WriteCompressed(path string, value any) (ArtifactRef, error) { + var ref ArtifactRef + raw, err := json.Marshal(value) + if err != nil { + return ref, err + } + if len(raw) > maxRawArtifact { + return ref, errors.New("raw artifact exceeds128MiB bound") + } + if err = os.MkdirAll(filepath.Dir(path), 0755); err != nil { + return ref, err + } + file, err := os.CreateTemp(filepath.Dir(path), ".capture-*") + if err != nil { + return ref, err + } + temp := file.Name() + defer os.Remove(temp) + writer, _ := gzip.NewWriterLevel(file, gzip.BestCompression) + writer.Header.ModTime = time.Unix(0, 0) + writer.Header.OS = 255 + _, err = writer.Write(raw) + err = errors.Join(err, writer.Close(), file.Sync(), file.Close()) + if err != nil { + return ref, err + } + data, err := os.ReadFile(temp) + if err != nil { + return ref, err + } + if len(data) > maxCompressedArtifact { + return ref, errors.New("compressed artifact exceeds64MiB bound") + } + // Link publishes a complete file atomically and refuses an existing target. + if err = os.Link(temp, path); err != nil { + return ref, err + } + _ = os.Chmod(path, 0644) + sum := sha256.Sum256(data) + return ArtifactRef{Codec: "gzip", Path: filepath.Base(path), SHA256: hex.EncodeToString(sum[:]), Size: int64(len(data)), RawBytes: int64(len(raw))}, nil +} +func VerifyArtifact(directory string, ref ArtifactRef) error { + if !filepath.IsLocal(ref.Path) || ref.Path == "." || len(ref.SHA256) != 64 { + return errors.New("invalid artifact reference") + } + path := filepath.Join(directory, ref.Path) + base, e := filepath.EvalSymlinks(directory) + if e != nil { + return e + } + parent, e := filepath.EvalSymlinks(filepath.Dir(path)) + if e != nil { + return e + } + relative, e := filepath.Rel(base, parent) + if e != nil || !filepath.IsLocal(relative) { + return errors.New("artifact reference escapes output directory") + } + + info, err := os.Lstat(path) + if err != nil { + return err + } + if !info.Mode().IsRegular() || info.Size() > maxCompressedArtifact || info.Size() != ref.Size { + return errors.New("invalid artifact size/type") + } + data, err := os.ReadFile(path) + if err != nil { + return err + } + sum := sha256.Sum256(data) + if hex.EncodeToString(sum[:]) != ref.SHA256 { + return errors.New("artifact checksum mismatch") + } + if ref.Codec == "json" { + if int64(len(data)) != ref.RawBytes || !json.Valid(data) { + return errors.New("invalid JSON manifest artifact") + } + return nil + } + if ref.Codec != "" && ref.Codec != "gzip" { + return errors.New("unsupported artifact codec") + } + reader, err := gzip.NewReader(bytes.NewReader(data)) + if err != nil { + return err + } + defer reader.Close() + count, err := io.Copy(io.Discard, io.LimitReader(reader, maxRawArtifact+1)) + if err != nil { + return err + } + if count > maxRawArtifact || count != ref.RawBytes { + return errors.New("invalid decompressed artifact bound") + } + return nil +} +func atomicJSON(path string, value any) error { + raw, err := json.MarshalIndent(value, "", " ") + if err != nil { + return err + } + if err = os.MkdirAll(filepath.Dir(path), 0755); err != nil { + return err + } + file, err := os.CreateTemp(filepath.Dir(path), ".journal-*") + if err != nil { + return err + } + defer os.Remove(file.Name()) + _, err = file.Write(append(raw, '\n')) + err = errors.Join(err, file.Sync(), file.Close()) + if err != nil { + return err + } + if err = os.Rename(file.Name(), path); err != nil { + return err + } + directory, err := os.Open(filepath.Dir(path)) + if err != nil { + return err + } + defer directory.Close() + return directory.Sync() +} + +func WriteJSONArtifact(path string, value any) (ArtifactRef, error) { + var ref ArtifactRef + raw, err := json.MarshalIndent(value, "", " ") + if err != nil { + return ref, err + } + raw = append(raw, '\n') + if len(raw) > maxCompressedArtifact { + return ref, errors.New("JSON artifact exceeds size bound") + } + if err = os.MkdirAll(filepath.Dir(path), 0755); err != nil { + return ref, err + } + file, err := os.CreateTemp(filepath.Dir(path), ".metadata-*") + if err != nil { + return ref, err + } + defer os.Remove(file.Name()) + _, err = file.Write(raw) + err = errors.Join(err, file.Sync(), file.Close()) + if err != nil { + return ref, err + } + if err = os.Link(file.Name(), path); err != nil { + return ref, err + } + _ = os.Chmod(path, 0644) + sum := sha256.Sum256(raw) + return ArtifactRef{Codec: "json", Path: filepath.Base(path), SHA256: hex.EncodeToString(sum[:]), Size: int64(len(raw)), RawBytes: int64(len(raw))}, nil +} diff --git a/internal/benchmark/cases.go b/internal/benchmark/cases.go new file mode 100644 index 0000000..c5eacce --- /dev/null +++ b/internal/benchmark/cases.go @@ -0,0 +1,84 @@ +package benchmark + +import ( + "fmt" + "time" +) + +type Case struct { + ID, Kind, Recovery, Pattern, PayloadProfile string + Count, BatchSize, PayloadBytes, Rate, Concurrency, Repetitions int + DuplicateFraction float64 + Window, Warmup, Drain, Poll, FaultAt, RestoreAt time.Duration +} + +func StudyCases() []Case { + var cases []Case + db := func(id string, batch, payload int, duplicates float64) { + cases = append(cases, Case{ID: id, Kind: "database", Count: 5000, BatchSize: batch, PayloadBytes: payload, DuplicateFraction: duplicates, Repetitions: 3, PayloadProfile: "varied"}) + } + for _, batch := range []int{1, 10, 50, 100, 500, 1000} { + db(fmt.Sprintf("db-batch-%d", batch), batch, 256, 0) + } + for _, payload := range []int{1024, 16384} { + db(fmt.Sprintf("db-payload-%d", payload), 100, payload, 0) + } + for _, duplicate := range []int{10, 50, 90} { + db(fmt.Sprintf("db-duplicates-%d", duplicate), 100, 256, float64(duplicate)/100) + } + base := Case{Kind: "pipeline", Pattern: "steady", PayloadProfile: "varied", Count: 10000, BatchSize: 100, PayloadBytes: 256, Rate: 1000, Concurrency: 32, Repetitions: 3, Window: 10 * time.Second, Warmup: 2 * time.Second, Drain: 30 * time.Second, Poll: 50 * time.Millisecond} + for _, batch := range []int{1, 10, 100} { + c := base + c.ID = fmt.Sprintf("pipeline-batch-%d", batch) + c.BatchSize = batch + cases = append(cases, c) + } + for _, rate := range []int{100, 5000, 10000} { + c := base + c.ID = fmt.Sprintf("pipeline-rate-%d", rate) + c.Rate = rate + c.Count = rate * 10 + cases = append(cases, c) + } + for _, payload := range []int{1024, 16384} { + c := base + c.ID = fmt.Sprintf("pipeline-payload-%d", payload) + c.PayloadBytes = payload + c.BatchSize = 10 + cases = append(cases, c) + } + c := base + c.ID = "pipeline-burst" + c.Pattern = "burst" + cases = append(cases, c) + for _, concurrency := range []int{8, 64} { + c := base + c.ID = fmt.Sprintf("pipeline-concurrency-%d", concurrency) + c.Concurrency = concurrency + c.BatchSize = 1 + cases = append(cases, c) + } + for _, recovery := range []string{"database", "consumer"} { + c := base + c.ID = "recovery-" + recovery + c.Kind = "recovery" + c.Recovery = recovery + c.Rate = 500 + c.Window = 15 * time.Second + c.Count = 7500 + c.FaultAt = 3 * time.Second + c.RestoreAt = 8 * time.Second + if recovery == "consumer" { + c.RestoreAt = 5 * time.Second + } + cases = append(cases, c) + } + cases = append(cases, Case{ID: "recovery-outbox", Kind: "recovery", Recovery: "outbox", PayloadProfile: "varied", Count: 100, BatchSize: 100, PayloadBytes: 256, Repetitions: 3, RestoreAt: 8 * time.Second, Drain: 30 * time.Second, Poll: 50 * time.Millisecond}) + return cases +} +func smokeCases() []Case { + return []Case{ + {ID: "smoke-database", Kind: "database", PayloadProfile: "varied", Count: 100, BatchSize: 10, PayloadBytes: 256, Repetitions: 3}, + {ID: "smoke-pipeline", Kind: "pipeline", Pattern: "steady", PayloadProfile: "varied", Count: 10, Rate: 20, Concurrency: 2, BatchSize: 2, PayloadBytes: 256, Repetitions: 3, Window: 500 * time.Millisecond, Warmup: 100 * time.Millisecond, Drain: 5 * time.Second, Poll: 25 * time.Millisecond}, + } +} diff --git a/internal/benchmark/copy_reference.go b/internal/benchmark/copy_reference.go new file mode 100644 index 0000000..6b965ab --- /dev/null +++ b/internal/benchmark/copy_reference.go @@ -0,0 +1,44 @@ +package benchmark + +// Preserve the original staging/COPY/merge transaction as an explicit comparison. +// This does not delegate to the deployed writer: changing that default must not +// silently relabel a different algorithm as COPY in recorded experiments. +import ( + "context" + "fmt" + "github.com/feat7/ingestkit/internal/event" + "github.com/feat7/ingestkit/internal/persistence" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgxpool" +) + +func writeCopyMerge(ctx context.Context, pool *pgxpool.Pool, events []event.Envelope) (persistence.WriteResult, error) { + if len(events) == 0 { + return persistence.WriteResult{}, nil + } + tx, err := pool.Begin(ctx) + if err != nil { + return persistence.WriteResult{}, err + } + defer tx.Rollback(context.Background()) + _, err = tx.Exec(ctx, "CREATE TEMP TABLE ingestkit_stage (LIKE ingestkit.events INCLUDING DEFAULTS) ON COMMIT DROP") + if err != nil { + return persistence.WriteResult{}, err + } + columns := []string{"tenant_id", "event_id", "event_type", "occurred_at", "received_at", "payload"} + _, err = tx.CopyFrom(ctx, pgx.Identifier{"ingestkit_stage"}, columns, pgx.CopyFromSlice(len(events), func(i int) ([]any, error) { + e := events[i] + return []any{e.TenantID, e.EventID.String(), e.EventType, e.OccurredAt, e.ReceivedAt, []byte(e.Payload)}, nil + })) + if err != nil { + return persistence.WriteResult{}, fmt.Errorf("stage events: %w", err) + } + tag, err := tx.Exec(ctx, "INSERT INTO ingestkit.events (tenant_id,event_id,event_type,occurred_at,received_at,payload) SELECT tenant_id,event_id,event_type,occurred_at,received_at,payload FROM ingestkit_stage ON CONFLICT (tenant_id,event_id) DO NOTHING") + if err != nil { + return persistence.WriteResult{}, err + } + if err = tx.Commit(ctx); err != nil { + return persistence.WriteResult{}, err + } + return persistence.WriteResult{Inserted: tag.RowsAffected(), Duplicates: int64(len(events)) - tag.RowsAffected()}, nil +} diff --git a/internal/benchmark/database.go b/internal/benchmark/database.go index 8f6b22d..da33380 100644 --- a/internal/benchmark/database.go +++ b/internal/benchmark/database.go @@ -6,7 +6,7 @@ import ( "errors" "fmt" "github.com/feat7/ingestkit/internal/event" - "github.com/feat7/ingestkit/internal/persistence" + "github.com/google/uuid" "github.com/jackc/pgx/v5/pgxpool" "reflect" @@ -53,7 +53,7 @@ const insertPrefix = "INSERT INTO ingestkit.events(tenant_id,event_id,event_type func writeMethod(ctx context.Context, p *pgxpool.Pool, method string, es []event.Envelope) (int64, error) { if method == "copy-merge" { - r, e := persistence.NewEventStore(p).WriteBatch(ctx, es) + r, e := writeCopyMerge(ctx, p, es) return r.Inserted, e } if method == "insert" { @@ -121,7 +121,7 @@ func verifyDatabase(ctx context.Context, p *pgxpool.Pool, tenant string, es []ev return nil } func RunDatabase(ctx context.Context, c DatabaseConfig) (DatabaseReport, error) { - r := DatabaseReport{Kind: "database", Workload: c.Workload, BatchSize: c.BatchSize, Repetitions: c.Repetitions, Notes: []string{"Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", "Single INSERT commits each row; batch INSERT and production COPY/merge commit each batch. Same table, indexes and conflict policy.", "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json."}} + r := DatabaseReport{Kind: "database", Workload: c.Workload, BatchSize: c.BatchSize, Repetitions: c.Repetitions, Notes: []string{"Generation, dataset reset, warm-up and exact ID/payload verification excluded from elapsed time.", "Single INSERT commits each row; batch INSERT and reference COPY/merge commit each batch. Same table, indexes and conflict policy.", "BatchNS records client-observed calls; single INSERT calls contain one row. Durability settings are captured in manifest.json."}} if c.Pool == nil || c.BatchSize <= 0 || c.BatchSize > 1000 || c.Repetitions < 3 { return r, errors.New("pool, batch size 1..1000 and at least three repetitions required") } diff --git a/internal/benchmark/journal.go b/internal/benchmark/journal.go new file mode 100644 index 0000000..ca23a42 --- /dev/null +++ b/internal/benchmark/journal.go @@ -0,0 +1,225 @@ +package benchmark + +import ( + "context" + "crypto/sha256" + "encoding/hex" + "encoding/json" + "errors" + "fmt" + "os" + "os/exec" + "path/filepath" + "reflect" + "slices" + "strings" +) + +type StudyIdentity struct { + SourceSHA, SourceFingerprint, ControlsFingerprint, ImagesFingerprint, ConfigFingerprint, Mode string + Seed int64 + SourceDirty bool +} +type CaseProgress struct { + Status string + Attempt int + CompletedRepetitions []int + Artifact ArtifactRef + Summary json.RawMessage + History []CaseAttempt + ErrorClass string +} +type StudyJournal struct { + Status string + ExecutionAttempts int + MetadataArtifacts []ArtifactRef + ManifestFiles []string + Resources []ArtifactRef + Schema int + Identity StudyIdentity + RunNamespace string + Cases map[string]CaseProgress +} + +func (j StudyJournal) Compatible(identity StudyIdentity) error { + if j.Schema != 1 { + return errors.New("unsupported study journal schema") + } + differences := []string{} + for _, field := range []struct { + name string + before, after any + }{{"revision", j.Identity.SourceSHA, identity.SourceSHA}, {"source", j.Identity.SourceFingerprint, identity.SourceFingerprint}, {"controls", j.Identity.ControlsFingerprint, identity.ControlsFingerprint}, {"images", j.Identity.ImagesFingerprint, identity.ImagesFingerprint}, {"runtime", j.Identity.ConfigFingerprint, identity.ConfigFingerprint}, {"seed", j.Identity.Seed, identity.Seed}, {"mode", j.Identity.Mode, identity.Mode}, {"dirty status", j.Identity.SourceDirty, identity.SourceDirty}} { + if !reflect.DeepEqual(field.before, field.after) { + differences = append(differences, field.name) + } + } + if len(differences) > 0 { + return fmt.Errorf("study identity differs (%s); use the original inputs or a new output directory", strings.Join(differences, ", ")) + } + return nil +} + +func fingerprint(value any) string { + raw, _ := json.Marshal(value) + sum := sha256.Sum256(raw) + return hex.EncodeToString(sum[:]) +} +func gitBytes(ctx context.Context, root string, args ...string) ([]byte, error) { + cmd := exec.CommandContext(ctx, "git", args...) + cmd.Dir = root + raw, e := cmd.Output() + if e != nil { + return nil, errors.New("cannot inspect study source checkout") + } + return raw, nil +} +func sourceIdentity(ctx context.Context, root, out string) (sha, signature string, dirty bool, result error) { + exclusion := []string{"--", "."} + if relative, e := filepath.Rel(root, out); e == nil && filepath.IsLocal(relative) && relative != "." { + exclusion = append(exclusion, ":(exclude)"+filepath.ToSlash(relative)) + } + raw, e := gitBytes(ctx, root, "rev-parse", "HEAD") + if e != nil { + return "", "", false, e + } + sha = strings.TrimSpace(string(raw)) + args := append([]string{"status", "--porcelain", "-z", "--untracked-files=all"}, exclusion...) + raw, e = gitBytes(ctx, root, args...) + if e != nil { + return "", "", false, e + } + dirty = len(raw) > 0 + args = append([]string{"ls-files", "-z", "--cached", "--others", "--exclude-standard"}, exclusion...) + raw, e = gitBytes(ctx, root, args...) + if e != nil { + return "", "", false, e + } + names := strings.Split(strings.TrimRight(string(raw), "\x00"), "\x00") + slices.Sort(names) + names = slices.Compact(names) + type sourceFile struct{ Name, Mode, Digest string } + files := []sourceFile{} + for _, name := range names { + if name == "" { + continue + } + path := filepath.Join(root, name) + info, e := os.Lstat(path) + if e != nil { + return "", "", false, errors.New("source changed during fingerprinting") + } + var data []byte + if info.Mode()&os.ModeSymlink != 0 { + target, e := os.Readlink(path) + if e != nil { + return "", "", false, e + } + data = []byte(target) + } else if info.Mode().IsRegular() { + data, e = os.ReadFile(path) + if e != nil { + return "", "", false, e + } + } else { + return "", "", false, errors.New("unsupported study source file") + } + sum := sha256.Sum256(data) + files = append(files, sourceFile{name, info.Mode().String(), hex.EncodeToString(sum[:])}) + } + return sha, fingerprint(files), dirty, nil +} +func runtimeFingerprint(m Manifest) string { + host := map[string]string{} + for _, key := range []string{"go", "os", "architecture", "generator_logical_cpus", "kernel", "docker_vm", "memory_bytes", "os_version", "docker", "compose"} { + host[key] = m.Host[key] + } + // cpuinfo may include changing CPU MHz on Linux; model/architecture and VM + // allocation are enough for this identity while full host evidence is retained. + if m.Host["os"] == "darwin" { + host["cpu"] = m.Host["cpu"] + } else { + stable := []string{} + for _, line := range strings.Split(m.Host["cpu"], "\n") { + key, value, ok := strings.Cut(line, ":") + key = strings.TrimSpace(key) + if ok && (key == "model name" || key == "Hardware" || key == "CPU architecture" || key == "CPU part") { + stable = append(stable, key+":"+strings.TrimSpace(value)) + } + } + slices.Sort(stable) + host["cpu"] = strings.Join(slices.Compact(stable), "\n") + } + return fingerprint(struct { + Settings map[string]any + Database map[string]string + Topics string + Host map[string]string + }{m.Settings, m.Database, m.TopicConfiguration, host}) +} +func imageFingerprint(ctx context.Context, m Manifest) (string, error) { + ids := []string{} + for _, line := range strings.Split(m.Images, "\n") { + fields := strings.Fields(line) + if len(fields) > 0 { + ids = append(ids, fields[0]) + } + } + if len(ids) == 0 { + return "", errors.New("missing measured images") + } + args := append([]string{"image", "inspect"}, ids...) + raw, e := exec.CommandContext(ctx, "docker", args...).Output() + if e != nil { + return "", errors.New("cannot inspect image identity") + } + return canonicalImageFingerprint(raw) +} +func canonicalImageFingerprint(raw []byte) (string, error) { + var images []struct { + Architecture, Os, Variant string + Config map[string]any + RootFS struct{ Layers []string } + } + if json.Unmarshal(raw, &images) != nil || len(images) == 0 { + return "", errors.New("invalid image identity inspection") + } + signatures := []string{} + for _, image := range images { + if len(image.RootFS.Layers) == 0 || image.Config == nil { + return "", errors.New("incomplete image identity") + } + // Compose creates a distinct config ID solely for each project's label. + // Keep all content layers and runtime configuration, excluding that one label. + if labels, ok := image.Config["Labels"].(map[string]any); ok { + delete(labels, "com.docker.compose.project") + } + signatures = append(signatures, fingerprint(struct { + Architecture, OS, Variant string + Layers []string + Config map[string]any + }{image.Architecture, image.Os, image.Variant, image.RootFS.Layers, image.Config})) + } + slices.Sort(signatures) + return fingerprint(signatures), nil +} + +func readJournal(path string) (StudyJournal, error) { + var j StudyJournal + info, e := os.Lstat(path) + if e != nil { + return j, e + } + if !info.Mode().IsRegular() || info.Size() > 8<<20 { + return j, errors.New("invalid study journal file") + } + raw, e := os.ReadFile(path) + if e != nil { + return j, e + } + e = json.Unmarshal(raw, &j) + if e != nil { + return j, errors.New("invalid study journal JSON") + } + return j, nil +} diff --git a/internal/benchmark/manifest.go b/internal/benchmark/manifest.go index 7fb1647..fa9516d 100644 --- a/internal/benchmark/manifest.go +++ b/internal/benchmark/manifest.go @@ -2,19 +2,27 @@ package benchmark import ( "context" + "crypto/tls" "encoding/json" + "errors" "fmt" + "github.com/feat7/ingestkit/internal/persistence" "github.com/feat7/ingestkit/internal/runenv" "github.com/jackc/pgx/v5/pgxpool" + "net" + "net/http" "os" "os/exec" "path/filepath" + "regexp" "runtime" + "strconv" "strings" "time" ) type Manifest struct { + BrokerFsyncBypass bool `json:"broker_fsync_bypass"` CapturedAt time.Time `json:"captured_at"` SourceSHA string `json:"source_sha"` SourceDirty bool `json:"source_dirty"` @@ -33,7 +41,70 @@ func localOutput(ctx context.Context, name string, args ...string) string { return strings.TrimSpace(string(out)) } func CaptureManifest(ctx context.Context, s *runenv.Stack, p *pgxpool.Pool) (Manifest, error) { - m := Manifest{CapturedAt: time.Now().UTC(), SourceSHA: localOutput(ctx, "git", "rev-parse", "HEAD"), SourceDirty: localOutput(ctx, "git", "status", "--porcelain", "--untracked-files=no") != "", Host: map[string]string{"go": runtime.Version(), "os": runtime.GOOS, "architecture": runtime.GOARCH, "generator_logical_cpus": fmt.Sprint(runtime.NumCPU()), "kernel": localOutput(ctx, "uname", "-a"), "disk_space": localOutput(ctx, "df", "-k", "."), "docker": localOutput(ctx, "docker", "version", "--format", "{{json .Server}}"), "compose": localOutput(ctx, "docker", "compose", "version"), "docker_vm": localOutput(ctx, "docker", "info", "--format", "CPUs={{.NCPU}} MemoryBytes={{.MemTotal}} StorageDriver={{.Driver}} Kernel={{.KernelVersion}} OS={{.OperatingSystem}}")}, Database: map[string]string{}, Settings: map[string]any{"api_rate_limit_rps": 10000, "producer_buffer_bytes": 67108864, "producer_buffer_records": 1000, "producer_ack": "all ISR; idempotent", "publish_timeout_ns": int64(5 * time.Second), "consumer_max_poll_records": 500, "consumer_processing_deadline_ns": int64(15 * time.Second), "consumer_session_timeout_ns": int64(10 * time.Second), "consumer_rebalance_timeout_ns": int64(60 * time.Second), "redpanda_smp": 1, "redpanda_memory": "512M", "topology": "one broker; one database; one API; one consumer"}, Caveats: []string{"Local Docker VM; generator and SQL observer run on the same physical host as services and compete for resources.", "Single broker, replication factor one. Disk-flush configuration does not establish tolerance of broker disk/host loss.", "Topic and database settings are captured below. Source defaults at the recorded revision define remaining client settings.", "Host filesystem reported by df is not a calibrated Docker VM disk specification. No dedicated disk latency or cloud cost measurement.", "Resource samples are coarse Docker snapshots, not isolation or proof of a particular bottleneck."}} + m := Manifest{CapturedAt: time.Now().UTC(), SourceSHA: localOutput(ctx, "git", "rev-parse", "HEAD"), SourceDirty: localOutput(ctx, "git", "status", "--porcelain", "--untracked-files=all") != "", Host: map[string]string{"go": runtime.Version(), "os": runtime.GOOS, "architecture": runtime.GOARCH, "generator_logical_cpus": fmt.Sprint(runtime.NumCPU()), "kernel": localOutput(ctx, "uname", "-sr"), "disk_space": localOutput(ctx, "df", "-k", "."), "docker": localOutput(ctx, "docker", "version", "--format", "{{json .Server}}"), "compose": localOutput(ctx, "docker", "compose", "version"), "docker_vm": localOutput(ctx, "docker", "info", "--format", "CPUs={{.NCPU}} MemoryBytes={{.MemTotal}} StorageDriver={{.Driver}} Kernel={{.KernelVersion}} OS={{.OperatingSystem}}")}, Database: map[string]string{}, Settings: map[string]any{"producer_buffer_bytes": 67108864, "producer_buffer_records": 1000, "producer_ack": "all ISR; idempotent", "publish_timeout_ns": int64(5 * time.Second), "consumer_max_poll_records": 500, "consumer_processing_deadline_ns": int64(15 * time.Second), "consumer_session_timeout_ns": int64(10 * time.Second), "consumer_rebalance_timeout_ns": int64(60 * time.Second), "topology": "one broker; one database; one API; one consumer"}, Caveats: []string{"Local Docker VM; generator and SQL observer run on the same physical host as services and compete for resources.", "Single broker, replication factor one. Disk-flush configuration does not establish tolerance of broker disk/host loss.", "Topic and database settings are captured below. Source defaults at the recorded revision define remaining client settings.", "Host filesystem reported by df is not a calibrated Docker VM disk specification. No dedicated disk latency or cloud cost measurement.", "Resource samples are coarse Docker snapshots, not isolation or proof of a particular bottleneck."}} + + // Topic write.caching does not reveal Seastar's process-wide fsync bypass. + // Read the actual broker rather than inferring it from a Compose mode name. + command := `for p in /proc/[0-9]*; do case "$(readlink "$p/exe" 2>/dev/null)" in */redpanda) cat "$p/cmdline"; exit 0;; esac; done; exit 1` + rawArgs, err := s.Compose(ctx, "exec", "-T", "redpanda", "sh", "-c", command) + if err != nil { + return m, fmt.Errorf("inspect broker fsync setting: %w", err) + } + resources, err := brokerResources(rawArgs) + if err != nil { + return m, err + } + for key, value := range resources { + m.Settings[key] = value + } + apiSettings, err := captureAPISettings(ctx, s) + if err != nil { + return m, err + } + for key, value := range apiSettings { + m.Settings[key] = value + } + m.Settings["api_tls"] = strings.HasPrefix(s.APIURL, "https://") + if m.Settings["api_tls"] == true { + m.Settings["api_route"] = "https_gateway" + } else { + m.Settings["api_route"] = "direct_http" + } + client, e := s.HTTPClient() + if e == nil { + defer client.CloseIdleConnections() + } + if e != nil { + return m, e + } + probeCtx, probeEnd := context.WithTimeout(ctx, 3*time.Second) + req, e := http.NewRequestWithContext(probeCtx, "GET", s.APIURL+"/health", nil) + if e != nil { + probeEnd() + return m, errors.New("invalid API probe URL") + } + response, e := client.Do(req) + probeEnd() + if e != nil { + return m, errors.New("cannot verify API transport") + } + response.Body.Close() + m.Settings["http_protocol"] = response.Proto + if response.TLS != nil { + m.Settings["tls_version"] = tls.VersionName(response.TLS.Version) + } + m.Settings["database_write_method"] = persistence.WriteMethod + m.Settings["producer_compression_preference"] = "snappy, none (pinned franz-go source default)" + m.Settings["http_request_timeout_ns"] = int64(8 * time.Second) + m.Settings["visibility_clock"] = "API receipt and PostgreSQL observation share the deployment clock; host time schedules load" + m.Settings["provenance"] = "CPU/memory/fsync from broker process; API rate/log/port from allowlisted container environment; remaining source defaults at source_sha" + m.BrokerFsyncBypass, err = brokerFsyncBypass(rawArgs) + if err != nil { + return m, err + } + if m.BrokerFsyncBypass { + return m, errors.New("refusing benchmark: running broker bypasses fsync") + } if runtime.GOOS == "darwin" { m.Host["cpu"] = localOutput(ctx, "sysctl", "-n", "machdep.cpu.brand_string") m.Host["memory_bytes"] = localOutput(ctx, "sysctl", "-n", "hw.memsize") @@ -125,3 +196,127 @@ func SampleResources(ctx context.Context, s *runenv.Stack) <-chan []ResourceSamp }() return done } + +// Fail closed if the effective argument is absent, malformed or ambiguous; +// silently filling in false would make an unverified manifest look durable. +func brokerFsyncBypass(raw string) (bool, error) { + args := strings.Split(raw, "\x00") + seen := false + value := false + for i := 0; i < len(args); i++ { + arg := args[i] + var text string + if arg == "--unsafe-bypass-fsync" { + i++ + if i >= len(args) { + return false, errors.New("broker fsync argument has no value") + } + text = args[i] + } else if strings.HasPrefix(arg, "--unsafe-bypass-fsync=") { + text = strings.TrimPrefix(arg, "--unsafe-bypass-fsync=") + } else { + continue + } + if seen { + return false, errors.New("ambiguous broker fsync arguments") + } + seen = true + var err error + value, err = strconv.ParseBool(text) + if err != nil { + return false, errors.New("invalid broker fsync argument") + } + } + if !seen { + return false, errors.New("could not confirm explicit broker fsync bypass setting") + } + return value, nil +} + +func runtimeFlag(raw, name string) (string, error) { + args := strings.Split(strings.TrimRight(raw, "\x00"), "\x00") + values := []string{} + for i, arg := range args { + if strings.HasPrefix(arg, name+"=") { + values = append(values, strings.TrimPrefix(arg, name+"=")) + } + if arg == name && i+1 < len(args) { + values = append(values, args[i+1]) + } + } + if len(values) != 1 || values[0] == "" { + return "", errors.New("missing or ambiguous broker runtime flag " + name) + } + return values[0], nil +} + +var brokerMemory = regexp.MustCompile(`^[1-9][0-9]*(?:[KMGTP](?:i?B)?)?$`) + +func brokerResources(raw string) (map[string]any, error) { + memory, e := runtimeFlag(raw, "--memory") + if e != nil { + return nil, e + } + if !brokerMemory.MatchString(memory) { + return nil, errors.New("invalid broker memory runtime flag") + } + cpu, e := runtimeFlag(raw, "--smp") + if e != nil { + return nil, e + } + cores, e := strconv.Atoi(cpu) + if e != nil || cores <= 0 { + return nil, errors.New("invalid broker smp runtime flag") + } + return map[string]any{"redpanda_memory": memory, "redpanda_smp": cores}, nil +} +func safeAPISettings(raw string) (map[string]any, error) { + var environment []string + if json.Unmarshal([]byte(raw), &environment) != nil { + return nil, errors.New("cannot read runtime API settings") + } + selected := map[string]string{} + for _, assignment := range environment { + key, value, ok := strings.Cut(assignment, "=") + if ok && (key == "RATE_LIMIT_RPS" || key == "HTTP_ADDR" || key == "LOG_LEVEL") { + if _, exists := selected[key]; exists { + return nil, errors.New("duplicate runtime API control") + } + selected[key] = value + } + } + rate, e := strconv.Atoi(selected["RATE_LIMIT_RPS"]) + if e != nil || rate <= 0 { + return nil, errors.New("invalid runtime RATE_LIMIT_RPS") + } + _, port, e := net.SplitHostPort(selected["HTTP_ADDR"]) + if e != nil { + return nil, errors.New("invalid runtime HTTP_ADDR") + } + number, e := strconv.Atoi(port) + if e != nil || number <= 0 || number > 65535 { + return nil, errors.New("invalid runtime HTTP_ADDR port") + } + level := selected["LOG_LEVEL"] + if level != "debug" && level != "info" && level != "warn" && level != "error" { + return nil, errors.New("invalid runtime LOG_LEVEL") + } + return map[string]any{"api_rate_limit_rps": rate, "api_internal_port": number, "api_log_level": level}, nil +} +func captureAPISettings(ctx context.Context, s *runenv.Stack) (map[string]any, error) { + ids, e := s.Compose(ctx, "ps", "-q", "api") + if e != nil { + return nil, e + } + fields := strings.Fields(ids) + if len(fields) != 1 { + return nil, errors.New("API runtime container is unavailable") + } + // The secret-bearing inspection stays in memory and is never formatted into + // an error, log or artifact. Only parsed allowlisted controls leave this call. + raw, e := exec.CommandContext(ctx, "docker", "inspect", "--format", "{{json .Config.Env}}", fields[0]).Output() + if e != nil { + return nil, errors.New("cannot inspect runtime API controls") + } + return safeAPISettings(string(raw)) +} diff --git a/internal/benchmark/manifest_test.go b/internal/benchmark/manifest_test.go index d2df84d..9461a2a 100644 --- a/internal/benchmark/manifest_test.go +++ b/internal/benchmark/manifest_test.go @@ -12,3 +12,52 @@ func TestManifestRedactsSecrets(t *testing.T) { require.NotContains(t, string(raw), "secret-token") require.NotContains(t, string(raw), "postgres://") } + +func TestBrokerFsyncStateRequiresAnExplicitRuntimeFlag(t *testing.T) { + for _, tc := range []struct { + raw string + want bool + bad bool + }{ + {"redpanda\x00--unsafe-bypass-fsync=true\x00", true, false}, + {"redpanda\x00--unsafe-bypass-fsync=false\x00", false, false}, + {"redpanda\x00--unsafe-bypass-fsync\x000\x00", false, false}, + {"redpanda\x00--unsafe-bypass-fsync=maybe\x00", false, true}, + {"redpanda\x00", false, true}, + {"redpanda\x00--unsafe-bypass-fsync=false\x00--unsafe-bypass-fsync=true\x00", false, true}, + } { + got, e := brokerFsyncBypass(tc.raw) + if tc.bad { + require.Error(t, e) + } else { + require.NoError(t, e) + require.Equal(t, tc.want, got) + } + } +} + +func TestRuntimeResourceSettingsRequireActualFlags(t *testing.T) { + settings, e := brokerResources("redpanda\x00--smp=1\x00--memory\x001G\x00") + require.NoError(t, e) + require.Equal(t, 1, settings["redpanda_smp"]) + require.Equal(t, "1G", settings["redpanda_memory"]) + for _, raw := range []string{"redpanda\x00", "redpanda\x00--smp=1\x00--smp=2\x00--memory=1G\x00"} { + _, e = brokerResources(raw) + require.Error(t, e) + } +} +func TestRuntimeAPISettingsAreAllowlisted(t *testing.T) { + raw, e := json.Marshal([]string{"API_KEYS={\"private-api-key\":\"default\"}", "DATABASE_URL=postgres://private:password@host/db", "RATE_LIMIT_RPS=321", "HTTP_ADDR=:8080", "LOG_LEVEL=debug"}) + require.NoError(t, e) + settings, e := safeAPISettings(string(raw)) + require.NoError(t, e) + require.Equal(t, 321, settings["api_rate_limit_rps"]) + encoded, e := json.Marshal(settings) + require.NoError(t, e) + for _, secret := range []string{"private-api-key", "private:password", "postgres://", "API_KEYS"} { + require.NotContains(t, string(encoded), secret) + } + _, e = safeAPISettings(`["RATE_LIMIT_RPS=private-api-key"]`) + require.Error(t, e) + require.NotContains(t, e.Error(), "private-api-key") +} diff --git a/internal/benchmark/observer.go b/internal/benchmark/observer.go new file mode 100644 index 0000000..5afbc6e --- /dev/null +++ b/internal/benchmark/observer.go @@ -0,0 +1,127 @@ +package benchmark + +import ( + "context" + "errors" + "sync" + "time" + + "github.com/google/uuid" + "github.com/jackc/pgx/v5" + "github.com/jackc/pgx/v5/pgxpool" +) + +// PendingObserver owns one session and removes an ID only after seeing its +// committed target row. Timestamps never act as a commit-order cursor. +type PendingObserver struct { + mu sync.Mutex + conn *pgxpool.Conn + table, tenant string + queries, queryNS int64 +} + +func NewPendingObserver(ctx context.Context, pool *pgxpool.Pool, tenant string, ids []uuid.UUID) (*PendingObserver, error) { + conn, err := pool.Acquire(ctx) + if err != nil { + return nil, err + } + o := &PendingObserver{conn: conn, tenant: tenant, table: "ingestkit_pending_" + uuid.NewString()} + fail := func(err error) (*PendingObserver, error) { + end, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + raw := conn.Hijack() + return nil, errors.Join(err, raw.Close(end)) + } + if _, err = conn.Exec(ctx, "CREATE TEMP TABLE "+pgx.Identifier{o.table}.Sanitize()+"(event_id uuid PRIMARY KEY)"); err != nil { + return fail(err) + } + unique := make([]uuid.UUID, 0, len(ids)) + seen := map[uuid.UUID]bool{} + for _, id := range ids { + if !seen[id] { + seen[id] = true + unique = append(unique, id) + } + } + if _, err = conn.CopyFrom(ctx, pgx.Identifier{o.table}, []string{"event_id"}, pgx.CopyFromSlice(len(unique), func(i int) ([]any, error) { return []any{unique[i].String()}, nil })); err != nil { + return fail(err) + } + return o, nil +} +func (o *PendingObserver) Observe(ctx context.Context) (out []StoredObservation, result error) { + o.mu.Lock() + defer o.mu.Unlock() + if o.conn == nil { + return nil, errors.New("observer is closed") + } + start := time.Now() + defer func() { o.queryNS += time.Since(start).Nanoseconds() }() + o.queries++ + tx, err := o.conn.Begin(ctx) + if err != nil { + return nil, err + } + defer func() { + end, cancel := context.WithTimeout(context.Background(), time.Second) + defer cancel() + _ = tx.Rollback(end) + }() + o.queries++ + rows, err := tx.Query(ctx, "DELETE FROM "+pgx.Identifier{o.table}.Sanitize()+" p USING ingestkit.events e WHERE e.tenant_id=$1 AND e.event_id=p.event_id RETURNING e.event_id,e.received_at", o.tenant) + if err != nil { + return nil, err + } + for rows.Next() { + var v StoredObservation + if err = rows.Scan(&v.ID, &v.ReceivedAt); err != nil { + rows.Close() + return nil, err + } + out = append(out, v) + } + err = rows.Err() + rows.Close() + if err != nil { + return nil, err + } + if len(out) > 0 { + var clock time.Time + o.queries++ + if err = tx.QueryRow(ctx, "SELECT clock_timestamp()").Scan(&clock); err != nil { + return nil, err + } + for i := range out { + out[i].ObservedAt = clock + } + } + o.queries++ + if err = tx.Commit(ctx); err != nil { + return nil, err + } + return out, nil +} +func (o *PendingObserver) Stats() (int64, int64) { + o.mu.Lock() + defer o.mu.Unlock() + return o.queries, o.queryNS +} +func (o *PendingObserver) Close(ctx context.Context) error { + o.mu.Lock() + defer o.mu.Unlock() + if o.conn == nil { + return nil + } + conn := o.conn + o.conn = nil + _, err := conn.Exec(ctx, "DROP TABLE "+pgx.Identifier{o.table}.Sanitize()) + if err != nil { + raw := conn.Hijack() + end, cancel := context.WithTimeout(context.Background(), 2*time.Second) + defer cancel() + // Closing the session destroys its temp table even if cancellation made + // DROP impossible. Only a failed disposal is a cleanup error. + return raw.Close(end) + } + conn.Release() + return nil +} diff --git a/internal/benchmark/observer_integration_test.go b/internal/benchmark/observer_integration_test.go new file mode 100644 index 0000000..5ce2f26 --- /dev/null +++ b/internal/benchmark/observer_integration_test.go @@ -0,0 +1,133 @@ +//go:build integration + +package benchmark + +import ( + "context" + "github.com/feat7/ingestkit/internal/event" + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgxpool" + "github.com/stretchr/testify/require" + "os" + "testing" + "time" +) + +func observerPool(t *testing.T) *pgxpool.Pool { + t.Helper() + dsn := os.Getenv("INGESTKIT_TEST_DATABASE_URL") + require.NotEmpty(t, dsn, "owned integration database required") + p, e := pgxpool.New(context.Background(), dsn) + require.NoError(t, e) + t.Cleanup(p.Close) + return p +} +func TestObserverSeesOutOfOrderCommits(t *testing.T) { + ctx := context.Background() + p := observerPool(t) + tenant := "observer-" + uuid.NewString() + a, b := uuid.New(), uuid.New() + defer p.Exec(ctx, "DELETE FROM ingestkit.events WHERE tenant_id=$1", tenant) + tx, e := p.Begin(ctx) + require.NoError(t, e) + defer tx.Rollback(ctx) + _, e = tx.Exec(ctx, "INSERT INTO ingestkit.events(tenant_id,event_id,event_type,occurred_at,received_at,payload) VALUES($1,$2,'observer',now(),now()-interval '1 second','{}')", tenant, a.String()) + require.NoError(t, e) + _, e = p.Exec(ctx, "INSERT INTO ingestkit.events(tenant_id,event_id,event_type,occurred_at,received_at,payload) VALUES($1,$2,'observer',now(),now(),'{}')", tenant, b.String()) + require.NoError(t, e) + observer, e := NewPendingObserver(ctx, p, tenant, []uuid.UUID{a, b}) + require.NoError(t, e) + defer observer.Close(ctx) + rows, e := observer.Observe(ctx) + require.NoError(t, e) + require.Len(t, rows, 1) + require.Equal(t, b, rows[0].ID) + require.False(t, rows[0].ObservedAt.IsZero()) + require.NoError(t, tx.Commit(ctx)) + rows, e = observer.Observe(ctx) + require.NoError(t, e) + require.Len(t, rows, 1) + require.Equal(t, a, rows[0].ID) + rows, e = observer.Observe(ctx) + require.NoError(t, e) + require.Empty(t, rows) +} +func TestObserverCancellationReleasesConnection(t *testing.T) { + ctx := context.Background() + p := observerPool(t) + observer, e := NewPendingObserver(ctx, p, "none", []uuid.UUID{uuid.New()}) + require.NoError(t, e) + canceled, cancel := context.WithCancel(ctx) + cancel() + _, e = observer.Observe(canceled) + require.Error(t, e) + end, stop := context.WithTimeout(ctx, 3*time.Second) + defer stop() + require.NoError(t, observer.Close(end)) + require.NoError(t, p.Ping(end)) + require.Zero(t, p.Stat().AcquiredConns()) +} +func TestIndependentReconciliationFindsMissingAndUnexpected(t *testing.T) { + ctx := context.Background() + p := observerPool(t) + tenant := "verify-" + uuid.NewString() + defer p.Exec(ctx, "DELETE FROM ingestkit.events WHERE tenant_id=$1", tenant) + expected, e := Workload(WorkloadConfig{Namespace: tenant, PayloadProfile: "varied", Count: 2, PayloadBytes: 256}) + require.NoError(t, e) + for i := range expected { + expected[i].TenantID = tenant + } + _, e = writeMethod(ctx, p, "batch-insert", expected[:1]) + require.NoError(t, e) + stranger := expected[0] + stranger.EventID = uuid.New() + _, e = writeMethod(ctx, p, "batch-insert", []event.Envelope{stranger}) + require.NoError(t, e) + required := []uuid.UUID{expected[0].EventID, expected[1].EventID} + v, e := VerifyPipelineRows(ctx, p, tenant, expected, required) + require.Error(t, e) + require.Equal(t, 1, v.Missing) + require.Equal(t, 1, v.Unexpected) + _, e = p.Exec(ctx, "DELETE FROM ingestkit.events WHERE tenant_id=$1 AND event_id=$2", tenant, stranger.EventID.String()) + require.NoError(t, e) + _, e = writeMethod(ctx, p, "batch-insert", expected[1:]) + require.NoError(t, e) + v, e = VerifyPipelineRows(ctx, p, tenant, expected, required) + require.NoError(t, e) + require.Len(t, v.StoredIDs, 2) + _, e = p.Exec(ctx, "UPDATE ingestkit.events SET payload='{\"changed\":true}' WHERE tenant_id=$1 AND event_id=$2", tenant, expected[0].EventID.String()) + require.NoError(t, e) + v, e = VerifyPipelineRows(ctx, p, tenant, expected, required) + require.Error(t, e) + require.Equal(t, 1, v.ContentMismatch) +} + +func TestOutboxVerificationPreservesOtherOrderNamespaces(t *testing.T) { + ctx := context.Background() + p := observerPool(t) + tenant := "outbox-scope-" + uuid.NewString() + defer p.Exec(ctx, "DELETE FROM ingestkit.events WHERE tenant_id=$1", tenant) + events, e := Workload(WorkloadConfig{Count: 1, PayloadBytes: 128}) + require.NoError(t, e) + events[0].TenantID = tenant + events[0].EventType = "order_completed" + events[0].Payload = []byte(`{"order_id":"wanted/0","amount_cents":1}`) + other := events[0] + other.EventID = uuid.New() + other.Payload = []byte(`{"order_id":"unrelated/0","amount_cents":2}`) + _, e = writeMethod(ctx, p, "batch-insert", append(events, other)) + require.NoError(t, e) + v, e := VerifyOutboxRows(ctx, p, tenant, "wanted/", events, eventIDs(events)) + require.NoError(t, e) + require.Equal(t, eventIDs(events), v.StoredIDs) + stranger := events[0] + stranger.EventID = uuid.New() + _, e = writeMethod(ctx, p, "batch-insert", []event.Envelope{stranger}) + require.NoError(t, e) + v, e = VerifyOutboxRows(ctx, p, tenant, "wanted/", events, eventIDs(events)) + require.Error(t, e) + require.Equal(t, 1, v.Unexpected) + var n int + require.NoError(t, p.QueryRow(ctx, "SELECT count(*) FROM ingestkit.events WHERE tenant_id=$1 AND event_id=$2", tenant, other.EventID.String()).Scan(&n)) + require.Equal(t, 1, n) +} diff --git a/internal/benchmark/pipeline.go b/internal/benchmark/pipeline.go index 07809ed..acccd70 100644 --- a/internal/benchmark/pipeline.go +++ b/internal/benchmark/pipeline.go @@ -20,7 +20,14 @@ import ( "time" ) +var errObserverUnavailable = errors.New("observer temporarily unavailable") + type PipelineConfig struct { + ReconnectObserver bool + SampleStarted func(int, time.Time) + SampleFinished func(int) error + HTTPClient *http.Client + Namespace, PayloadProfile string Pool *pgxpool.Pool APIURL, APIKey, Tenant, Pattern string Seed int64 @@ -30,7 +37,7 @@ type PipelineConfig struct { // No credentials or connection strings are included in the serializable config. func PublicPipelineConfig(c PipelineConfig) map[string]any { - return map[string]any{"tenant": c.Tenant, "pattern": c.Pattern, "seed": c.Seed, "target_events_per_second": c.Rate, "concurrency": c.Concurrency, "http_batch_size": c.BatchSize, "payload_bytes": c.PayloadBytes, "repetitions": c.Repetitions, "window_ns": c.Duration.Nanoseconds(), "warmup_ns": c.Warmup.Nanoseconds(), "drain_deadline_ns": c.DrainDeadline.Nanoseconds(), "poll_interval_ns": c.PollInterval.Nanoseconds()} + return map[string]any{"observer_reconnect": c.ReconnectObserver, "namespace": c.Namespace, "payload_profile": c.PayloadProfile, "https": strings.HasPrefix(c.APIURL, "https://"), "tenant": c.Tenant, "pattern": c.Pattern, "seed": c.Seed, "target_events_per_second": c.Rate, "concurrency": c.Concurrency, "http_batch_size": c.BatchSize, "payload_bytes": c.PayloadBytes, "repetitions": c.Repetitions, "window_ns": c.Duration.Nanoseconds(), "warmup_ns": c.Warmup.Nanoseconds(), "drain_deadline_ns": c.DrainDeadline.Nanoseconds(), "poll_interval_ns": c.PollInterval.Nanoseconds()} } type Latency struct { @@ -50,12 +57,31 @@ func Percentiles(samples []int64) Latency { return Latency{at(.5), at(.95), at(.99)} } +type RequestObservation struct { + StartedNS, FinishedNS, ElapsedNS int64 + Events, Status int + Accepted, Ambiguous bool +} + type BacklogSample struct { - ElapsedNS int64 `json:"elapsed_ns"` - Accepted, Visible int + PendingAcknowledged int + ObservationAvailable, FinalVerification bool + ElapsedNS int64 `json:"elapsed_ns"` + Accepted, Visible int } type PipelineRun struct { - Repetition int `json:"repetition"` + started time.Time + ObserverOutages int + RequestSamples []RequestObservation `json:"request_samples"` + AttemptedInWindow, AttemptedAfterWindow, AcceptedInWindow, AcceptedAfterWindow int + ObserverPolls, ObserverQueries, ObserverQueryNS int64 + ObserverLatePolls, ObserverMaxGapNS int64 + ObservedEvents int + VerificationNS int64 + AmbiguousUnobserved, ContentMismatch int + Outcome string `json:"outcome"` + LimitReasons []string `json:"limit_reasons,omitempty"` + Repetition int `json:"repetition"` Planned, Attempted, Accepted, Persisted, Ambiguous, Rejected, GeneratorMissed, LateSchedules int Missing, Unexpected, DuplicateRows, AmbiguousPersisted, BacklogAtWindowEnd int WindowNS, ActiveNS, TotalNS, DrainNS, PollIntervalNS int64 @@ -113,10 +139,26 @@ func (r *PipelineRun) Reconcile() error { r.PersistedEPS = float64(r.Persisted) * 1e9 / float64(r.TotalNS) } if r.WindowNS > 0 { - r.AcceptedEPS = float64(r.Accepted) * 1e9 / float64(r.WindowNS) + r.AcceptedEPS = float64(r.AcceptedInWindow) * 1e9 / float64(r.WindowNS) + } + r.Correct = r.Missing == 0 && r.Unexpected == 0 && r.DuplicateRows == 0 && r.ContentMismatch == 0 && r.TotalNS > 0 + + r.AmbiguousUnobserved = len(ambiguous) - r.AmbiguousPersisted + r.LimitReasons = nil + for _, limit := range []struct { + count int + reason string + }{{r.GeneratorMissed, "generator_missed_events"}, {r.LateSchedules, "late_schedules"}, {r.Rejected, "http_rejections"}, {r.Ambiguous, "ambiguous_delivery"}, {r.AttemptedAfterWindow, "request_queue_tail"}, {r.AcceptedAfterWindow, "late_acknowledgements"}, {int(r.ObserverLatePolls), "observer_poll_delays"}, {r.ObserverOutages, "observer_unavailable"}} { + if limit.count > 0 { + r.LimitReasons = append(r.LimitReasons, limit.reason) + } + } + r.Outcome = "complete" + if len(r.LimitReasons) > 0 { + r.Outcome = "limited" } - r.Correct = r.Missing == 0 && r.Unexpected == 0 && r.DuplicateRows == 0 && r.TotalNS > 0 if !r.Correct { + r.Outcome = "failed" return fmt.Errorf("reconciliation: %d missing, %d unexpected, %d duplicate stored rows", r.Missing, r.Unexpected, r.DuplicateRows) } return nil @@ -131,12 +173,14 @@ type PipelineReport struct { type StoredObservation struct { ID uuid.UUID ReceivedAt time.Time + ObservedAt time.Time // SQL clock after the committed-row result has been read. } type sendResult struct { + Status int IDs []uuid.UUID Accepted, Ambiguous bool ElapsedNS int64 - Finished time.Time + Started, Finished time.Time } type sender func(context.Context, []uuid.UUID) sendResult type observer func(context.Context, []uuid.UUID) ([]StoredObservation, error) @@ -147,7 +191,7 @@ func runPipelineSample(ctx context.Context, c PipelineConfig, rep int, send send active = c.Duration / 4 } count := int(float64(c.Rate) * c.Duration.Seconds()) - es, e := Workload(WorkloadConfig{Seed: c.Seed + int64(rep), Count: count, PayloadBytes: c.PayloadBytes}) + es, e := Workload(WorkloadConfig{Namespace: c.Namespace, PayloadProfile: c.PayloadProfile, Seed: c.Seed + int64(rep), Count: count, PayloadBytes: c.PayloadBytes}) if e != nil { return r, e } @@ -167,13 +211,18 @@ func runPipelineSample(ctx context.Context, c PipelineConfig, rep int, send send at := time.Now() v := send(ctx, job) v.IDs = job - v.ElapsedNS = time.Since(at).Nanoseconds() + v.Started = at v.Finished = time.Now() + v.ElapsedNS = v.Finished.Sub(at).Nanoseconds() results <- v } }() } started := time.Now() + r.started = started + if c.SampleStarted != nil { + c.SampleStarted(rep, started) + } windowEnd := started.Add(c.Duration) scheduleDone := make(chan [2]int, 1) go func() { @@ -218,10 +267,30 @@ func runPipelineSample(ctx context.Context, c PipelineConfig, rep int, send send observedAt := map[uuid.UUID]time.Time{} // Every observation follows a completed SQL query on committed rows. The query // end minus received_at is an upper bound, including polling and query delay. + var previousPoll time.Time sample := func() error { + pollStarted := time.Now() + if !previousPoll.IsZero() { + gap := pollStarted.Sub(previousPoll).Nanoseconds() + r.ObserverMaxGapNS = max(r.ObserverMaxGapNS, gap) + if gap > int64(2*c.PollInterval) { + r.ObserverLatePolls++ + } + } + previousPoll = pollStarted + r.ObserverPolls++ + queryStarted := time.Now() found, e := observe(ctx, ids) + r.ObserverQueryNS += time.Since(queryStarted).Nanoseconds() + + available := true if e != nil { - return e + if c.ReconnectObserver && errors.Is(e, errObserverUnavailable) { + r.ObserverOutages++ + available = false + } else { + return e + } } now := time.Now() for _, v := range found { @@ -229,14 +298,18 @@ func runPipelineSample(ctx context.Context, c PipelineConfig, rep int, send send seen[v.ID] = true observedAt[v.ID] = now r.StoredIDs = append(r.StoredIDs, v.ID) - lat := now.Sub(v.ReceivedAt).Nanoseconds() + observedClock := v.ObservedAt + if observedClock.IsZero() { + observedClock = now + } // Injected observers may share the host clock. + lat := observedClock.Sub(v.ReceivedAt).Nanoseconds() if lat < 0 { return errors.New("negative visibility latency: clocks disagree") } r.VisibilityNS = append(r.VisibilityNS, lat) } } - r.Backlog = append(r.Backlog, BacklogSample{ElapsedNS: now.Sub(started).Nanoseconds(), Accepted: len(acceptedAt), Visible: len(seen)}) + r.Backlog = append(r.Backlog, BacklogSample{ElapsedNS: now.Sub(started).Nanoseconds(), Accepted: len(acceptedAt), Visible: len(seen), ObservationAvailable: available}) return nil } window := time.NewTimer(c.Duration) @@ -259,9 +332,20 @@ func runPipelineSample(ctx context.Context, c PipelineConfig, rep int, send send results = nil continue } + r.RequestSamples = append(r.RequestSamples, RequestObservation{StartedNS: v.Started.Sub(started).Nanoseconds(), FinishedNS: v.Finished.Sub(started).Nanoseconds(), ElapsedNS: v.ElapsedNS, Events: len(v.IDs), Status: v.Status, Accepted: v.Accepted, Ambiguous: v.Ambiguous}) r.AttemptedIDs = append(r.AttemptedIDs, v.IDs...) r.Attempted += len(v.IDs) + if v.Started.After(windowEnd) { + r.AttemptedAfterWindow += len(v.IDs) + } else { + r.AttemptedInWindow += len(v.IDs) + } if v.Accepted { + if v.Finished.After(windowEnd) { + r.AcceptedAfterWindow += len(v.IDs) + } else { + r.AcceptedInWindow += len(v.IDs) + } r.AcceptedIDs = append(r.AcceptedIDs, v.IDs...) r.AckNS = append(r.AckNS, v.ElapsedNS) for _, id := range v.IDs { @@ -295,11 +379,20 @@ func runPipelineSample(ctx context.Context, c PipelineConfig, rep int, send send missing++ } } - if missing == 0 { + + unknown := 0 + for _, id := range r.AmbiguousIDs { + if !seen[id] { + unknown++ + } + } + if missing == 0 && unknown == 0 { break } if time.Now().After(deadline) { - result = errors.New("accepted events did not drain before deadline") + if missing > 0 { + result = errors.New("accepted events did not drain before deadline") + } break } select { @@ -309,6 +402,7 @@ func runPipelineSample(ctx context.Context, c PipelineConfig, rep int, send send } } end := time.Now() + r.ObservedEvents = len(seen) r.TotalNS = end.Sub(started).Nanoseconds() r.DrainNS = max(0, end.Sub(windowEnd).Nanoseconds()) for id, at := range acceptedAt { @@ -317,13 +411,52 @@ func runPipelineSample(ctx context.Context, c PipelineConfig, rep int, send send r.BacklogAtWindowEnd++ } } + // Reconstruct acknowledgement counts from actual worker finish times. A + // blocked SQL probe must not shift completed ACKs to when its result is read. + finishes := make([]time.Time, 0, len(acceptedAt)) + type pendingChange struct { + at time.Time + delta int + } + changes := []pendingChange{} + for id, at := range acceptedAt { + finishes = append(finishes, at) + observed, ok := observedAt[id] + if !ok || observed.After(at) { + changes = append(changes, pendingChange{at, 1}) + if ok { + changes = append(changes, pendingChange{observed, -1}) + } + } + } + slices.SortFunc(finishes, func(a, b time.Time) int { return a.Compare(b) }) + slices.SortFunc(changes, func(a, b pendingChange) int { return a.at.Compare(b.at) }) + fi, ci, pendingCount := 0, 0, 0 + for i := range r.Backlog { + at := started.Add(time.Duration(r.Backlog[i].ElapsedNS)) + for fi < len(finishes) && !finishes[fi].After(at) { + fi++ + } + for ci < len(changes) && !changes[ci].at.After(at) { + pendingCount += changes[ci].delta + ci++ + } + r.Backlog[i].Accepted = fi + r.Backlog[i].PendingAcknowledged = pendingCount + } r.Ack = Percentiles(r.AckNS) r.Visibility = Percentiles(r.VisibilityNS) reconcileErr := r.Reconcile() return r, errors.Join(result, observationError, reconcileErr) } func RunPipeline(ctx context.Context, c PipelineConfig) (PipelineReport, error) { - r := PipelineReport{Kind: "pipeline", Config: PublicPipelineConfig(c), Notes: []string{"Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries.", "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound; includes SQL query and polling delay. Same-host clocks assumed; persisted_at is not used.", "PersistedEPS = all observed unique rows / (measured window plus request tail and drain); accepted EPS uses the measured window. See raw durations.", "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", + if c.Namespace == "" { + c.Namespace = uuid.NewString() + } + if c.PayloadProfile == "" { + c.PayloadProfile = "varied" + } + r := PipelineReport{Kind: "pipeline", Config: PublicPipelineConfig(c), Notes: []string{"Target load is offered events/sec, not a capacity estimate. Burst offers the same count within the first quarter of the window.", "HTTP acknowledgement is measured per successful request, including client encoding/network/broker acknowledgement. No automatic load-driver retries. Visibility percentiles use only first observations made by the pending observer (ObservedEvents), not rows first found by final verification. AmbiguousUnobserved means absent at final bounded verification.", "Storage latency is a per-event receipt-to-first-observed-committed-row upper bound. Receipt and SQL clock timestamps share the deployment VM clock; the SQL clock is queried after reading the committed-row result. Includes polling, query and clock-probe delay; persisted_at is not used. Host time only schedules load/backlog.", "PersistedEPS = independently verified unique rows / (measured window plus request tail and complete observation/verification drain); accepted EPS counts only acknowledgements completed inside the measured window. Late starts and acknowledgements are reported separately. Limited outcomes are not achieved-load/capacity claims. See raw durations.", "ID sets are reconciled in memory; sorted unique IDs joined by newline (no trailing newline) are SHA-256 hashed for bounded public evidence. Recreate IDs from seed plus repetition and event index.", "Generator misses mean its bounded queue could not keep up; late schedules count scheduler delays beyond one request interval. Shared-host generator/observer compete with services."}} if c.Pool == nil || c.Rate <= 0 || c.Concurrency <= 0 || c.Concurrency > 1000 || c.Duration <= 0 || c.DrainDeadline <= 0 || c.PollInterval <= 0 || c.BatchSize <= 0 || c.BatchSize > 100 || c.Repetitions < 3 || c.Tenant == "" || (c.Pattern != "steady" && c.Pattern != "burst") { return r, errors.New("invalid pipeline configuration") @@ -332,24 +465,8 @@ func RunPipeline(ctx context.Context, c PipelineConfig) (PipelineReport, error) if count <= 0 || count > 1000000 { return r, errors.New("pipeline requires 1..1000000 events per sample") } - observe := func(ctx context.Context, ids []uuid.UUID) ([]StoredObservation, error) { - rows, e := c.Pool.Query(ctx, "SELECT event_id,received_at FROM ingestkit.events WHERE tenant_id=$1 AND event_id=ANY($2::uuid[])", c.Tenant, ids) - if e != nil { - return nil, e - } - defer rows.Close() - out := []StoredObservation{} - for rows.Next() { - var v StoredObservation - if e = rows.Scan(&v.ID, &v.ReceivedAt); e != nil { - return nil, e - } - out = append(out, v) - } - return out, rows.Err() - } - run := func(cfg PipelineConfig, rep int) (PipelineRun, error) { - es, e := Workload(WorkloadConfig{Seed: cfg.Seed + int64(rep), Count: int(float64(cfg.Rate) * cfg.Duration.Seconds()), PayloadBytes: cfg.PayloadBytes}) + run := func(cfg PipelineConfig, rep int) (runResult PipelineRun, runErr error) { + es, e := Workload(WorkloadConfig{Namespace: cfg.Namespace, PayloadProfile: cfg.PayloadProfile, Seed: cfg.Seed + int64(rep), Count: int(float64(cfg.Rate) * cfg.Duration.Seconds()), PayloadBytes: cfg.PayloadBytes}) if e != nil { return PipelineRun{}, e } @@ -360,19 +477,27 @@ func RunPipeline(ctx context.Context, c PipelineConfig) (PipelineReport, error) ids = append(ids, v.EventID) } // Refuse collisions rather than overwriting/removing somebody else's dataset. - existing, e := observe(ctx, ids) - if e != nil { + existing, e := VerifyPipelineRows(ctx, c.Pool, cfg.Tenant, es, nil) + if e != nil && len(existing.StoredIDs) == 0 { return PipelineRun{}, e } - if len(existing) > 0 { - return PipelineRun{}, errors.New("seed IDs already exist; choose another seed or an isolated stack") + if len(existing.StoredIDs) > 0 { + return PipelineRun{}, errors.New("case namespace or event IDs already exist; choose a new namespace or an isolated stack") } defer func() { end, cancel := context.WithTimeout(context.Background(), 5*time.Second) defer cancel() - _, _ = c.Pool.Exec(end, "DELETE FROM ingestkit.events WHERE tenant_id=$1 AND event_id=ANY($2::uuid[])", c.Tenant, ids) + _, _ = c.Pool.Exec(end, "DELETE FROM ingestkit.events WHERE tenant_id=$1 AND event_id=ANY($2::uuid[]) AND event_type=$3", c.Tenant, ids, es[0].EventType) + }() + defer func() { + if cfg.SampleFinished != nil { + runErr = errors.Join(runErr, cfg.SampleFinished(rep)) + } }() - client := &http.Client{Timeout: 8 * time.Second} + client := cfg.HTTPClient + if client == nil { + client = &http.Client{Timeout: 8 * time.Second} + } send := func(ctx context.Context, ids []uuid.UUID) sendResult { v := sendResult{} inputs := make([]event.Input, len(ids)) @@ -383,7 +508,9 @@ func RunPipeline(ctx context.Context, c PipelineConfig) (PipelineReport, error) if e != nil { return v } - req, e := http.NewRequestWithContext(ctx, "POST", cfg.APIURL+"/v1/events/batch", bytes.NewReader(raw)) + requestCtx, requestEnd := context.WithTimeout(ctx, 8*time.Second) + defer requestEnd() + req, e := http.NewRequestWithContext(requestCtx, "POST", cfg.APIURL+"/v1/events/batch", bytes.NewReader(raw)) if e != nil { return v } @@ -395,6 +522,7 @@ func RunPipeline(ctx context.Context, c PipelineConfig) (PipelineReport, error) return v } defer res.Body.Close() + v.Status = res.StatusCode if res.StatusCode != 202 { v.Ambiguous = res.StatusCode >= 500 return v @@ -409,7 +537,77 @@ func RunPipeline(ctx context.Context, c PipelineConfig) (PipelineReport, error) v.Accepted = true return v } - return runPipelineSample(ctx, cfg, rep, send, observe) + pending, e := NewPendingObserver(ctx, c.Pool, cfg.Tenant, ids) + if e != nil { + return PipelineRun{}, e + } + totalQueries := int64(0) + closeObserver := func() error { + if pending == nil { + return nil + } + q, _ := pending.Stats() + totalQueries += q + end, cancel := context.WithTimeout(context.Background(), 3*time.Second) + defer cancel() + err := pending.Close(end) + pending = nil + return err + } + defer closeObserver() + alreadyObserved := map[uuid.UUID]bool{} + observe := func(ctx context.Context, _ []uuid.UUID) ([]StoredObservation, error) { + probeCtx, cancel := context.WithTimeout(ctx, 2*time.Second) + defer cancel() + if pending == nil { + remaining := []uuid.UUID{} + for _, id := range ids { + if !alreadyObserved[id] { + remaining = append(remaining, id) + } + } + var err error + pending, err = NewPendingObserver(probeCtx, c.Pool, cfg.Tenant, remaining) + if err != nil { + if cfg.ReconnectObserver && ctx.Err() == nil { + return nil, errObserverUnavailable + } + return nil, err + } + totalQueries += 2 + } + rows, err := pending.Observe(probeCtx) + if err != nil && cfg.ReconnectObserver && ctx.Err() == nil { + _ = closeObserver() + return nil, errObserverUnavailable + } + for _, row := range rows { + alreadyObserved[row.ID] = true + } + return rows, err + } + sample, sampleErr := runPipelineSample(ctx, cfg, rep, send, observe) + closeErr := closeObserver() + sample.ObserverQueries = totalQueries + verificationStarted := time.Now() + verifyCtx, verifyEnd := context.WithTimeout(ctx, c.DrainDeadline) + verified, verifyErr := VerifyPipelineRows(verifyCtx, c.Pool, cfg.Tenant, es, sample.AcceptedIDs) + verifyEnd() + sample.VerificationNS = time.Since(verificationStarted).Nanoseconds() + sample.ObserverQueryNS += sample.VerificationNS + sample.ObserverQueries++ + sample.TotalNS = time.Since(sample.started).Nanoseconds() + sample.DrainNS = max(0, sample.TotalNS-sample.WindowNS) + sample.StoredIDs = verified.StoredIDs + sample.ContentMismatch = verified.ContentMismatch + reconcileErr := sample.Reconcile() + sample.Backlog = append(sample.Backlog, BacklogSample{ElapsedNS: sample.TotalNS, Accepted: sample.Accepted, Visible: sample.Persisted, PendingAcknowledged: sample.Missing, ObservationAvailable: verifyErr == nil, FinalVerification: true}) + result := errors.Join(sampleErr, closeErr, verifyErr, reconcileErr) + if result != nil { + sample.Correct = false + sample.Outcome = "failed" + } + return sample, result } if c.Warmup > 0 { warm := c @@ -425,9 +623,7 @@ func RunPipeline(ctx context.Context, c PipelineConfig) (PipelineReport, error) if e != nil { return r, e } - if v.Accepted == 0 { - return r, errors.New("no accepted events; no useful pipeline measurement") - } + } return r, nil } diff --git a/internal/benchmark/pipeline_integration_test.go b/internal/benchmark/pipeline_integration_test.go index bb3590f..9a1c2b1 100644 --- a/internal/benchmark/pipeline_integration_test.go +++ b/internal/benchmark/pipeline_integration_test.go @@ -43,3 +43,20 @@ func TestBenchmarkCleanupPreservesUnownedData(t *testing.T) { require.Positive(t, v.Visibility.P50) } } + +func TestPipelineRefusesPreexistingCaseBeforeCleanup(t *testing.T) { + ctx := context.Background() + p := observerPool(t) + ns := "collision-" + uuid.NewString() + expected, e := Workload(WorkloadConfig{Namespace: ns, PayloadProfile: "varied", Seed: 43, Count: 2, PayloadBytes: 128}) + require.NoError(t, e) + expected[0].TenantID = "demo" + _, e = writeMethod(ctx, p, "batch-insert", expected[:1]) + require.NoError(t, e) + defer p.Exec(ctx, "DELETE FROM ingestkit.events WHERE tenant_id='demo' AND event_id=$1", expected[0].EventID.String()) + _, e = RunPipeline(ctx, PipelineConfig{Pool: p, Namespace: ns, APIURL: os.Getenv("INGESTKIT_TEST_API_URL"), APIKey: "local-demo-key", Tenant: "demo", Rate: 20, Concurrency: 1, Duration: 100 * time.Millisecond, DrainDeadline: time.Second, PollInterval: 10 * time.Millisecond, BatchSize: 1, PayloadBytes: 128, Pattern: "steady", Seed: 42, Repetitions: 3}) + require.ErrorContains(t, e, "already exist") + var n int + require.NoError(t, p.QueryRow(ctx, "SELECT count(*) FROM ingestkit.events WHERE tenant_id='demo' AND event_id=$1", expected[0].EventID.String()).Scan(&n)) + require.Equal(t, 1, n, "pre-existing data must survive a refused run") +} diff --git a/internal/benchmark/pipeline_test.go b/internal/benchmark/pipeline_test.go index 6b46b72..24e961b 100644 --- a/internal/benchmark/pipeline_test.go +++ b/internal/benchmark/pipeline_test.go @@ -56,3 +56,120 @@ func TestPipelineDrainDeadlineFails(t *testing.T) { require.Equal(t, 1, r.Missing) require.GreaterOrEqual(t, r.TotalNS, r.WindowNS) } + +func TestVisibilityUsesObserverClockDomain(t *testing.T) { + c := PipelineConfig{Rate: 10, Concurrency: 1, Duration: 100 * time.Millisecond, DrainDeadline: 20 * time.Millisecond, PollInterval: time.Millisecond, BatchSize: 1, PayloadBytes: 64, Pattern: "steady"} + // The Docker VM clock may be ahead of the host. Receipt and SQL observation + // use that VM clock; the host clock still schedules load and backlog samples. + receipt := time.Now().Add(time.Hour) + r, e := runPipelineSample(context.Background(), c, 1, func(_ context.Context, ids []uuid.UUID) sendResult { return sendResult{Accepted: true} }, func(_ context.Context, ids []uuid.UUID) ([]StoredObservation, error) { + return []StoredObservation{{ID: ids[0], ReceivedAt: receipt, ObservedAt: receipt.Add(7 * time.Millisecond)}}, nil + }) + require.NoError(t, e) + require.True(t, r.Correct) + require.Equal(t, []int64{int64(7 * time.Millisecond)}, r.VisibilityNS) +} + +func TestLateAckOutsideMeasuredWindow(t *testing.T) { + c := PipelineConfig{Rate: 10, Concurrency: 1, Duration: 100 * time.Millisecond, DrainDeadline: 20 * time.Millisecond, PollInterval: time.Millisecond, BatchSize: 1, PayloadBytes: 64, Pattern: "steady"} + send := func(context.Context, []uuid.UUID) sendResult { + time.Sleep(120 * time.Millisecond) + return sendResult{Accepted: true} + } + observe := func(_ context.Context, ids []uuid.UUID) ([]StoredObservation, error) { + return []StoredObservation{{ID: ids[0], ReceivedAt: time.Now().Add(-time.Second)}}, nil + } + r, e := runPipelineSample(context.Background(), c, 1, send, observe) + require.NoError(t, e) + require.Equal(t, 0, r.AcceptedInWindow) + require.Equal(t, 1, r.AcceptedAfterWindow) + require.Zero(t, r.AcceptedEPS) + require.Equal(t, "limited", r.Outcome) +} +func TestClientQueueTailClassified(t *testing.T) { + c := PipelineConfig{Rate: 100, Concurrency: 1, Duration: 30 * time.Millisecond, DrainDeadline: 20 * time.Millisecond, PollInterval: time.Millisecond, BatchSize: 1, PayloadBytes: 64, Pattern: "steady"} + send := func(context.Context, []uuid.UUID) sendResult { + time.Sleep(50 * time.Millisecond) + return sendResult{Accepted: true} + } + observe := func(_ context.Context, ids []uuid.UUID) ([]StoredObservation, error) { + out := []StoredObservation{} + for _, id := range ids { + out = append(out, StoredObservation{ID: id, ReceivedAt: time.Now().Add(-time.Second)}) + } + return out, nil + } + r, e := runPipelineSample(context.Background(), c, 1, send, observe) + require.NoError(t, e) + require.Equal(t, 1, r.AttemptedInWindow) + require.Equal(t, 2, r.AttemptedAfterWindow) + require.Equal(t, 3, r.AcceptedAfterWindow) + require.Equal(t, "limited", r.Outcome) +} + +func TestAmbiguousAbsenceIsUnknownAtDeadline(t *testing.T) { + c := PipelineConfig{Rate: 10, Concurrency: 1, Duration: 100 * time.Millisecond, DrainDeadline: 20 * time.Millisecond, PollInterval: time.Millisecond, BatchSize: 1, PayloadBytes: 64, Pattern: "steady"} + r, e := runPipelineSample(context.Background(), c, 1, func(context.Context, []uuid.UUID) sendResult { return sendResult{Ambiguous: true} }, func(context.Context, []uuid.UUID) ([]StoredObservation, error) { return nil, nil }) + require.NoError(t, e) + require.True(t, r.Correct) + require.Equal(t, "limited", r.Outcome) + require.Equal(t, 1, r.AmbiguousUnobserved) + require.GreaterOrEqual(t, r.DrainNS, int64(c.DrainDeadline)) +} + +func TestSlowObserverReportsLatePolls(t *testing.T) { + c := PipelineConfig{Rate: 10, Concurrency: 1, Duration: 100 * time.Millisecond, DrainDeadline: 20 * time.Millisecond, PollInterval: time.Millisecond, BatchSize: 1, PayloadBytes: 64, Pattern: "steady"} + r, e := runPipelineSample(context.Background(), c, 1, func(context.Context, []uuid.UUID) sendResult { return sendResult{Accepted: true} }, func(_ context.Context, ids []uuid.UUID) ([]StoredObservation, error) { + time.Sleep(5 * time.Millisecond) + return []StoredObservation{{ID: ids[0], ReceivedAt: time.Now().Add(-time.Second)}}, nil + }) + require.NoError(t, e) + require.Positive(t, r.ObserverLatePolls) + require.GreaterOrEqual(t, r.ObserverMaxGapNS, int64(5*time.Millisecond)) + require.Equal(t, "limited", r.Outcome) +} + +func TestExpectedObserverOutageDoesNotEraseSuccessfulRecovery(t *testing.T) { + c := PipelineConfig{ReconnectObserver: true, Rate: 10, Concurrency: 1, Duration: 100 * time.Millisecond, DrainDeadline: 20 * time.Millisecond, PollInterval: time.Millisecond, BatchSize: 1, PayloadBytes: 64, Pattern: "steady"} + calls := 0 + r, e := runPipelineSample(context.Background(), c, 1, func(context.Context, []uuid.UUID) sendResult { return sendResult{Accepted: true} }, func(_ context.Context, ids []uuid.UUID) ([]StoredObservation, error) { + calls++ + if calls <= 2 { + return nil, errObserverUnavailable + } + return []StoredObservation{{ID: ids[0], ReceivedAt: time.Now().Add(-time.Second)}}, nil + }) + require.NoError(t, e) + require.True(t, r.Correct) + require.Equal(t, 2, r.ObserverOutages) + require.Equal(t, "limited", r.Outcome) + require.False(t, r.Backlog[0].ObservationAvailable) +} +func TestBacklogUsesActualAckTimesAfterSlowObservation(t *testing.T) { + c := PipelineConfig{Rate: 10, Concurrency: 2, Duration: 200 * time.Millisecond, DrainDeadline: 20 * time.Millisecond, PollInterval: time.Millisecond, BatchSize: 1, PayloadBytes: 64, Pattern: "steady"} + calls := 0 + r, e := runPipelineSample(context.Background(), c, 1, func(context.Context, []uuid.UUID) sendResult { return sendResult{Accepted: true} }, func(_ context.Context, ids []uuid.UUID) ([]StoredObservation, error) { + calls++ + if calls == 1 { + time.Sleep(120 * time.Millisecond) + return nil, nil + } + out := []StoredObservation{} + for _, id := range ids { + out = append(out, StoredObservation{ID: id, ReceivedAt: time.Now().Add(-time.Second)}) + } + return out, nil + }) + require.NoError(t, e) + require.Equal(t, 2, r.Backlog[0].Accepted) + require.Equal(t, 2, r.Backlog[0].PendingAcknowledged) + require.Len(t, r.RequestSamples, 2) + accepted := 0 + for _, sample := range r.RequestSamples { + if sample.Accepted && sample.FinishedNS <= r.WindowNS { + accepted += sample.Events + } + require.Equal(t, sample.FinishedNS-sample.StartedNS, sample.ElapsedNS) + } + require.Equal(t, r.AcceptedInWindow, accepted) +} diff --git a/internal/benchmark/progress.go b/internal/benchmark/progress.go new file mode 100644 index 0000000..ad2d532 --- /dev/null +++ b/internal/benchmark/progress.go @@ -0,0 +1,102 @@ +package benchmark + +import ( + "context" + "errors" + "time" + + "github.com/feat7/ingestkit/internal/runenv" + "github.com/twmb/franz-go/pkg/kgo" + "github.com/twmb/franz-go/pkg/kmsg" +) + +func offsetsCaughtUp(ends, committed map[int32]int64) bool { + if len(ends) == 0 { + return false + } + for partition, end := range ends { + if end < 0 { + return false + } + offset, ok := committed[partition] + if end == 0 && (!ok || offset == -1) { + continue + } + if !ok || offset != end { + return false + } + } + return true +} + +// Wait for commit-before-cleanup, not merely row visibility. Otherwise a later +// deliberate broker fault could replay an experiment row that cleanup deleted. +func waitConsumerCaughtUp(ctx context.Context, s *runenv.Stack) error { + if s.Brokers == "" { + return errors.New("owned broker probe is required for progress verification") + } + probe, cancel := context.WithTimeout(ctx, 30*time.Second) + defer cancel() + client, err := kgo.NewClient(kgo.SeedBrokers(s.Brokers)) + if err != nil { + return err + } + defer client.Close() + partitions := []int32{0, 1, 2} + for { + list := kmsg.NewPtrListOffsetsRequest() + topic := kmsg.ListOffsetsRequestTopic{Topic: "ingestkit.events"} + for _, id := range partitions { + p := kmsg.NewListOffsetsRequestTopicPartition() + p.Partition = id + p.Timestamp = -1 + topic.Partitions = append(topic.Partitions, p) + } + list.Topics = []kmsg.ListOffsetsRequestTopic{topic} + ends := map[int32]int64{} + committed := map[int32]int64{} + response, e := client.Request(probe, list) + if e == nil { + for _, t := range response.(*kmsg.ListOffsetsResponse).Topics { + for _, p := range t.Partitions { + if p.ErrorCode == 0 { + ends[p.Partition] = p.Offset + } + } + } + } + fetch := kmsg.NewPtrOffsetFetchRequest() + fetch.Group = "ingestkit-consumer" + fetch.Topics = []kmsg.OffsetFetchRequestTopic{{Topic: "ingestkit.events", Partitions: partitions}} + group := kmsg.NewOffsetFetchRequestGroup() + group.Group = "ingestkit-consumer" + group.Topics = []kmsg.OffsetFetchRequestGroupTopic{{Topic: "ingestkit.events", Partitions: partitions}} + fetch.Groups = []kmsg.OffsetFetchRequestGroup{group} + response, e = client.Request(probe, fetch) + if e == nil { + r := response.(*kmsg.OffsetFetchResponse) + for _, g := range r.Groups { + for _, t := range g.Topics { + for _, p := range t.Partitions { + if p.ErrorCode == 0 { + committed[p.Partition] = p.Offset + } + } + } + } + for _, t := range r.Topics { + for _, p := range t.Partitions { + if p.ErrorCode == 0 { + committed[p.Partition] = p.Offset + } + } + } + } + if len(ends) == len(partitions) && offsetsCaughtUp(ends, committed) { + return nil + } + if err = waitUntil(probe, time.Now().Add(50*time.Millisecond)); err != nil { + return errors.New("consumer progress did not catch up before cleanup") + } + } +} diff --git a/internal/benchmark/recovery.go b/internal/benchmark/recovery.go new file mode 100644 index 0000000..65aeb41 --- /dev/null +++ b/internal/benchmark/recovery.go @@ -0,0 +1,368 @@ +package benchmark + +import ( + "context" + "encoding/json" + "errors" + "fmt" + "os" + "os/exec" + "path/filepath" + "strings" + "sync" + "time" + + "github.com/feat7/ingestkit/internal/event" + "github.com/feat7/ingestkit/internal/runenv" + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgxpool" +) + +type FaultEvent struct { + Action, Service, ErrorClass string + Repetition int + ElapsedNS, PlannedNS int64 + At time.Time +} +type OutboxPoint struct { + ElapsedNS int64 + Pending, Acknowledged int +} +type RecoveryRun struct { + FirstAttemptStatus string `json:",omitempty"` + FirstAttemptNS int64 `json:",omitempty"` + AmbiguousIDs []uuid.UUID `json:"-"` + Repetition int + Correct bool + Faults []FaultEvent + Pipeline *PipelineRun `json:",omitempty"` + Outbox []OutboxPoint `json:",omitempty"` + AcceptedIDs, StoredIDs []uuid.UUID `json:"-"` +} +type RecoveryReport struct { + Kind string + Runs []RecoveryRun + Notes []string +} + +func waitUntil(ctx context.Context, at time.Time) error { + timer := time.NewTimer(max(0, time.Until(at))) + defer timer.Stop() + select { + case <-ctx.Done(): + return ctx.Err() + case <-timer.C: + return nil + } +} +func restoreOwned(s *runenv.Stack, service string) error { + ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second) + defer cancel() + return s.SetServiceRunning(ctx, service, true) +} +func RunRecoveryCase(ctx context.Context, s *runenv.Stack, p *pgxpool.Pool, c Case, seed int64, namespace string) (report RecoveryReport, result error) { + report = RecoveryReport{Kind: c.Recovery, Notes: []string{"Availability experiment; not a capacity estimate. Actual control timestamps and reconciled ID sets are retained.", "A forced consumer kill does not claim to land in every database/offset commit window; the deterministic crash regression remains separate."}} + if c.Kind != "recovery" || c.Repetitions != 3 { + return report, errors.New("invalid recovery case") + } + if c.Recovery == "outbox" { + return runOutboxRecovery(ctx, s, p, c, seed, namespace) + } + service := "postgres" + if c.Recovery == "consumer" { + service = "consumer" + } else if c.Recovery != "database" { + return report, errors.New("unknown recovery case") + } + defer func() { result = errors.Join(result, restoreOwned(s, service)) }() + client, err := s.HTTPClient() + if err != nil { + return report, err + } + config := pipelineCaseConfig(ctx, s, p, client, c, seed, namespace) + var mu sync.Mutex + traces := map[int][]FaultEvent{} + completed := map[int]chan error{} + failures := map[int]error{} + record := func(rep int, start time.Time, action string, planned time.Duration, err error) { + mu.Lock() + defer mu.Unlock() + entry := FaultEvent{Action: action, Service: service, Repetition: rep, ElapsedNS: time.Since(start).Nanoseconds(), PlannedNS: int64(planned), At: time.Now().UTC()} + if err != nil { + entry.ErrorClass = "control_failed" + } + traces[rep] = append(traces[rep], entry) + } + config.SampleStarted = func(rep int, start time.Time) { + if rep == 0 { + return + } + done := make(chan error, 1) + mu.Lock() + completed[rep] = done + mu.Unlock() + go func() { + var err error + defer func() { done <- err }() + if err = waitUntil(ctx, start.Add(c.FaultAt)); err != nil { + return + } + record(rep, start, "fault_requested", c.FaultAt, nil) + if service == "consumer" { + err = s.KillConsumer(ctx) + } else { + err = s.SetServiceRunning(ctx, service, false) + } + record(rep, start, "stopped", c.FaultAt, err) + if err != nil { + return + } + if err = waitUntil(ctx, start.Add(c.RestoreAt)); err != nil { + return + } + record(rep, start, "restore_requested", c.RestoreAt, nil) + err = s.SetServiceRunning(ctx, service, true) + record(rep, start, "started", c.RestoreAt, err) + }() + } + config.SampleFinished = func(rep int) error { + if rep == 0 { + return waitConsumerCaughtUp(ctx, s) + } + mu.Lock() + done := completed[rep] + mu.Unlock() + if done == nil { + return nil + } + err := <-done + if err == nil { + err = waitConsumerCaughtUp(ctx, s) + } + mu.Lock() + failures[rep] = err + mu.Unlock() + return err + } + pipeline, err := RunPipeline(ctx, config) + for i := range pipeline.Runs { + sample := pipeline.Runs[i] + mu.Lock() + faults := append([]FaultEvent(nil), traces[sample.Repetition]...) + controlErr := failures[sample.Repetition] + mu.Unlock() + report.Runs = append(report.Runs, RecoveryRun{Repetition: sample.Repetition, Correct: sample.Correct && controlErr == nil && len(faults) >= 4, Faults: faults, Pipeline: &sample, AcceptedIDs: sample.AcceptedIDs, StoredIDs: sample.StoredIDs}) + err = errors.Join(err, controlErr) + } + return report, err +} +func outboxProcess(ctx context.Context, s *runenv.Stack, args ...string) ([]byte, error) { + root, err := runenv.Root() + if err != nil { + return nil, err + } + cmd := exec.CommandContext(ctx, "python3", args...) + cmd.Dir = root + cmd.Env = append(os.Environ(), "API_URL="+s.APIURL, "INGESTKIT_API_KEY="+s.APIKey(), "INGESTKIT_CA_FILE="+filepath.Join(s.Directory, "root.crt")) + return cmd.CombinedOutput() +} +func makeOutbox(ctx context.Context, s *runenv.Stack, database, prefix string, count int) ([]event.Envelope, error) { + script := `import json,sqlite3,sys; from examples.outbox.app import create_order; db,prefix,count=sys.argv[1],sys.argv[2],int(sys.argv[3]); [create_order(db,prefix+'/'+str(i),1000+i) for i in range(count)]; connection=sqlite3.connect(db); print('['+','.join(row[0] for row in connection.execute('SELECT body FROM outbox ORDER BY rowid'))+']'); connection.close()` + raw, err := outboxProcess(ctx, s, "-c", script, database, prefix, fmt.Sprint(count)) + if err != nil { + return nil, errors.New("outbox setup failed") + } + var inputs []event.Input + if json.Unmarshal(raw, &inputs) != nil || len(inputs) != count { + return nil, errors.New("invalid outbox setup result") + } + events := make([]event.Envelope, len(inputs)) + for i, input := range inputs { + events[i] = event.Envelope{Input: input, TenantID: "default"} + } + return events, nil +} +func dispatchOutbox(ctx context.Context, s *runenv.Stack, database string) (map[string]any, error) { + raw, err := outboxProcess(ctx, s, "-m", "examples.outbox", "dispatch", "--database", database, "--max-attempts", "1") + var summary map[string]any + if json.Unmarshal(raw, &summary) != nil { + return nil, errors.New("invalid outbox dispatch result") + } + return summary, err +} +func eventIDs(events []event.Envelope) []uuid.UUID { + ids := make([]uuid.UUID, len(events)) + for i, e := range events { + ids[i] = e.EventID + } + return ids +} +func waitStoredInputs(ctx context.Context, p *pgxpool.Pool, events []event.Envelope, deadline time.Duration) ([]uuid.UUID, error) { + ids := eventIDs(events) + observer, err := NewPendingObserver(ctx, p, "default", ids) + if err != nil { + return nil, err + } + closeObserver := func() error { + end, cancel := context.WithTimeout(context.Background(), 3*time.Second) + defer cancel() + return observer.Close(end) + } + defer closeObserver() + end := time.Now().Add(deadline) + found := map[uuid.UUID]bool{} + for len(found) < len(ids) { + rows, e := observer.Observe(ctx) + if e != nil { + return nil, e + } + for _, row := range rows { + found[row.ID] = true + } + if len(found) == len(ids) { + break + } + if time.Now().After(end) { + return nil, errors.New("acknowledged outbox events did not drain") + } + if e = waitUntil(ctx, time.Now().Add(50*time.Millisecond)); e != nil { + return nil, e + } + } + if err = closeObserver(); err != nil { + return nil, err + } + var business struct { + OrderID string `json:"order_id"` + } + if json.Unmarshal(events[0].Payload, &business) != nil { + return nil, errors.New("invalid outbox verification payload") + } + slash := strings.LastIndex(business.OrderID, "/") + if slash < 0 { + return nil, errors.New("outbox verification needs a business namespace") + } + v, err := VerifyOutboxRows(ctx, p, "default", business.OrderID[:slash+1], events, ids) + return v.StoredIDs, err +} +func deleteOutboxRows(p *pgxpool.Pool, events []event.Envelope) { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + _, _ = p.Exec(ctx, "DELETE FROM ingestkit.events WHERE tenant_id='default' AND event_id=ANY($1::uuid[])", eventIDs(events)) +} +func runOutboxRecovery(ctx context.Context, s *runenv.Stack, p *pgxpool.Pool, c Case, seed int64, namespace string) (report RecoveryReport, result error) { + report = RecoveryReport{Kind: "outbox", Notes: []string{"One untimed warm-up order before three measured broker outages.100 pending local events per repetition; the first one-attempt dispatch exceeds the broker publish timeout.", "Pending-local samples are observations after commands, not exact transition times. HTTP ACK still precedes PostgreSQL persistence."}} + defer func() { result = errors.Join(result, restoreOwned(s, "redpanda")) }() + warmDB := filepath.Join(s.Directory, "private", "outbox-warm.db") + warm, e := makeOutbox(ctx, s, warmDB, namespace+"/warm", 1) + if e != nil { + return report, e + } + if _, e = dispatchOutbox(ctx, s, warmDB); e != nil { + return report, errors.New("outbox warm-up dispatch failed") + } + if _, e = waitStoredInputs(ctx, p, warm, c.Drain); e != nil { + return report, e + } + if e = waitConsumerCaughtUp(ctx, s); e != nil { + return report, e + } + deleteOutboxRows(p, warm) + for rep := 1; rep <= c.Repetitions; rep++ { + run, err := outboxRecoverySample(ctx, s, p, c, namespace, rep) + report.Runs = append(report.Runs, run) + if err != nil { + return report, err + } + } + return report, nil +} +func outboxRecoverySample(ctx context.Context, s *runenv.Stack, p *pgxpool.Pool, c Case, namespace string, rep int) (run RecoveryRun, result error) { + run.Repetition = rep + database := filepath.Join(s.Directory, "private", fmt.Sprintf("outbox-%d.db", rep)) + events, err := makeOutbox(ctx, s, database, fmt.Sprintf("%s/rep%d", namespace, rep), c.Count) + if err != nil { + return run, err + } + defer deleteOutboxRows(p, events) + start := time.Now() + record := func(action string, planned time.Duration, err error) { + entry := FaultEvent{Action: action, Service: "redpanda", Repetition: rep, ElapsedNS: time.Since(start).Nanoseconds(), PlannedNS: int64(planned), At: time.Now().UTC()} + if err != nil { + entry.ErrorClass = "control_failed" + } + run.Faults = append(run.Faults, entry) + } + record("fault_requested", 0, nil) + err = s.SetServiceRunning(ctx, "redpanda", false) + record("stopped", 0, err) + if err != nil { + return run, err + } + run.Outbox = append(run.Outbox, OutboxPoint{ElapsedNS: time.Since(start).Nanoseconds(), Pending: c.Count}) + down := time.Now() + restoreDone := make(chan error, 1) + // Only the restore goroutine mutates its separate trace; merge after joining. + var restoration []FaultEvent + go func() { + e := waitUntil(ctx, down.Add(c.RestoreAt)) + if e == nil { + restoration = append(restoration, FaultEvent{Action: "restore_requested", Service: "redpanda", Repetition: rep, ElapsedNS: time.Since(start).Nanoseconds(), PlannedNS: down.Add(c.RestoreAt).Sub(start).Nanoseconds(), At: time.Now().UTC()}) + e = s.SetServiceRunning(ctx, "redpanda", true) + entry := FaultEvent{Action: "started", Service: "redpanda", Repetition: rep, ElapsedNS: time.Since(start).Nanoseconds(), At: time.Now().UTC()} + if e != nil { + entry.ErrorClass = "control_failed" + } + restoration = append(restoration, entry) + } + restoreDone <- e + }() + firstStarted := time.Now() + summary, firstErr := dispatchOutbox(ctx, s, database) + run.FirstAttemptNS = time.Since(firstStarted).Nanoseconds() + if code, ok := summary["error"].(string); ok && (code == "http_503" || code == "delivery_uncertain") { + run.FirstAttemptStatus = code + run.AmbiguousIDs = eventIDs(events) + } + run.Outbox = append(run.Outbox, OutboxPoint{ElapsedNS: time.Since(start).Nanoseconds(), Pending: c.Count}) + restoreErr := <-restoreDone + run.Faults = append(run.Faults, restoration...) + if restoreErr != nil { + return run, restoreErr + } + if firstErr == nil || run.FirstAttemptStatus == "" || run.FirstAttemptNS < int64(5*time.Second) || summary["acknowledged"] != float64(0) || summary["pending"] != float64(c.Count) { + return run, errors.New("broker fault did not retain all pending outbox events") + } + client, e := s.HTTPClient() + if e != nil { + return run, e + } + ready := time.Now().Add(c.Drain) + for { + response, e := client.Get(s.APIURL + "/ready") + if e == nil { + response.Body.Close() + if response.StatusCode == 200 { + break + } + } + if time.Now().After(ready) { + return run, errors.New("broker did not restore API readiness") + } + if e = waitUntil(ctx, time.Now().Add(100*time.Millisecond)); e != nil { + return run, e + } + } + summary, err = dispatchOutbox(ctx, s, database) + if err != nil || summary["acknowledged"] != float64(c.Count) { + return run, errors.New("restored outbox dispatch was not acknowledged") + } + run.AcceptedIDs = eventIDs(events) + run.Outbox = append(run.Outbox, OutboxPoint{ElapsedNS: time.Since(start).Nanoseconds(), Acknowledged: c.Count}) + run.StoredIDs, err = waitStoredInputs(ctx, p, events, c.Drain) + if err == nil { + err = waitConsumerCaughtUp(ctx, s) + } + run.Correct = err == nil && len(run.StoredIDs) == c.Count + return run, err +} diff --git a/internal/benchmark/results.go b/internal/benchmark/results.go index afe06b8..ac8481d 100644 --- a/internal/benchmark/results.go +++ b/internal/benchmark/results.go @@ -63,12 +63,12 @@ func WriteReport(dir string, report any) error { return errors.New("pipeline report requires three repetitions") } name = "pipeline" - records = append(records, []string{"repetition", "planned", "attempted", "accepted", "persisted", "generator_missed", "ambiguous", "rejected", "window_ns", "total_ns", "drain_ns", "ack_p95_ns", "visibility_p95_ns", "correct"}) + records = append(records, []string{"repetition", "planned", "attempted", "accepted", "persisted", "generator_missed", "ambiguous", "rejected", "window_ns", "total_ns", "drain_ns", "ack_p95_ns", "visibility_p95_ns", "correct", "outcome", "accepted_in_window", "accepted_after_window", "attempted_after_window", "ambiguous_unobserved_at_final_verification", "observer_polls", "observer_sql_statements", "observer_elapsed_ns", "observed_events", "verification_ns", "observer_late_polls", "observer_max_gap_ns"}) for _, v := range r.Runs { if !v.Correct { return errors.New("incorrect pipeline run") } - records = append(records, []string{strconv.Itoa(v.Repetition), strconv.Itoa(v.Planned), strconv.Itoa(v.Attempted), strconv.Itoa(v.Accepted), strconv.Itoa(v.Persisted), strconv.Itoa(v.GeneratorMissed), strconv.Itoa(v.Ambiguous), strconv.Itoa(v.Rejected), strconv.FormatInt(v.WindowNS, 10), strconv.FormatInt(v.TotalNS, 10), strconv.FormatInt(v.DrainNS, 10), strconv.FormatInt(v.Ack.P95, 10), strconv.FormatInt(v.Visibility.P95, 10), strconv.FormatBool(v.Correct)}) + records = append(records, []string{strconv.Itoa(v.Repetition), strconv.Itoa(v.Planned), strconv.Itoa(v.Attempted), strconv.Itoa(v.Accepted), strconv.Itoa(v.Persisted), strconv.Itoa(v.GeneratorMissed), strconv.Itoa(v.Ambiguous), strconv.Itoa(v.Rejected), strconv.FormatInt(v.WindowNS, 10), strconv.FormatInt(v.TotalNS, 10), strconv.FormatInt(v.DrainNS, 10), strconv.FormatInt(v.Ack.P95, 10), strconv.FormatInt(v.Visibility.P95, 10), strconv.FormatBool(v.Correct), v.Outcome, strconv.Itoa(v.AcceptedInWindow), strconv.Itoa(v.AcceptedAfterWindow), strconv.Itoa(v.AttemptedAfterWindow), strconv.Itoa(v.AmbiguousUnobserved), strconv.FormatInt(v.ObserverPolls, 10), strconv.FormatInt(v.ObserverQueries, 10), strconv.FormatInt(v.ObserverQueryNS, 10), strconv.Itoa(v.ObservedEvents), strconv.FormatInt(v.VerificationNS, 10), strconv.FormatInt(v.ObserverLatePolls, 10), strconv.FormatInt(v.ObserverMaxGapNS, 10)}) } case DatabaseReport: if e := r.Validate(); e != nil { diff --git a/internal/benchmark/study.go b/internal/benchmark/study.go new file mode 100644 index 0000000..c954bbc --- /dev/null +++ b/internal/benchmark/study.go @@ -0,0 +1,547 @@ +package benchmark + +import ( + "context" + "encoding/csv" + "encoding/json" + "errors" + "fmt" + "io" + "net/http" + "os" + "path/filepath" + "slices" + "strconv" + "strings" + "time" + + "github.com/feat7/ingestkit/internal/runenv" + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgxpool" +) + +type StudyConfig struct { + OutputDirectory string + Smoke, Resume bool + Seed int64 + Writer io.Writer + OnCaseStart func(Case, *runenv.Stack) +} +type StudyCaseResult struct { + Case Case + Status string + Attempt int + Artifact ArtifactRef + History []CaseAttempt + Summary json.RawMessage +} +type StudyIndex struct { + MetadataArtifacts []ArtifactRef + Schema int + Status string + Identity StudyIdentity + RunNamespace string + ManifestFiles []string + Resources []ArtifactRef + Cases []StudyCaseResult + Notes []string +} +type CaseAttempt struct { + Attempt int + Status, ErrorClass string + Artifact ArtifactRef +} +type StudyCapture struct { + Schema int + Identity StudyIdentity + Case Case + Namespace, Status, ErrorClass string + Report any + Populations []PopulationEvidence +} +type PopulationEvidence struct { + Repetition, Count int + Namespace string + Seed int64 + Indices map[string][]int `json:",omitempty"` + Explicit map[string][]uuid.UUID `json:",omitempty"` + Extra map[string][]uuid.UUID `json:",omitempty"` +} + +func pipelineCaseConfig(ctx context.Context, s *runenv.Stack, p *pgxpool.Pool, client *http.Client, c Case, seed int64, namespace string) PipelineConfig { + return PipelineConfig{Pool: p, HTTPClient: client, APIURL: s.APIURL, APIKey: s.APIKey(), Tenant: "default", Namespace: namespace, PayloadProfile: c.PayloadProfile, Seed: seed, Rate: c.Rate, Concurrency: c.Concurrency, BatchSize: c.BatchSize, PayloadBytes: c.PayloadBytes, Repetitions: c.Repetitions, Duration: c.Window, Warmup: c.Warmup, DrainDeadline: c.Drain, PollInterval: c.Poll, Pattern: c.Pattern, ReconnectObserver: c.Recovery == "database", SampleFinished: func(int) error { return waitConsumerCaughtUp(ctx, s) }} +} +func doneCase(status string) bool { return status == "complete" || status == "limited" } +func validateStudyRepetitions(c Case, value any) error { + seen := map[int]bool{} + switch r := value.(type) { + case DatabaseReport: + if err := r.Validate(); err != nil { + return err + } + if r.Repetitions != c.Repetitions { + return errors.New("database repetition controls differ") + } + return nil + case PipelineReport: + for _, run := range r.Runs { + if !run.Correct || run.Repetition < 1 || run.Repetition > c.Repetitions || seen[run.Repetition] { + return errors.New("missing, duplicate or incorrect pipeline repetition") + } + seen[run.Repetition] = true + } + case RecoveryReport: + for _, run := range r.Runs { + if !run.Correct || run.Repetition < 1 || run.Repetition > c.Repetitions || seen[run.Repetition] { + return errors.New("missing, duplicate or incorrect recovery repetition") + } + seen[run.Repetition] = true + } + default: + return errors.New("unknown study report type") + } + if len(seen) != c.Repetitions { + return errors.New("not every measured repetition was retained") + } + return nil +} +func completedRepetitions(report any) []int { + var completed []int + switch r := report.(type) { + case DatabaseReport: + counts := map[int]int{} + for _, run := range r.Runs { + if run.Correct { + counts[run.Repetition]++ + } + } + for rep, count := range counts { + if count == 3 { + completed = append(completed, rep) + } + } + case PipelineReport: + for _, run := range r.Runs { + if run.Correct { + completed = append(completed, run.Repetition) + } + } + case RecoveryReport: + for _, run := range r.Runs { + if run.Correct { + completed = append(completed, run.Repetition) + } + } + } + slices.Sort(completed) + return completed +} +func stripPipelineSamples(run *PipelineRun) { + run.AckNS = nil + run.VisibilityNS = nil + run.Backlog = nil + run.RequestSamples = nil +} +func reportSummary(value any) any { + switch r := value.(type) { + case DatabaseReport: + r.Runs = slices.Clone(r.Runs) + for i := range r.Runs { + r.Runs[i].BatchNS = nil + } + return r + case PipelineReport: + r.Runs = slices.Clone(r.Runs) + for i := range r.Runs { + stripPipelineSamples(&r.Runs[i]) + } + return r + case RecoveryReport: + r.Runs = slices.Clone(r.Runs) + for i := range r.Runs { + if r.Runs[i].Pipeline != nil { + sample := *r.Runs[i].Pipeline + stripPipelineSamples(&sample) + r.Runs[i].Pipeline = &sample + } + } + return r + default: + return nil + } +} +func studyOutcome(value any) string { + switch r := value.(type) { + case PipelineReport: + for _, run := range r.Runs { + if run.Outcome == "limited" { + return "limited" + } + } + case RecoveryReport: + for _, run := range r.Runs { + if run.Pipeline != nil && run.Pipeline.Outcome == "limited" { + return "limited" + } + for _, fault := range run.Faults { + if strings.HasSuffix(fault.Action, "_requested") && fault.ElapsedNS-fault.PlannedNS > int64(250*time.Millisecond) { + return "limited" + } + } + } + } + return "complete" +} +func populations(c Case, report any, namespace string, seed int64) []PopulationEvidence { + var result []PopulationEvidence + add := func(rep int, sets map[string][]uuid.UUID, explicit bool) { + population := PopulationEvidence{Repetition: rep, Count: c.Count, Namespace: namespace, Seed: seed + int64(rep)} + if explicit { + population.Explicit = sets + result = append(result, population) + return + } + lookup := make(map[uuid.UUID]int, c.Count) + for i := 0; i < c.Count; i++ { + id := uuid.NewSHA1(uuid.NameSpaceOID, []byte(fmt.Sprintf("%s/%d/%d", namespace, population.Seed, i))) + lookup[id] = i + } + population.Indices = map[string][]int{} + population.Extra = map[string][]uuid.UUID{} + for name, ids := range sets { + population.Indices[name] = []int{} + for _, id := range ids { + if index, ok := lookup[id]; ok { + population.Indices[name] = append(population.Indices[name], index) + } else { + population.Extra[name] = append(population.Extra[name], id) + } + } + } + result = append(result, population) + } + switch r := report.(type) { + case PipelineReport: + for _, run := range r.Runs { + add(run.Repetition, map[string][]uuid.UUID{"attempted": run.AttemptedIDs, "accepted": run.AcceptedIDs, "ambiguous": run.AmbiguousIDs, "stored": run.StoredIDs}, false) + } + case RecoveryReport: + for _, run := range r.Runs { + sets := map[string][]uuid.UUID{"accepted": run.AcceptedIDs, "stored": run.StoredIDs, "ambiguous": run.AmbiguousIDs} + if run.Pipeline != nil { + sets["attempted"] = run.Pipeline.AttemptedIDs + sets["ambiguous"] = run.Pipeline.AmbiguousIDs + } + add(run.Repetition, sets, c.Recovery == "outbox") + } + } + return result +} +func writeStudyIndex(out string, j StudyJournal, cases []Case, status string) error { + index := StudyIndex{Schema: 1, Status: status, Identity: j.Identity, RunNamespace: j.RunNamespace, ManifestFiles: j.ManifestFiles, Resources: j.Resources, MetadataArtifacts: j.MetadataArtifacts, Notes: []string{"Smoke runs verify correctness only. Full runs retain every configured repetition; limited outcomes are not capacity claims.", "Raw captures contain empirical samples and UUID population indices (or explicit outbox UUIDs); gzip mtime=0 with SHA256. Submitted IDs regenerate from namespace/seed/index.", "Failed and interrupted attempts remain in case History. A resumed incomplete case restarts all three repetitions on a fresh owned stack; completed captures are immutable."}} + for _, c := range cases { + progress := j.Cases[c.ID] + index.Cases = append(index.Cases, StudyCaseResult{Case: c, Status: progress.Status, Attempt: progress.Attempt, Artifact: progress.Artifact, History: progress.History, Summary: progress.Summary}) + } + if err := atomicJSON(filepath.Join(out, "index.json"), index); err != nil { + return err + } + file, err := os.CreateTemp(out, ".summary-*") + if err != nil { + return err + } + defer os.Remove(file.Name()) + writer := csv.NewWriter(file) + err = writer.Write([]string{"case", "kind", "status", "attempt", "completed_repetitions", "artifact", "sha256"}) + for _, c := range cases { + p := j.Cases[c.ID] + if e := writer.Write([]string{c.ID, c.Kind, p.Status, strconv.Itoa(p.Attempt), strconv.Itoa(len(p.CompletedRepetitions)), p.Artifact.Path, p.Artifact.SHA256}); err == nil { + err = e + } + } + writer.Flush() + err = errors.Join(err, writer.Error(), file.Sync(), file.Close()) + if err != nil { + return err + } + return os.Rename(file.Name(), filepath.Join(out, "summary.csv")) +} +func RunStudy(ctx context.Context, cfg StudyConfig) (result error) { + root, err := runenv.Root() + if err != nil { + return err + } + out := cfg.OutputDirectory + if out == "" { + out = filepath.Join(root, "tmp", "studies", uuid.NewString()) + } + out, err = filepath.Abs(out) + if err != nil { + return err + } + if out == root { + return errors.New("study output must be a dedicated directory") + } + existing, err := os.ReadDir(out) + if err != nil && !os.IsNotExist(err) { + return err + } + if !cfg.Resume && len(existing) > 0 { + return errors.New("refusing existing study output; use resume or a new directory") + } + if cfg.OnCaseStart != nil && !cfg.Smoke { + return errors.New("custom study hooks are restricted to correctness smoke runs") + } + cases := StudyCases() + mode := "full" + if cfg.Smoke { + cases = smokeCases() + mode = "smoke" + } + sha, sourceHash, dirty, err := sourceIdentity(ctx, root, out) + if err != nil { + return err + } + if dirty && !cfg.Smoke { + return errors.New("commit all source inputs before running a full study") + } + identity := StudyIdentity{SourceSHA: sha, SourceFingerprint: sourceHash, ControlsFingerprint: fingerprint(cases), Mode: mode, Seed: cfg.Seed, SourceDirty: dirty} + journalPath := filepath.Join(out, "journal.json") + journal := StudyJournal{Schema: 1, Identity: identity, RunNamespace: uuid.NewString(), Cases: map[string]CaseProgress{}} + if cfg.Resume { + journal, err = readJournal(journalPath) + if err != nil { + return err + } + preflight := identity + preflight.ImagesFingerprint = journal.Identity.ImagesFingerprint + preflight.ConfigFingerprint = journal.Identity.ConfigFingerprint + if err = journal.Compatible(preflight); err != nil { + return err + } + known := map[string]bool{} + allDone := true + for _, c := range cases { + known[c.ID] = true + p := journal.Cases[c.ID] + if !doneCase(p.Status) { + allDone = false + continue + } + if err = VerifyArtifact(out, p.Artifact); err != nil { + return err + } + } + for id := range journal.Cases { + if !known[id] { + return errors.New("journal contains an unknown case") + } + } + for _, ref := range append(slices.Clone(journal.Resources), journal.MetadataArtifacts...) { + if err = VerifyArtifact(out, ref); err != nil { + return err + } + } + if allDone { + if journal.Status != "complete" { + return errors.New("case captures exist but prior finalization was not verified; inspect private evidence") + } + return nil + } + } else { + for _, c := range cases { + journal.Cases[c.ID] = CaseProgress{Status: "pending"} + } + if err = atomicJSON(journalPath, journal); err != nil { + return err + } + } + rawDir := filepath.Join(out, "raw") + if info, e := os.Lstat(rawDir); e == nil && !info.IsDir() { + return errors.New("raw capture path must be a real directory") + } + if err = os.MkdirAll(rawDir, 0755); err != nil { + return err + } + writer := cfg.Writer + if writer == nil { + writer = io.Discard + } + fmt.Fprintf(writer, "study output: %s\nstudy %s: %d %s cases\n", out, journal.RunNamespace, len(cases), mode) + s, err := runenv.Start(ctx, runenv.Options{Purpose: "study", Profile: "selfhost", ExposeDependencies: true}) + if err != nil { + return err + } + bound := false + var resourceCancel context.CancelFunc + var resourceDone <-chan []ResourceSample + session := journal.ExecutionAttempts + 1 + defer func() { + if resourceCancel != nil { + resourceCancel() + samples := <-resourceDone + if bound { + ref, e := WriteCompressed(filepath.Join(out, fmt.Sprintf("resources-%d.json.gz", session)), samples) + if e == nil { + journal.Resources = append(journal.Resources, ref) + } + result = errors.Join(result, e) + } + } + restoreCtx, restoreEnd := context.WithTimeout(context.Background(), 20*time.Second) + for _, service := range []string{"postgres", "redpanda", "api", "consumer"} { + result = errors.Join(result, s.SetServiceRunning(restoreCtx, service, true)) + } + restoreEnd() + evidence, evidenceEnd := context.WithTimeout(context.Background(), 10*time.Second) + evidenceErr := s.CollectEvidence(evidence, s.Directory) + evidenceEnd() + cleanup, cleanupEnd := context.WithTimeout(context.Background(), 30*time.Second) + cleanupErr := s.Destroy(cleanup) + cleanupEnd() + result = errors.Join(result, evidenceErr, cleanupErr) + if bound { + check, checkEnd := context.WithTimeout(context.Background(), 10*time.Second) + lastSHA, lastHash, _, e := sourceIdentity(check, root, out) + checkEnd() + if e != nil || lastSHA != sha || lastHash != sourceHash { + result = errors.Join(result, errors.New("source changed during study")) + } + status := "complete" + if result != nil { + status = "failed" + if ctx.Err() != nil { + status = "incomplete" + } + } + journal.Status = status + result = errors.Join(result, atomicJSON(journalPath, journal), writeStudyIndex(out, journal, cases, status)) + } + fmt.Fprintf(writer, "owned stack evidence: %s\n", s.Directory) + }() + p, err := pgxpool.New(ctx, s.DatabaseURL) + if err != nil { + return err + } + defer p.Close() + manifest, err := CaptureManifest(ctx, s, p) + if err != nil { + return err + } + manifest.SourceSHA = sha + manifest.SourceDirty = dirty + manifest.Settings["source_cleanliness"] = "Git status excludes only the owned output directory; actual source-file fingerprint is checked again after execution" + if diagnostic, e := json.MarshalIndent(manifest, "", " "); e == nil { + _ = os.WriteFile(filepath.Join(s.Directory, "runtime-manifest.json"), diagnostic, 0600) + } + identity.ImagesFingerprint, err = imageFingerprint(ctx, manifest) + if err != nil { + return err + } + identity.ConfigFingerprint = runtimeFingerprint(manifest) + if cfg.Resume && journal.Identity.ImagesFingerprint != "" { + if err = journal.Compatible(identity); err != nil { + return err + } + } + journal.Identity = identity + bound = true + journal.ExecutionAttempts = session + journal.Status = "running" + if err = atomicJSON(journalPath, journal); err != nil { + return err + } + manifestFile := fmt.Sprintf("manifest-%d.json", session) + metadata, err := WriteJSONArtifact(filepath.Join(out, manifestFile), manifest) + if err != nil { + return err + } + journal.MetadataArtifacts = append(journal.MetadataArtifacts, metadata) + journal.ManifestFiles = append(journal.ManifestFiles, manifestFile) + if err = atomicJSON(journalPath, journal); err != nil { + return err + } + sampleCtx, cancel := context.WithCancel(ctx) + resourceCancel = cancel + resourceDone = SampleResources(sampleCtx, s) + client, err := s.HTTPClient() + if err != nil { + return err + } + defer client.CloseIdleConnections() + for _, c := range cases { + progress := journal.Cases[c.ID] + if doneCase(progress.Status) { + continue + } + if err = ctx.Err(); err != nil { + return err + } + progress.Attempt++ + progress.Status = "running" + progress.ErrorClass = "" + journal.Cases[c.ID] = progress + if err = atomicJSON(journalPath, journal); err != nil { + return err + } + fmt.Fprintf(writer, "case %s attempt %d\n", c.ID, progress.Attempt) + if cfg.OnCaseStart != nil { + cfg.OnCaseStart(c, s) + } + namespace := journal.RunNamespace + "/" + c.ID + var report any + var measurementErr error + caseCtx, caseEnd := context.WithTimeout(ctx, 6*time.Minute) + switch c.Kind { + case "database": + report, measurementErr = RunDatabase(caseCtx, DatabaseConfig{Pool: p, Workload: WorkloadConfig{Namespace: namespace, PayloadProfile: c.PayloadProfile, Seed: cfg.Seed, Count: c.Count, PayloadBytes: c.PayloadBytes, DuplicateFraction: c.DuplicateFraction}, BatchSize: c.BatchSize, Repetitions: c.Repetitions}) + case "pipeline": + report, measurementErr = RunPipeline(caseCtx, pipelineCaseConfig(caseCtx, s, p, client, c, cfg.Seed, namespace)) + case "recovery": + report, measurementErr = RunRecoveryCase(caseCtx, s, p, c, cfg.Seed, namespace) + default: + measurementErr = errors.New("unknown study case") + } + caseEnd() + if measurementErr == nil { + measurementErr = validateStudyRepetitions(c, report) + } + progress.CompletedRepetitions = completedRepetitions(report) + progress.Status = studyOutcome(report) + if measurementErr != nil { + _ = os.WriteFile(filepath.Join(s.Directory, fmt.Sprintf("%s-attempt-%d-error.txt", c.ID, progress.Attempt)), []byte(measurementErr.Error()), 0600) + progress.Status = "failed" + progress.ErrorClass = "measurement_failed" + if ctx.Err() != nil { + progress.Status = "incomplete" + progress.ErrorClass = "interrupted" + } + } + summary, e := json.Marshal(reportSummary(report)) + if e != nil { + return e + } + progress.Summary = summary + capture := StudyCapture{Schema: 1, Identity: identity, Case: c, Namespace: namespace, Status: progress.Status, ErrorClass: progress.ErrorClass, Report: report, Populations: populations(c, report, namespace, cfg.Seed)} + path := filepath.Join(rawDir, fmt.Sprintf("%s-attempt-%d.json.gz", c.ID, progress.Attempt)) + ref, e := WriteCompressed(path, capture) + if e != nil { + return e + } + ref.Path = filepath.ToSlash(filepath.Join("raw", ref.Path)) + progress.Artifact = ref + progress.History = append(progress.History, CaseAttempt{Attempt: progress.Attempt, Status: progress.Status, ErrorClass: progress.ErrorClass, Artifact: ref}) + journal.Cases[c.ID] = progress + if e = atomicJSON(journalPath, journal); e != nil { + return e + } + if e = writeStudyIndex(out, journal, cases, "incomplete"); e != nil { + return e + } + fmt.Fprintf(writer, "case %s: %s (%d repetitions retained)\n", c.ID, progress.Status, len(progress.CompletedRepetitions)) + if measurementErr != nil { + return fmt.Errorf("case %s failed; retained capture and private evidence", c.ID) + } + } + return nil +} diff --git a/internal/benchmark/study_test.go b/internal/benchmark/study_test.go new file mode 100644 index 0000000..ee3bd02 --- /dev/null +++ b/internal/benchmark/study_test.go @@ -0,0 +1,172 @@ +package benchmark + +import ( + "bytes" + "context" + "encoding/json" + "os" + "path/filepath" + "strings" + "testing" + "time" + + "github.com/feat7/ingestkit/internal/event" + "github.com/stretchr/testify/require" +) + +func TestStudyRegistryHas25ControlledCases(t *testing.T) { + cases := StudyCases() + require.Len(t, cases, 25) + counts := map[string]int{} + seen := map[string]bool{} + baseline256Batch10 := false + large := 0 + for _, c := range cases { + require.False(t, seen[c.ID]) + seen[c.ID] = true + counts[c.Kind]++ + require.Equal(t, 3, c.Repetitions) + require.Equal(t, "varied", c.PayloadProfile) + if c.Kind == "database" { + require.Equal(t, 5000, c.Count) + continue + } + if c.Kind == "pipeline" { + require.Equal(t, 10*time.Second, c.Window) + require.Equal(t, 2*time.Second, c.Warmup) + require.Equal(t, 30*time.Second, c.Drain) + require.Equal(t, 50*time.Millisecond, c.Poll) + if c.PayloadBytes == 256 && c.BatchSize == 10 { + baseline256Batch10 = true + } + if c.PayloadBytes > 256 { + large++ + require.Equal(t, 10, c.BatchSize) + } + inputs, e := Workload(WorkloadConfig{Namespace: "registry", PayloadProfile: c.PayloadProfile, Count: c.BatchSize, PayloadBytes: c.PayloadBytes}) + require.NoError(t, e) + events := []event.Input{} + for _, v := range inputs { + events = append(events, v.Input) + } + raw, e := json.Marshal(map[string]any{"events": events}) + require.NoError(t, e) + require.Less(t, len(raw), event.MaxRequestBytes) + } + } + require.Equal(t, map[string]int{"database": 11, "pipeline": 11, "recovery": 3}, counts) + require.True(t, baseline256Batch10) + require.Equal(t, 2, large) +} +func TestJournalRejectsRevisionOrControlChanges(t *testing.T) { + identity := StudyIdentity{SourceSHA: "revision", SourceFingerprint: "source", ControlsFingerprint: "controls", ImagesFingerprint: "images", ConfigFingerprint: "runtime", Seed: 42, Mode: "full"} + journal := StudyJournal{Schema: 1, Identity: identity, RunNamespace: "stable", Cases: map[string]CaseProgress{}} + require.NoError(t, journal.Compatible(identity)) + for _, field := range []string{"source", "controls", "images", "runtime", "revision", "seed", "mode"} { + changed := identity + switch field { + case "source": + changed.SourceFingerprint = "other" + case "controls": + changed.ControlsFingerprint = "other" + case "images": + changed.ImagesFingerprint = "other" + case "runtime": + changed.ConfigFingerprint = "other" + case "revision": + changed.SourceSHA = "other" + case "seed": + changed.Seed++ + case "mode": + changed.Mode = "smoke" + } + require.ErrorContains(t, journal.Compatible(changed), field) + } +} +func TestCompressedArtifactsHaveStableChecksums(t *testing.T) { + dir := t.TempDir() + value := map[string]any{"samples": []int64{1, 2, 3}, "case": "example"} + a, e := WriteCompressed(filepath.Join(dir, "a.json.gz"), value) + require.NoError(t, e) + b, e := WriteCompressed(filepath.Join(dir, "b.json.gz"), value) + require.NoError(t, e) + require.Equal(t, a.SHA256, b.SHA256) + first, e := os.ReadFile(filepath.Join(dir, "a.json.gz")) + require.NoError(t, e) + second, e := os.ReadFile(filepath.Join(dir, "b.json.gz")) + require.NoError(t, e) + require.True(t, bytes.Equal(first, second)) + _, e = WriteCompressed(filepath.Join(dir, "a.json.gz"), map[string]bool{"overwrite": true}) + require.Error(t, e) + require.NoError(t, VerifyArtifact(dir, a)) + require.Error(t, VerifyArtifact(dir, ArtifactRef{Path: "../outside", SHA256: a.SHA256})) + first[len(first)-1] ^= 1 + require.NoError(t, os.WriteFile(filepath.Join(dir, "a.json.gz"), first, 0600)) + require.Error(t, VerifyArtifact(dir, a)) +} +func TestEveryMeasuredRepetitionRetained(t *testing.T) { + r := PipelineReport{Runs: []PipelineRun{{Repetition: 1, Correct: true}, {Repetition: 2, Correct: true}, {Repetition: 3, Correct: true}}} + require.NoError(t, validateStudyRepetitions(Case{Kind: "pipeline", Repetitions: 3}, r)) + r.Runs[2].Repetition = 2 + require.Error(t, validateStudyRepetitions(Case{Kind: "pipeline", Repetitions: 3}, r)) + db := goodReport() + require.NoError(t, validateStudyRepetitions(Case{Kind: "database", Repetitions: 3}, db)) + db.Runs = db.Runs[:8] + require.Error(t, validateStudyRepetitions(Case{Kind: "database", Repetitions: 3}, db)) +} +func TestStudyRejectsOutputRootAndExistingUnownedFiles(t *testing.T) { + root, e := os.Getwd() + require.NoError(t, e) + require.Error(t, RunStudy(context.Background(), StudyConfig{OutputDirectory: root, Smoke: true})) + dir := t.TempDir() + require.NoError(t, os.WriteFile(filepath.Join(dir, "keep.txt"), []byte("preserve"), 0600)) + require.Error(t, RunStudy(context.Background(), StudyConfig{OutputDirectory: dir, Smoke: true})) + raw, e := os.ReadFile(filepath.Join(dir, "keep.txt")) + require.NoError(t, e) + require.Equal(t, "preserve", string(raw)) +} + +func TestJSONManifestArtifactsAreImmutableAndChecked(t *testing.T) { + dir := t.TempDir() + ref, e := WriteJSONArtifact(filepath.Join(dir, "manifest.json"), map[string]bool{"fsync": true}) + require.NoError(t, e) + require.NoError(t, VerifyArtifact(dir, ref)) + _, e = WriteJSONArtifact(filepath.Join(dir, "manifest.json"), map[string]bool{"fsync": false}) + require.Error(t, e) + require.NoError(t, os.WriteFile(filepath.Join(dir, "manifest.json"), []byte(`{"fsync":false}`), 0600)) + require.Error(t, VerifyArtifact(dir, ref)) +} +func TestArtifactReferenceCannotEscapeThroughDirectorySymlink(t *testing.T) { + dir, elsewhere := t.TempDir(), t.TempDir() + ref, e := WriteCompressed(filepath.Join(elsewhere, "capture.json.gz"), map[string]int{"sample": 1}) + require.NoError(t, e) + require.NoError(t, os.Symlink(elsewhere, filepath.Join(dir, "linked"))) + ref.Path = "linked/capture.json.gz" + require.Error(t, VerifyArtifact(dir, ref)) +} + +func TestImageIdentityIgnoresOnlyComposeProjectLabels(t *testing.T) { + a := `[{"Id":"first","Architecture":"arm64","Os":"linux","RootFS":{"Layers":["content-a"]},"Config":{"User":"65532","Labels":{"com.docker.compose.project":"owned-first","com.docker.compose.service":"api"}}}]` + b := strings.ReplaceAll(a, "first", "second") + x, e := canonicalImageFingerprint([]byte(a)) + require.NoError(t, e) + y, e := canonicalImageFingerprint([]byte(b)) + require.NoError(t, e) + require.Equal(t, x, y) + changed := strings.ReplaceAll(b, "content-a", "content-b") + y, e = canonicalImageFingerprint([]byte(changed)) + require.NoError(t, e) + require.NotEqual(t, x, y) + changed = strings.ReplaceAll(b, "65532", "0") + y, e = canonicalImageFingerprint([]byte(changed)) + require.NoError(t, e) + require.NotEqual(t, x, y) +} + +func TestCleanupWaitsForActualCommittedOffsets(t *testing.T) { + ends := map[int32]int64{0: 10, 1: 0, 2: 7} + require.False(t, offsetsCaughtUp(ends, map[int32]int64{0: 9, 2: 7})) + require.False(t, offsetsCaughtUp(ends, map[int32]int64{0: 11, 2: 7})) + require.False(t, offsetsCaughtUp(ends, map[int32]int64{0: 10})) + require.True(t, offsetsCaughtUp(ends, map[int32]int64{0: 10, 1: -1, 2: 7})) +} diff --git a/internal/benchmark/verification.go b/internal/benchmark/verification.go new file mode 100644 index 0000000..3684acc --- /dev/null +++ b/internal/benchmark/verification.go @@ -0,0 +1,84 @@ +package benchmark + +import ( + "context" + "encoding/json" + "errors" + "reflect" + "time" + + "github.com/feat7/ingestkit/internal/event" + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgxpool" +) + +type PipelineVerification struct { + StoredIDs []uuid.UUID + Missing, Unexpected, ContentMismatch int +} + +// VerifyPipelineRows is independent of pending-observer bookkeeping. It includes +// unplanned IDs in the case's event type and expected IDs even if their type changed. +func VerifyPipelineRows(ctx context.Context, p *pgxpool.Pool, tenant string, expected []event.Envelope, required []uuid.UUID) (PipelineVerification, error) { + var v PipelineVerification + if len(expected) == 0 { + return v, errors.New("no expected pipeline dataset") + } + ids := make([]uuid.UUID, len(expected)) + for i, e := range expected { + ids[i] = e.EventID + } + return verifySelectedRows(ctx, p, expected, required, "SELECT event_id,event_type,occurred_at,payload FROM ingestkit.events WHERE tenant_id=$1 AND (event_type=$2 OR event_id=ANY($3::uuid[]))", tenant, expected[0].EventType, ids) +} +func VerifyOutboxRows(ctx context.Context, p *pgxpool.Pool, tenant, prefix string, expected []event.Envelope, required []uuid.UUID) (PipelineVerification, error) { + if len(expected) == 0 || prefix == "" { + return PipelineVerification{}, errors.New("missing outbox namespace") + } + ids := make([]uuid.UUID, len(expected)) + for i, e := range expected { + ids[i] = e.EventID + } + return verifySelectedRows(ctx, p, expected, required, "SELECT event_id,event_type,occurred_at,payload FROM ingestkit.events WHERE tenant_id=$1 AND (event_id=ANY($2::uuid[]) OR left(payload->>'order_id',char_length($3))=$3)", tenant, ids, prefix) +} +func verifySelectedRows(ctx context.Context, p *pgxpool.Pool, expected []event.Envelope, required []uuid.UUID, query string, args ...any) (PipelineVerification, error) { + var v PipelineVerification + want := expectedEvents(expected) + rows, err := p.Query(ctx, query, args...) + if err != nil { + return v, err + } + defer rows.Close() + seen := map[uuid.UUID]bool{} + for rows.Next() { + var id uuid.UUID + var typ string + var occurred time.Time + var payload []byte + if err = rows.Scan(&id, &typ, &occurred, &payload); err != nil { + return v, err + } + v.StoredIDs = append(v.StoredIDs, id) + seen[id] = true + e, ok := want[id] + if !ok { + v.Unexpected++ + continue + } + var a, b any + if json.Unmarshal(payload, &a) != nil || json.Unmarshal(e.Payload, &b) != nil || !reflect.DeepEqual(a, b) || typ != e.EventType || !occurred.Equal(e.OccurredAt) { + v.ContentMismatch++ + } + } + if err = rows.Err(); err != nil { + return v, err + } + for _, id := range required { + if !seen[id] { + v.Missing++ + } + } + if v.Missing+v.Unexpected+v.ContentMismatch > 0 { + return v, errors.New("independent pipeline ID/content verification failed") + } + return v, nil +} diff --git a/internal/benchmark/workload.go b/internal/benchmark/workload.go index 0bb4d16..78ed958 100644 --- a/internal/benchmark/workload.go +++ b/internal/benchmark/workload.go @@ -1,16 +1,20 @@ package benchmark import ( + "crypto/sha256" "encoding/json" "errors" "fmt" "github.com/feat7/ingestkit/internal/event" "github.com/google/uuid" + "math" "strings" "time" ) type WorkloadConfig struct { + Namespace string `json:"namespace,omitempty"` + PayloadProfile string `json:"payload_profile,omitempty"` Seed int64 `json:"seed"` Count int `json:"count"` PayloadBytes int `json:"payload_bytes"` @@ -20,7 +24,7 @@ type WorkloadConfig struct { // Workload contains exactly Count submissions; duplicates repeat the original bytes. // All generation and JSON encoding happens before the database timer starts. func Workload(c WorkloadConfig) ([]event.Envelope, error) { - if c.Count <= 0 || c.PayloadBytes < 16 || c.PayloadBytes > event.MaxEventBytes-2048 || c.DuplicateFraction < 0 || c.DuplicateFraction >= 1 { + if c.Count <= 0 || c.Count > 1000000 || len(c.Namespace) > 256 || (c.PayloadProfile != "" && c.PayloadProfile != "fixed" && c.PayloadProfile != "varied") || math.IsNaN(c.DuplicateFraction) || math.IsInf(c.DuplicateFraction, 0) || c.PayloadBytes < 16 || c.PayloadBytes > event.MaxEventBytes-2048 || c.DuplicateFraction < 0 || c.DuplicateFraction >= 1 { return nil, errors.New("invalid workload count, payload size or duplicate fraction") } unique := c.Count - int(float64(c.Count)*c.DuplicateFraction) @@ -29,12 +33,34 @@ func Workload(c WorkloadConfig) ([]event.Envelope, error) { for i := 0; i < unique; i++ { prefix := fmt.Sprintf("%x", uint64(c.Seed)^uint64(i)) padding := strings.Repeat("x", c.PayloadBytes-11) + if c.PayloadProfile == "varied" { + alphabet := "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789_-" + data := make([]byte, c.PayloadBytes-11) + for offset := 0; offset < len(data); { + sum := sha256.Sum256([]byte(fmt.Sprintf("%s/%d/%d/%d", c.Namespace, c.Seed, i, offset))) + for _, b := range sum { + if offset == len(data) { + break + } + data[offset] = alphabet[int(b)&63] + offset++ + } + } + padding = string(data) + } payload, _ := json.Marshal(map[string]string{"data": padding}) // Include the seed in bounded data while preserving the requested encoded length. - if len(prefix) <= len(padding) { + if c.PayloadProfile != "varied" && len(prefix) <= len(padding) { payload, _ = json.Marshal(map[string]string{"data": prefix + padding[len(prefix):]}) } - out[i] = event.Envelope{Input: event.Input{EventID: uuid.NewSHA1(uuid.NameSpaceOID, []byte(fmt.Sprintf("%d/%d", c.Seed, i))), EventType: "checkout_event", OccurredAt: at.Add(time.Duration(i) * time.Microsecond), Payload: payload}, TenantID: "benchmark", ReceivedAt: at} + identity := fmt.Sprintf("%d/%d", c.Seed, i) + typ := "checkout_event" + if c.Namespace != "" { + identity = c.Namespace + "/" + identity + sum := sha256.Sum256([]byte(c.Namespace)) + typ = fmt.Sprintf("bench_%x", sum[:8]) + } + out[i] = event.Envelope{Input: event.Input{EventID: uuid.NewSHA1(uuid.NameSpaceOID, []byte(identity)), EventType: typ, OccurredAt: at.Add(time.Duration(i) * time.Microsecond), Payload: payload}, TenantID: "benchmark", ReceivedAt: at} } for i := unique; i < c.Count; i++ { out[i] = out[(i-unique)%unique] diff --git a/internal/benchmark/workload_test.go b/internal/benchmark/workload_test.go index beed815..764b421 100644 --- a/internal/benchmark/workload_test.go +++ b/internal/benchmark/workload_test.go @@ -3,6 +3,7 @@ package benchmark import ( "encoding/json" "github.com/stretchr/testify/require" + "math" "testing" "time" ) @@ -41,3 +42,37 @@ func TestTimingExcludesSetup(t *testing.T) { require.Equal(t, 2*time.Second, elapsed) require.EqualValues(t, 3, n) } + +func TestWorkloadNamespacesAndVariedPayloads(t *testing.T) { + c := WorkloadConfig{Namespace: "study/case-a", PayloadProfile: "varied", Seed: 7, Count: 20, PayloadBytes: 1024, DuplicateFraction: .25} + a, e := Workload(c) + require.NoError(t, e) + b, e := Workload(c) + require.NoError(t, e) + require.Equal(t, a, b) + distinct := map[byte]bool{} + for _, v := range a { + require.Len(t, v.Payload, 1024) + for _, ch := range v.Payload { + distinct[ch] = true + } + } + require.Greater(t, len(distinct), 40) + require.Equal(t, a[0], a[15]) + c.Namespace = "study/case-b" + b, e = Workload(c) + require.NoError(t, e) + require.NotEqual(t, a[0].EventID, b[0].EventID) + require.NotEqual(t, a[0].EventType, b[0].EventType) + c.PayloadProfile = "unknown" + _, e = Workload(c) + require.Error(t, e) +} +func TestWorkloadRejectsNonFiniteFractions(t *testing.T) { + for _, fraction := range []float64{math.NaN(), math.Inf(1), math.Inf(-1)} { + require.NotPanics(t, func() { + _, e := Workload(WorkloadConfig{Count: 10, PayloadBytes: 256, DuplicateFraction: fraction}) + require.Error(t, e) + }) + } +} diff --git a/internal/config/api_keys.go b/internal/config/api_keys.go new file mode 100644 index 0000000..64d0841 --- /dev/null +++ b/internal/config/api_keys.go @@ -0,0 +1,45 @@ +package config + +import ( + "encoding/json" + "errors" + "io" + "strings" +) + +// ParseAPIKeys reads a JSON object without silently remapping duplicate decoded +// key names. Errors do not echo credentials. Callers validate their key/tenant policy. +func ParseAPIKeys(raw string) (map[string]string, error) { + fail := errors.New("invalid or duplicate API_KEYS mapping") + d := json.NewDecoder(strings.NewReader(raw)) + token, err := d.Token() + if err != nil || token != json.Delim('{') { + return nil, fail + } + keys := map[string]string{} + for d.More() { + token, err = d.Token() + if err != nil { + return nil, fail + } + key, ok := token.(string) + if !ok { + return nil, fail + } + if _, exists := keys[key]; exists { + return nil, fail + } + var tenant string + if d.Decode(&tenant) != nil { + return nil, fail + } + keys[key] = tenant + } + if token, err = d.Token(); err != nil || token != json.Delim('}') { + return nil, fail + } + if d.Decode(new(any)) != io.EOF { + return nil, fail + } + return keys, nil +} diff --git a/internal/config/runtime.go b/internal/config/runtime.go index 382c801..1ad12d4 100644 --- a/internal/config/runtime.go +++ b/internal/config/runtime.go @@ -1,7 +1,6 @@ package config import ( - "encoding/json" "errors" "net/url" "strconv" @@ -35,7 +34,9 @@ func brokers(get func(string) string) []string { } func LoadAPIEnv(get func(string) string) (APIEnv, error) { c := APIEnv{ListenAddress: value(get, "HTTP_ADDR", ":8080"), Brokers: brokers(get), EventTopic: value(get, "EVENT_TOPIC", "ingestkit.events"), RateLimitRPS: 1000, PublishTimeout: 5 * time.Second} - if json.Unmarshal([]byte(get("API_KEYS")), &c.APIKeys) != nil || len(c.APIKeys) == 0 { + var err error + c.APIKeys, err = ParseAPIKeys(get("API_KEYS")) + if err != nil || len(c.APIKeys) == 0 { return c, errors.New("API_KEYS must be a nonempty JSON key-to-tenant map") } for key, tenant := range c.APIKeys { diff --git a/internal/config/runtime_test.go b/internal/config/runtime_test.go index 9eedcee..5a37a39 100644 --- a/internal/config/runtime_test.go +++ b/internal/config/runtime_test.go @@ -29,3 +29,29 @@ func TestRuntimeConfigValidation(t *testing.T) { _, err = LoadAPIEnv(get) require.Error(t, err) } + +func TestRuntimeRejectsDecodedDuplicateAPIKeys(t *testing.T) { + for _, raw := range []string{ + `{"private-canary-key":"tenant-a","private-canary-key":"tenant-b"}`, + `{"private-canary-key":"tenant-a","private\u002dcanary-key":"tenant-b"}`, + } { + t.Run(raw, func(t *testing.T) { + _, err := LoadAPIEnv(func(k string) string { + if k == "API_KEYS" { + return raw + } + return "" + }) + require.Error(t, err) + require.NotContains(t, err.Error(), "private-canary-key") + }) + } + a, err := LoadAPIEnv(func(k string) string { + if k == "API_KEYS" { + return `{"old-key":"tenant-a","new-key":"tenant-a"}` + } + return "" + }) + require.NoError(t, err) + require.Len(t, a.APIKeys, 2) +} diff --git a/internal/persistence/events.go b/internal/persistence/events.go index 7249949..d0df4ca 100644 --- a/internal/persistence/events.go +++ b/internal/persistence/events.go @@ -3,11 +3,14 @@ package persistence import ( "context" "fmt" + "strings" + "github.com/feat7/ingestkit/internal/event" - "github.com/jackc/pgx/v5" "github.com/jackc/pgx/v5/pgxpool" ) +const WriteMethod = "batch-insert" + type EventStore struct{ pool *pgxpool.Pool } type WriteResult struct { Inserted int64 @@ -20,29 +23,18 @@ func (s *EventStore) WriteBatch(ctx context.Context, events []event.Envelope) (W if len(events) == 0 { return WriteResult{}, nil } - tx, err := s.pool.Begin(ctx) - if err != nil { - return WriteResult{}, err + // One statement is one atomic transaction. Splitting it into auto-committed + // chunks would allow a failed batch to leave an unreported partial write. + args := make([]any, 0, len(events)*6) + values := make([]string, len(events)) + for i, e := range events { + n := i * 6 + values[i] = fmt.Sprintf("($%d,$%d,$%d,$%d,$%d,$%d)", n+1, n+2, n+3, n+4, n+5, n+6) + args = append(args, e.TenantID, e.EventID.String(), e.EventType, e.OccurredAt, e.ReceivedAt, []byte(e.Payload)) } - defer tx.Rollback(context.Background()) - _, err = tx.Exec(ctx, "CREATE TEMP TABLE ingestkit_stage (LIKE ingestkit.events INCLUDING DEFAULTS) ON COMMIT DROP") + tag, err := s.pool.Exec(ctx, "INSERT INTO ingestkit.events(tenant_id,event_id,event_type,occurred_at,received_at,payload) VALUES "+strings.Join(values, ",")+" ON CONFLICT (tenant_id,event_id) DO NOTHING", args...) if err != nil { return WriteResult{}, err } - columns := []string{"tenant_id", "event_id", "event_type", "occurred_at", "received_at", "payload"} - _, err = tx.CopyFrom(ctx, pgx.Identifier{"ingestkit_stage"}, columns, pgx.CopyFromSlice(len(events), func(i int) ([]any, error) { - e := events[i] - return []any{e.TenantID, e.EventID.String(), e.EventType, e.OccurredAt, e.ReceivedAt, []byte(e.Payload)}, nil - })) - if err != nil { - return WriteResult{}, fmt.Errorf("stage events: %w", err) - } - tag, err := tx.Exec(ctx, "INSERT INTO ingestkit.events (tenant_id,event_id,event_type,occurred_at,received_at,payload) SELECT tenant_id,event_id,event_type,occurred_at,received_at,payload FROM ingestkit_stage ON CONFLICT (tenant_id,event_id) DO NOTHING") - if err != nil { - return WriteResult{}, err - } - if err = tx.Commit(ctx); err != nil { - return WriteResult{}, err - } return WriteResult{Inserted: tag.RowsAffected(), Duplicates: int64(len(events)) - tag.RowsAffected()}, nil } diff --git a/internal/runenv/compose.go b/internal/runenv/compose.go index c7a12bb..e2d49c4 100644 --- a/internal/runenv/compose.go +++ b/internal/runenv/compose.go @@ -16,12 +16,17 @@ import ( "time" ) -type Options struct{ Purpose, OutputDirectory string } +type Options struct { + Purpose, OutputDirectory, Profile string + ExposeDependencies bool +} type Stack struct { APIURL, ConsumerURL, DatabaseURL, Brokers, Project, Directory string root, token, identity string env []string owned bool + profile, caPath string + exposeDependencies bool } func projectName(purpose string) string { @@ -52,6 +57,12 @@ func Root() (string, error) { } func (s *Stack) composeArgs(args ...string) []string { base := []string{"compose", "--project-directory", s.root, "-p", s.Project, "-f", filepath.Join(s.root, "docker-compose.yml")} + if s.profile == "selfhost" { + base = []string{"compose", "--project-directory", filepath.Join(s.root, "deploy"), "-p", s.Project, "-f", filepath.Join(s.root, "deploy/compose.yml"), "-f", filepath.Join(s.root, "tests/fixtures/deployment/local.yml")} + if s.exposeDependencies { + base = append(base, "-f", filepath.Join(s.root, "tests/fixtures/deployment/probes.yml")) + } + } if s.Directory != "" { base = append(base, "--env-file", filepath.Join(s.Directory, "run.env")) } @@ -61,6 +72,14 @@ func (s *Stack) docker(ctx context.Context, args ...string) (string, error) { cmd := exec.CommandContext(ctx, "docker", args...) cmd.Dir = s.root cmd.Env = append(os.Environ(), s.env...) + if s.profile == "selfhost" { + cfg, e := ReadDeploymentConfig(filepath.Join(s.Directory, "run.env")) + if e != nil { + return "", e + } + keys, _ := json.Marshal(cfg.APIKeys) + cmd.Env = append(cmd.Env, "DOMAIN="+cfg.Domain, "API_KEYS="+string(keys), "POSTGRES_ADMIN_PASSWORD="+cfg.AdminPassword, "POSTGRES_WRITER_PASSWORD="+cfg.WriterPassword) + } out, err := cmd.CombinedOutput() if err != nil { tail := string(out) @@ -81,6 +100,12 @@ func (s *Stack) Compose(ctx context.Context, args ...string) (string, error) { var errStartupCleanup = errors.New("startup cleanup failed") func Start(ctx context.Context, o Options) (*Stack, error) { + if o.Profile != "" && o.Profile != "development" && o.Profile != "selfhost" { + return nil, errors.New("unsupported deployment profile") + } + if o.ExposeDependencies && o.Profile != "selfhost" { + return nil, errors.New("dependency probes require selfhost profile") + } root, err := Root() if err != nil { return nil, err @@ -128,6 +153,17 @@ func startAttempt(ctx context.Context, root string, o Options) (result *Stack, e if err = os.MkdirAll(s.Directory, 0700); err != nil { return nil, err } + if o.Profile == "selfhost" { + if err = s.prepareDeployment(ctx, o); err != nil { + return nil, err + } + resourcesMayExist = true + err = s.startDeployment(ctx) + if err != nil { + return nil, err + } + return s, nil + } var reservations []net.Listener var ports []int for i := 0; i < 4; i++ { @@ -261,3 +297,12 @@ func (s *Stack) CollectEvidence(ctx context.Context, directory string) error { } return nil } + +// KillConsumer is a fault-injection operation restricted to this owned project. +func (s *Stack) KillConsumer(ctx context.Context) error { + if err := s.verifyOwner(ctx); err != nil { + return err + } + _, err := s.Compose(ctx, "kill", "-s", "KILL", "consumer") + return err +} diff --git a/internal/runenv/compose_test.go b/internal/runenv/compose_test.go index b076c8b..874c8e7 100644 --- a/internal/runenv/compose_test.go +++ b/internal/runenv/compose_test.go @@ -79,3 +79,8 @@ exit 0 }) } } + +func TestRunenvRejectsUnownedConsumerKill(t *testing.T) { + s := &Stack{Project: "ingestkit-unowned"} + require.Error(t, s.KillConsumer(context.Background())) +} diff --git a/internal/runenv/deployment.go b/internal/runenv/deployment.go new file mode 100644 index 0000000..76dea55 --- /dev/null +++ b/internal/runenv/deployment.go @@ -0,0 +1,123 @@ +package runenv + +import ( + "context" + "crypto/tls" + "crypto/x509" + "errors" + "fmt" + "net" + "net/http" + "net/url" + "os" + "os/exec" + "path/filepath" + "strings" + "time" +) + +func (s *Stack) APIKey() string { + if s.profile != "selfhost" { + return "local-demo-key" + } + cfg, err := ReadDeploymentConfig(filepath.Join(s.Directory, "run.env")) + if err != nil { + return "" + } + for key, tenant := range cfg.APIKeys { + if tenant == "default" { + return key + } + } + return "" +} +func (s *Stack) HTTPClient() (*http.Client, error) { + client := &http.Client{Timeout: 8 * time.Second} + if s.profile != "selfhost" { + return client, nil + } + raw, e := os.ReadFile(s.caPath) + if e != nil { + return nil, errors.New("cannot read deployment CA") + } + roots := x509.NewCertPool() + if !roots.AppendCertsFromPEM(raw) { + return nil, errors.New("invalid deployment CA") + } + client.Transport = &http.Transport{TLSClientConfig: &tls.Config{RootCAs: roots, MinVersion: tls.VersionTLS12}} + return client, nil +} +func (s *Stack) prepareDeployment(ctx context.Context, o Options) error { + s.profile = "selfhost" + s.exposeDependencies = o.ExposeDependencies + cmd := exec.CommandContext(ctx, "sh", filepath.Join(s.root, "deploy/configure.sh"), "localhost", s.Directory) + if out, err := cmd.CombinedOutput(); err != nil { + return fmt.Errorf("configure owned deployment: %w: %s", err, out) + } + cfg, err := os.ReadFile(filepath.Join(s.Directory, ".env")) + if err != nil { + return err + } + var reservations []net.Listener + defer func() { + for _, l := range reservations { + l.Close() + } + }() + ports := make([]int, 5) + for i := range ports { + l, e := net.Listen("tcp", "127.0.0.1:0") + if e != nil { + return e + } + reservations = append(reservations, l) + ports[i] = l.Addr().(*net.TCPAddr).Port + } + s.env = []string{fmt.Sprintf("INGESTKIT_HTTP_PORT=%d", ports[0]), fmt.Sprintf("INGESTKIT_HTTPS_PORT=%d", ports[1]), fmt.Sprintf("POSTGRES_PORT=%d", ports[2]), fmt.Sprintf("METRICS_PORT=%d", ports[3]), fmt.Sprintf("INGESTKIT_BROKER_PORT=%d", ports[4]), "INGESTKIT_REPO_ROOT=" + s.root, "INGESTKIT_RUN_ID=" + s.token, "RATE_LIMIT_RPS=10000", "LOG_LEVEL=info", "RETENTION_MS=604800000", "CONSUMER_GROUP=ingestkit-consumer"} + cfg = append(cfg, []byte(strings.Join(s.env, "\n")+"\n")...) + if err = os.WriteFile(filepath.Join(s.Directory, "run.env"), cfg, 0600); err != nil { + return err + } + s.APIURL = fmt.Sprintf("https://localhost:%d", ports[1]) + s.caPath = filepath.Join(s.Directory, "root.crt") + if o.ExposeDependencies { + c, e := ReadDeploymentConfig(filepath.Join(s.Directory, "run.env")) + if e != nil { + return e + } + s.DatabaseURL = fmt.Sprintf("postgres://ingestkit_admin:%s@127.0.0.1:%d/ingestkit?sslmode=disable", url.QueryEscape(c.AdminPassword), ports[2]) + s.ConsumerURL = fmt.Sprintf("http://127.0.0.1:%d", ports[3]) + s.Brokers = fmt.Sprintf("127.0.0.1:%d", ports[4]) + } + return nil +} +func (s *Stack) startDeployment(ctx context.Context) error { + if _, err := s.Compose(ctx, "up", "-d", "--build", "--wait", "--wait-timeout", "100"); err != nil { + return err + } + deadline := time.Now().Add(15 * time.Second) + for { + _, err := s.Compose(ctx, "cp", "gateway:/data/caddy/pki/authorities/local/root.crt", s.caPath) + if err == nil { + client, e := s.HTTPClient() + if e != nil { + return e + } + res, e := client.Get(s.APIURL + "/health") + if e == nil { + res.Body.Close() + if res.StatusCode == 200 { + return nil + } + } + } + if time.Now().After(deadline) { + return errors.New("local TLS deployment did not become healthy") + } + select { + case <-ctx.Done(): + return ctx.Err() + case <-time.After(100 * time.Millisecond): + } + } +} diff --git a/internal/runenv/deployment_config.go b/internal/runenv/deployment_config.go new file mode 100644 index 0000000..822ea61 --- /dev/null +++ b/internal/runenv/deployment_config.go @@ -0,0 +1,92 @@ +package runenv + +import ( + "bufio" + "errors" + "fmt" + "github.com/feat7/ingestkit/internal/config" + "github.com/feat7/ingestkit/internal/event" + "os" + "regexp" + "strings" +) + +// DeploymentConfig contains credentials. Secret fields are never serialized. +type DeploymentConfig struct { + Domain string `json:"domain"` + APIKeys map[string]string `json:"-"` + AdminPassword string `json:"-"` + WriterPassword string `json:"-"` +} + +var deploymentSecret = regexp.MustCompile(`^[0-9a-fA-F]{64}$`) +var hostnameLabel = regexp.MustCompile(`^[A-Za-z0-9](?:[A-Za-z0-9-]{0,61}[A-Za-z0-9])?$`) + +func validDeploymentDomain(domain string) bool { + if len(domain) == 0 || len(domain) > 253 || domain != "localhost" && !strings.Contains(domain, ".") { + return false + } + for _, label := range strings.Split(domain, ".") { + if !hostnameLabel.MatchString(label) { + return false + } + } + return true +} + +// ReadDeploymentConfig parses generated dotenv data; it does not expand or run +// shell expressions. Errors name a field but never echo its credential value. +func ReadDeploymentConfig(path string) (DeploymentConfig, error) { + var cfg DeploymentConfig + file, err := os.Open(path) + if err != nil { + return cfg, errors.New("cannot open deployment configuration") + } + defer file.Close() + stat, err := file.Stat() + if err != nil || !stat.Mode().IsRegular() || stat.Mode().Perm()&0077 != 0 { + return cfg, errors.New("deployment configuration must be a private regular file (0600)") + } + values := map[string]string{} + scan := bufio.NewScanner(file) + scan.Buffer(make([]byte, 1024), 65536) + for scan.Scan() { + line := strings.TrimSpace(scan.Text()) + if line == "" || strings.HasPrefix(line, "#") { + continue + } + key, value, ok := strings.Cut(line, "=") + key = strings.TrimSpace(key) + if !ok || key == "" { + return cfg, errors.New("invalid deployment configuration assignment") + } + if _, exists := values[key]; exists { + return cfg, errors.New("duplicate deployment configuration assignment") + } + values[key] = strings.TrimSpace(value) + } + if scan.Err() != nil { + return cfg, errors.New("cannot read deployment configuration") + } + cfg.Domain = values["DOMAIN"] + if !validDeploymentDomain(cfg.Domain) { + return cfg, errors.New("invalid or missing DOMAIN hostname") + } + cfg.AdminPassword = values["POSTGRES_ADMIN_PASSWORD"] + cfg.WriterPassword = values["POSTGRES_WRITER_PASSWORD"] + for _, key := range []string{"POSTGRES_ADMIN_PASSWORD", "POSTGRES_WRITER_PASSWORD"} { + if !deploymentSecret.MatchString(values[key]) { + return DeploymentConfig{}, fmt.Errorf("invalid or missing %s; use a generated 64-hex secret", key) + } + } + cfg.APIKeys, err = config.ParseAPIKeys(values["API_KEYS"]) + if err != nil || len(cfg.APIKeys) == 0 { + return DeploymentConfig{}, errors.New("invalid or missing API_KEYS mapping") + } + for key, tenant := range cfg.APIKeys { + if !deploymentSecret.MatchString(key) || !event.ValidTenant(tenant) { + return DeploymentConfig{}, errors.New("invalid API_KEYS key or tenant") + } + } + return cfg, nil +} diff --git a/internal/runenv/deployment_config_test.go b/internal/runenv/deployment_config_test.go new file mode 100644 index 0000000..bc0504f --- /dev/null +++ b/internal/runenv/deployment_config_test.go @@ -0,0 +1,115 @@ +package runenv + +import ( + "bytes" + "github.com/stretchr/testify/require" + "os" + "os/exec" + "path/filepath" + "strings" + "testing" +) + +func configure(t *testing.T, host, dir string) ([]byte, error) { + t.Helper() + root, e := Root() + require.NoError(t, e) + cmd := exec.Command("sh", filepath.Join(root, "deploy/configure.sh"), host, dir) + return cmd.CombinedOutput() +} +func TestConfigureCreatesPrivateUniqueSecrets(t *testing.T) { + seen := map[string]bool{} + for _, domain := range []string{"events.example.com", "localhost"} { + dir := filepath.Join(t.TempDir(), "settings") + out, e := configure(t, domain, dir) + require.NoError(t, e, string(out)) + path := filepath.Join(dir, ".env") + cfg, e := ReadDeploymentConfig(path) + require.NoError(t, e) + require.Equal(t, domain, cfg.Domain) + stat, e := os.Stat(path) + require.NoError(t, e) + require.EqualValues(t, 0600, stat.Mode().Perm()) + require.Len(t, cfg.APIKeys, 1) + secrets := []string{cfg.AdminPassword, cfg.WriterPassword} + for key, tenant := range cfg.APIKeys { + secrets = append(secrets, key) + require.Equal(t, "default", tenant) + } + for _, secret := range secrets { + require.Regexp(t, "^[0-9a-f]{64}$", secret) + require.False(t, seen[secret], "secrets must be independently generated") + seen[secret] = true + require.False(t, strings.Contains(string(out), secret), "script printed a secret") + } + } +} +func TestConfigureRejectsUnsafeHostname(t *testing.T) { + for _, host := range []string{"", "https://events.example.com", "events.example.com:443", "bad domain", "bad\nDOMAIN=other", "$(touch injected)", "-bad.example.com", "bad-.example.com", "a..example.com", strings.Repeat("a", 64) + ".com"} { + dir := t.TempDir() + marker := filepath.Join(dir, "injected") + if strings.Contains(host, "$(") { + host = "$(touch " + marker + ")" + } + out, e := configure(t, host, dir) + require.NoFileExists(t, marker) + require.Error(t, e) + require.NoFileExists(t, filepath.Join(dir, ".env")) + require.Contains(t, strings.ToLower(string(out)), "hostname") + } +} +func TestConfigureNeverOverwrites(t *testing.T) { + dir := t.TempDir() + _, e := configure(t, "events.example.com", dir) + require.NoError(t, e) + path := filepath.Join(dir, ".env") + before, e := os.ReadFile(path) + require.NoError(t, e) + _, e = configure(t, "other.example.com", dir) + require.Error(t, e) + after, e := os.ReadFile(path) + require.NoError(t, e) + require.True(t, bytes.Equal(before, after), "existing configuration changed") +} +func TestConfigureGenerationFailureLeavesNoConfig(t *testing.T) { + fake := t.TempDir() + require.NoError(t, os.WriteFile(filepath.Join(fake, "openssl"), []byte("#!/bin/sh\nexit 1\n"), 0700)) + t.Setenv("PATH", fake+string(os.PathListSeparator)+os.Getenv("PATH")) + dir := t.TempDir() + _, e := configure(t, "events.example.com", dir) + require.Error(t, e) + require.NoFileExists(t, filepath.Join(dir, ".env")) +} +func deploymentFixture() string { + return "DOMAIN=events.example.com\nAPI_KEYS={\"" + strings.Repeat("a", 64) + "\":\"default\"}\nPOSTGRES_ADMIN_PASSWORD=" + strings.Repeat("b", 64) + "\nPOSTGRES_WRITER_PASSWORD=" + strings.Repeat("c", 64) + "\n" +} +func TestDeploymentConfigRejectsMissingOrDuplicateFields(t *testing.T) { + raw := deploymentFixture() + for _, bad := range []string{ + strings.Replace(raw, "DOMAIN=events.example.com\n", "", 1), + strings.Replace(raw, "events.example.com", "$(touch injected)", 1), + raw + "DOMAIN=other.example.com\n", + strings.Replace(raw, strings.Repeat("b", 64), "change-me", 1), + strings.Replace(raw, strings.Repeat("c", 64), "", 1), + strings.Replace(raw, "API_KEYS={", "API_KEYS=invalid", 1), + strings.Replace(raw, `"default"`, `"bad\u0000tenant"`, 1), + strings.Replace(raw, `"default"}`, `"default","`+strings.Repeat("a", 64)+`":"other"}`, 1), + } { + path := filepath.Join(t.TempDir(), ".env") + require.NoError(t, os.WriteFile(path, []byte(bad), 0600)) + _, e := ReadDeploymentConfig(path) + require.Error(t, e) + } + path := filepath.Join(t.TempDir(), ".env") + require.NoError(t, os.WriteFile(path, []byte(raw), 0644)) + _, e := ReadDeploymentConfig(path) + require.Error(t, e, "readable secrets must be rejected") +} +func TestDeploymentConfigSupportsOverlappingKeys(t *testing.T) { + raw := strings.Replace(deploymentFixture(), `"default"}`, `"default","`+strings.Repeat("d", 64)+`":"default"}`, 1) + path := filepath.Join(t.TempDir(), ".env") + require.NoError(t, os.WriteFile(path, []byte(raw), 0600)) + cfg, e := ReadDeploymentConfig(path) + require.NoError(t, e) + require.Len(t, cfg.APIKeys, 2) +} diff --git a/internal/service/diagnostics.go b/internal/service/diagnostics.go new file mode 100644 index 0000000..b1332b3 --- /dev/null +++ b/internal/service/diagnostics.go @@ -0,0 +1,93 @@ +package service + +import ( + "context" + "errors" + "log/slog" + "net" + "regexp" + "sync" + "time" + + "github.com/jackc/pgx/v5/pgconn" +) + +type diagnosticState struct { + failed bool + last time.Time + suppressed int +} + +// Diagnostics emits bounded, allowlisted metadata. It never renders err.Error(). +type Diagnostics struct { + mu sync.Mutex + logger *slog.Logger + cooldown time.Duration + now func() time.Time + states map[string]diagnosticState +} + +func NewDiagnostics(logger *slog.Logger, cooldown time.Duration) *Diagnostics { + if logger == nil { + logger = slog.Default() + } + if cooldown <= 0 { + cooldown = 10 * time.Second + } + return &Diagnostics{logger: logger, cooldown: cooldown, now: time.Now, states: make(map[string]diagnosticState)} +} + +var diagnosticTopic = regexp.MustCompile(`^[a-zA-Z0-9._-]{1,249}$`) +var diagnosticSQLState = regexp.MustCompile(`^[A-Z0-9]{5}$`) + +func (d *Diagnostics) Report(kind, topic string, partition int32, offset int64, err error) { + switch kind { + case "startup", "storage", "quarantine", "progress": + default: + return + } + d.mu.Lock() + defer d.mu.Unlock() + state := d.states[kind] + now := d.now() + if err == nil && !state.failed { + return + } + if err != nil && state.failed && now.Sub(state.last) < d.cooldown { + state.suppressed++ + d.states[kind] = state + return + } + attrs := []any{"operation", kind, "partition", partition, "offset", offset, "suppressed", state.suppressed} + if diagnosticTopic.MatchString(topic) { + attrs = append(attrs, "topic", topic) + } + if err == nil { + d.logger.Info("consumer operation recovered", attrs...) + d.states[kind] = diagnosticState{} + return + } + class := "operation" + sqlstate := "" + var pg *pgconn.PgError + var network net.Error + switch { + case errors.Is(err, context.DeadlineExceeded): + class = "deadline" + case errors.Is(err, context.Canceled): + class = "canceled" + case errors.As(err, &pg): + class = "database" + if diagnosticSQLState.MatchString(pg.Code) { + sqlstate = pg.Code + } + case errors.As(err, &network): + class = "network" + } + attrs = append(attrs, "error_class", class) + if sqlstate != "" { + attrs = append(attrs, "sqlstate", sqlstate) + } + d.logger.Warn("consumer operation failed", attrs...) + d.states[kind] = diagnosticState{failed: true, last: now} +} diff --git a/internal/service/diagnostics_test.go b/internal/service/diagnostics_test.go new file mode 100644 index 0000000..7e45246 --- /dev/null +++ b/internal/service/diagnostics_test.go @@ -0,0 +1,41 @@ +package service + +import ( + "bytes" + "context" + "errors" + "github.com/jackc/pgx/v5/pgconn" + "github.com/stretchr/testify/require" + "log/slog" + "strings" + "testing" + "time" +) + +func TestDiagnosticsRedactsAndBoundsRepeatedFailures(t *testing.T) { + var out bytes.Buffer + d := NewDiagnostics(slog.New(slog.NewJSONHandler(&out, nil)), 10*time.Second) + now := time.Unix(100, 0) + d.now = func() time.Time { return now } + err := &pgconn.PgError{Code: "42501", Message: "secret-api-key payload-canary postgres://private:password@host/db", Detail: "payload-canary"} + for i := 0; i < 100; i++ { + d.Report("storage", "ingestkit.events", 2, 80, err) + } + require.Equal(t, 1, strings.Count(out.String(), "\n")) + require.Contains(t, out.String(), `"sqlstate":"42501"`) + now = now.Add(11 * time.Second) + d.Report("storage", "ingestkit.events", 2, 80, err) + require.Equal(t, 2, strings.Count(out.String(), "\n")) + require.Contains(t, out.String(), `"suppressed":99`) + d.Report("storage", "ingestkit.events", 2, 80, nil) + d.Report("storage", "ingestkit.events", 2, 80, nil) + require.Equal(t, 3, strings.Count(out.String(), "\n")) + require.Contains(t, out.String(), "recovered") + d.Report("storage", "ingestkit.events", 2, 81, context.DeadlineExceeded) + require.Equal(t, 4, strings.Count(out.String(), "\n")) + require.Contains(t, out.String(), `"error_class":"deadline"`) + d.Report("unknown-kind-secret", "payload-canary", -1, -1, errors.New("payload-canary")) + for _, secret := range []string{"secret-api-key", "payload-canary", "postgres://", "private:password", "unknown-kind-secret"} { + require.NotContains(t, out.String(), secret) + } +} diff --git a/scripts/test-integration.sh b/scripts/test-integration.sh index 09ca757..32d4305 100755 --- a/scripts/test-integration.sh +++ b/scripts/test-integration.sh @@ -1,4 +1,4 @@ #!/usr/bin/env bash set -euo pipefail cd "$(dirname "$0")/.." -INGESTKIT_INTEGRATION=1 go test -race -tags=integration ./tests/integration -count=1 "$@" +INGESTKIT_INTEGRATION=1 go test -race -tags=integration ./tests/integration -count=1 -timeout=20m "$@" diff --git a/tests/fixtures/deployment/Caddyfile b/tests/fixtures/deployment/Caddyfile new file mode 100644 index 0000000..e090fd1 --- /dev/null +++ b/tests/fixtures/deployment/Caddyfile @@ -0,0 +1,13 @@ +{ + admin off +} +localhost { + tls internal + @collector path /v1/events /v1/events/batch /health /ready + handle @collector { + reverse_proxy api:8080 + } + handle { + respond 404 + } +} diff --git a/tests/fixtures/deployment/local.yml b/tests/fixtures/deployment/local.yml new file mode 100644 index 0000000..ffefdea --- /dev/null +++ b/tests/fixtures/deployment/local.yml @@ -0,0 +1,6 @@ +# Owned local tests only. Never use this overlay on a public server. +services: + gateway: + ports: !override ["127.0.0.1:${INGESTKIT_HTTP_PORT}:80", "127.0.0.1:${INGESTKIT_HTTPS_PORT}:443"] + volumes: + - ${INGESTKIT_REPO_ROOT}/tests/fixtures/deployment/Caddyfile:/etc/caddy/Caddyfile:ro diff --git a/tests/fixtures/deployment/probes.yml b/tests/fixtures/deployment/probes.yml new file mode 100644 index 0000000..670548e --- /dev/null +++ b/tests/fixtures/deployment/probes.yml @@ -0,0 +1,18 @@ +# Loopback observers for owned tests and measurements only. +services: + postgres: + ports: ["127.0.0.1:${POSTGRES_PORT}:5432"] + consumer: + ports: ["127.0.0.1:${METRICS_PORT}:8081"] + redpanda: + command: !override + - redpanda + - start + - --overprovisioned + - --unsafe-bypass-fsync=false + - --smp=1 + - --memory=1G + - --reserve-memory=0M + - --kafka-addr=internal://0.0.0.0:9092,external://0.0.0.0:19092 + - --advertise-kafka-addr=internal://redpanda:9092,external://127.0.0.1:${INGESTKIT_BROKER_PORT} + ports: ["127.0.0.1:${INGESTKIT_BROKER_PORT}:19092"] diff --git a/tests/fixtures/outbox/crash_dispatch.py b/tests/fixtures/outbox/crash_dispatch.py new file mode 100644 index 0000000..141ac07 --- /dev/null +++ b/tests/fixtures/outbox/crash_dispatch.py @@ -0,0 +1,18 @@ +"""Test-only pause after a real HTTP ACK, before dispatch_once updates SQLite.""" +import os +import time +from examples.checkout.ingest_client import Client +from examples.outbox.app import dispatch_once + +class ParkAfterAck: + def __init__(self): + self.client = Client(os.environ["API_URL"], os.environ["INGESTKIT_API_KEY"], + ca_file=os.environ["INGESTKIT_CA_FILE"]) + def send_batch(self, events): + ids = self.client.send_batch(events) + print("broker-acknowledged", flush=True) + while True: + time.sleep(1) + return ids + +dispatch_once(os.environ["OUTBOX_DATABASE"], ParkAfterAck()) diff --git a/tests/integration/deployment_test.go b/tests/integration/deployment_test.go new file mode 100644 index 0000000..3f4f850 --- /dev/null +++ b/tests/integration/deployment_test.go @@ -0,0 +1,434 @@ +//go:build integration + +package integration + +import ( + "archive/tar" + "bytes" + "context" + "encoding/json" + "io" + "net/http" + "net/url" + "os" + "os/exec" + "path/filepath" + "strings" + "testing" + "time" + + "github.com/feat7/ingestkit/internal/benchmark" + "github.com/feat7/ingestkit/internal/event" + "github.com/feat7/ingestkit/internal/persistence" + "github.com/feat7/ingestkit/internal/runenv" + "github.com/google/uuid" + "github.com/jackc/pgx/v5/pgxpool" + "github.com/stretchr/testify/require" +) + +func deployment(t *testing.T, probes bool) (*runenv.Stack, context.Context) { + t.Helper() + ctx, cancel := context.WithTimeout(context.Background(), 3*time.Minute) + t.Cleanup(cancel) + s, err := runenv.Start(ctx, runenv.Options{Purpose: "selfhost-test", Profile: "selfhost", ExposeDependencies: probes}) + require.NoError(t, err) + t.Cleanup(func() { + evidence, finishEvidence := context.WithTimeout(context.Background(), 10*time.Second) + evidenceErr := s.CollectEvidence(evidence, s.Directory) + finishEvidence() + cleanup, finishCleanup := context.WithTimeout(context.Background(), 30*time.Second) + cleanupErr := s.Destroy(cleanup) + finishCleanup() + // Evidence failure must not skip cleanup or consume its time budget. + require.NoError(t, evidenceErr) + require.NoError(t, cleanupErr) + }) + return s, ctx +} +func deploymentPool(t *testing.T, ctx context.Context, s *runenv.Stack) *pgxpool.Pool { + t.Helper() + p, e := pgxpool.New(ctx, s.DatabaseURL) + require.NoError(t, e) + t.Cleanup(p.Close) + return p +} +func deploymentSend(t *testing.T, s *runenv.Stack, path, key string, body any) int { + t.Helper() + raw, e := json.Marshal(body) + require.NoError(t, e) + req, e := http.NewRequest("POST", s.APIURL+path, bytes.NewReader(raw)) + require.NoError(t, e) + req.Header.Set("Authorization", "Bearer "+key) + req.Header.Set("Content-Type", "application/json") + client, e := s.HTTPClient() + require.NoError(t, e) + res, e := client.Do(req) + require.NoError(t, e) + defer res.Body.Close() + return res.StatusCode +} +func TestSelfhostTLSFirstEventAndDuplicate(t *testing.T) { + s, ctx := deployment(t, true) + p := deploymentPool(t, ctx, s) + rawArgs, err := s.Compose(ctx, "exec", "-T", "redpanda", "sh", "-c", `for p in /proc/[0-9]*; do case "$(readlink "$p/exe" 2>/dev/null)" in */redpanda) cat "$p/cmdline"; exit 0;; esac; done; exit 1`) + require.NoError(t, err) + found := false + args := strings.Split(rawArgs, "\x00") + for i, arg := range args { + if arg == "--unsafe-bypass-fsync=false" || arg == "--unsafe-bypass-fsync=0" { + found = true + } + if arg == "--unsafe-bypass-fsync" { + require.Less(t, i+1, len(args)) + require.Contains(t, []string{"false", "0"}, args[i+1]) + found = true + } + } + require.True(t, found, "running broker must explicitly retain fsync") + for _, setting := range []string{"fsync", "synchronous_commit"} { + var value string + require.NoError(t, p.QueryRow(ctx, "SHOW "+setting).Scan(&value)) + require.Equal(t, "on", value) + } + + _, err = http.Get(s.APIURL + "/health") + require.Error(t, err, "private CA must not be implicitly trusted") + client, err := s.HTTPClient() + require.NoError(t, err) + for _, path := range []string{"/health", "/ready", "/metrics", "/admin", "/config/"} { + res, e := client.Get(s.APIURL + path) + require.NoError(t, e) + res.Body.Close() + want := 404 + if path == "/health" || path == "/ready" { + want = 200 + } + require.Equal(t, want, res.StatusCode, path) + } + a, b := freshEvent(), freshEvent() + require.Equal(t, 202, deploymentSend(t, s, "/v1/events", s.APIKey(), a)) + require.Equal(t, 202, deploymentSend(t, s, "/v1/events/batch", s.APIKey(), map[string]any{"events": []event.Input{a, b}})) + require.NoError(t, waitForIDs(ctx, p, "default", []uuid.UUID{a.EventID, b.EventID})) + var n int + require.NoError(t, p.QueryRow(ctx, "SELECT count(*) FROM ingestkit.events WHERE event_id=$1", a.EventID.String()).Scan(&n)) + require.Equal(t, 1, n) +} +func TestSelfhostPublishesOnlyGateway(t *testing.T) { + root, e := runenv.Root() + require.NoError(t, e) + dir := t.TempDir() + cmd := exec.Command("sh", filepath.Join(root, "deploy/configure.sh"), "events.example.com", dir) + require.NoError(t, cmd.Run()) + cmd = exec.Command("docker", "compose", "--env-file", filepath.Join(dir, ".env"), "-f", filepath.Join(root, "deploy/compose.yml"), "config", "--format", "json") + raw, e := cmd.Output() + require.NoError(t, e) + var config struct { + Services map[string]struct{ Ports []struct{ Target int } } + } + require.NoError(t, json.Unmarshal(raw, &config)) + require.Len(t, config.Services["gateway"].Ports, 2) + for name, service := range config.Services { + if name != "gateway" { + require.Empty(t, service.Ports, name) + } + } + + s, ctx := deployment(t, false) + ids, err := s.Compose(ctx, "ps", "-q") + require.NoError(t, err) + for _, id := range strings.Fields(ids) { + cmd := exec.CommandContext(ctx, "docker", "inspect", "--format", `{{json .NetworkSettings.Ports}}`, id) + out, e := cmd.Output() + require.NoError(t, e) + var ports map[string][]struct{ HostIP, HostPort string } + require.NoError(t, json.Unmarshal(out, &ports)) + for port, bindings := range ports { + if len(bindings) > 0 { + require.Contains(t, []string{"80/tcp", "443/tcp"}, port) + for _, b := range bindings { + require.Equal(t, "127.0.0.1", b.HostIP) + } + } + } + } + require.Empty(t, s.DatabaseURL) + require.Empty(t, s.Brokers) + require.Empty(t, s.ConsumerURL) +} +func TestSelfhostWriterPrivileges(t *testing.T) { + s, ctx := deployment(t, true) + cfg, e := runenv.ReadDeploymentConfig(filepath.Join(s.Directory, "run.env")) + require.NoError(t, e) + u, e := url.Parse(s.DatabaseURL) + require.NoError(t, e) + u.User = url.UserPassword("ingestkit_writer", cfg.WriterPassword) + p, e := pgxpool.New(ctx, u.String()) + require.NoError(t, e) + defer p.Close() + var super bool + require.NoError(t, p.QueryRow(ctx, "SELECT rolsuper FROM pg_roles WHERE rolname=current_user").Scan(&super)) + require.False(t, super) + _, e = p.Exec(ctx, "CREATE TABLE ingestkit.forbidden(id int)") + require.Error(t, e) + _, e = p.Exec(ctx, "DROP TABLE ingestkit.events") + require.Error(t, e) + var temporary bool + require.NoError(t, p.QueryRow(ctx, "SELECT has_database_privilege(current_user,current_database(),'TEMP')").Scan(&temporary)) + require.False(t, temporary) + admin := deploymentPool(t, ctx, s) + _, e = admin.Exec(ctx, "REVOKE TEMPORARY ON DATABASE ingestkit FROM PUBLIC, ingestkit_writer") + require.NoError(t, e) + _, e = p.Exec(ctx, "CREATE TEMP TABLE forbidden_temp(id int)") + require.Error(t, e, "deployed writer needs no temporary-table privilege") + input := freshEvent() + _, e = persistence.NewEventStore(p).WriteBatch(ctx, []event.Envelope{{Input: input, TenantID: "default", ReceivedAt: time.Now().UTC()}}) + require.NoError(t, e) +} +func TestSelfhostRestartPreservesIDs(t *testing.T) { + s, ctx := deployment(t, true) + p := deploymentPool(t, ctx, s) + a := freshEvent() + require.Equal(t, 202, deploymentSend(t, s, "/v1/events", s.APIKey(), a)) + require.NoError(t, waitForIDs(ctx, p, "default", []uuid.UUID{a.EventID})) + require.NoError(t, s.Stop(ctx)) + _, e := s.Compose(ctx, "up", "-d", "--wait", "--wait-timeout", "90") + require.NoError(t, e) + require.Equal(t, 202, deploymentSend(t, s, "/v1/events", s.APIKey(), a)) + require.NoError(t, waitForIDs(ctx, p, "default", []uuid.UUID{a.EventID})) + var n int + require.NoError(t, p.QueryRow(ctx, "SELECT count(*) FROM public.ingestkit_schema_migrations").Scan(&n)) + require.Equal(t, 1, n) +} +func TestSelfhostMissingConfigFails(t *testing.T) { + root, e := runenv.Root() + require.NoError(t, e) + empty := filepath.Join(t.TempDir(), "empty.env") + require.NoError(t, os.WriteFile(empty, nil, 0600)) + cmd := exec.Command("docker", "compose", "--env-file", empty, "-f", filepath.Join(root, "deploy/compose.yml"), "config", "--quiet") + cmd.Env = []string{"PATH=" + os.Getenv("PATH"), "HOME=" + os.Getenv("HOME")} + out, e := cmd.CombinedOutput() + require.Error(t, e) + require.Contains(t, string(out), "required") +} + +// This builds the real context; checking .dockerignore text would miss pattern errors. +func TestDeploymentBuildContextExcludesNestedSecrets(t *testing.T) { + root, e := runenv.Root() + require.NoError(t, e) + name := "context-canary-" + uuid.NewString() + dir := filepath.Join(root, "internal", name) + require.NoError(t, os.MkdirAll(filepath.Join(dir, "nested/private"), 0700)) + require.NoError(t, os.MkdirAll(filepath.Join(dir, "nested/backups"), 0700)) + defer os.RemoveAll(dir) + for _, path := range []string{"nested/.env", "nested/.env.production", "nested/private/key", "nested/backups/dump", "keep.txt"} { + require.NoError(t, os.WriteFile(filepath.Join(dir, path), []byte("context-canary"), 0600)) + } + image := "ingestkit-" + name + cmd := exec.Command("docker", "build", "-q", "-t", image, "-f", "-", root) + cmd.Stdin = strings.NewReader("FROM scratch\nCOPY . /context\nCMD [\"unused\"]\n") + out, e := cmd.CombinedOutput() + require.NoError(t, e, string(out)) + defer exec.Command("docker", "image", "rm", image).Run() + out, e = exec.Command("docker", "create", image).Output() + require.NoError(t, e) + id := strings.TrimSpace(string(out)) + defer exec.Command("docker", "rm", id).Run() + cmd = exec.Command("docker", "export", id) + reader, e := cmd.StdoutPipe() + require.NoError(t, e) + require.NoError(t, cmd.Start()) + tr := tar.NewReader(reader) + found := false + for { + h, e := tr.Next() + if e == io.EOF { + break + } + require.NoError(t, e) + if strings.Contains(h.Name, name+"/") { + require.NotContains(t, h.Name, ".env") + require.NotContains(t, h.Name, "/private/") + require.NotContains(t, h.Name, "/backups/") + if strings.HasSuffix(h.Name, "/keep.txt") { + found = true + } + } + } + require.NoError(t, cmd.Wait()) + require.True(t, found, "positive context control must be copied") +} + +func TestWriteDeniedMakesDeploymentUnready(t *testing.T) { + s, ctx := deployment(t, true) + p := deploymentPool(t, ctx, s) + _, e := p.Exec(ctx, "REVOKE INSERT ON ingestkit.events FROM ingestkit_writer") + require.NoError(t, e) + t.Cleanup(func() { + c, end := context.WithTimeout(context.Background(), 5*time.Second) + defer end() + _, _ = p.Exec(c, "GRANT INSERT ON ingestkit.events TO ingestkit_writer") + }) + a := freshEvent() + a.Payload = json.RawMessage(`{"private":"payload-secret-canary"}`) + require.Equal(t, 202, deploymentSend(t, s, "/v1/events", s.APIKey(), a)) + require.NoError(t, waitStatus(ctx, s.ConsumerURL+"/ready", 503)) + cfg, e := runenv.ReadDeploymentConfig(filepath.Join(s.Directory, "run.env")) + require.NoError(t, e) + u, e := url.Parse(s.DatabaseURL) + require.NoError(t, e) + u.User = url.UserPassword("ingestkit_writer", cfg.WriterPassword) + writer, e := pgxpool.New(ctx, u.String()) + require.NoError(t, e) + defer writer.Close() + require.NoError(t, writer.Ping(ctx)) + var n int + require.NoError(t, p.QueryRow(ctx, "SELECT count(*) FROM ingestkit.events WHERE event_id=$1", a.EventID.String()).Scan(&n)) + require.Zero(t, n) + logs, e := s.Compose(ctx, "logs", "--no-color", "consumer") + require.NoError(t, e) + require.Contains(t, logs, `"sqlstate":"42501"`) + for _, secret := range []string{s.APIKey(), cfg.WriterPassword, cfg.AdminPassword, "payload-secret-canary"} { + require.NotContains(t, logs, secret) + } + _, e = p.Exec(ctx, "GRANT INSERT ON ingestkit.events TO ingestkit_writer") + require.NoError(t, e) + require.NoError(t, waitForIDs(ctx, p, "default", []uuid.UUID{a.EventID})) + require.NoError(t, waitStatus(ctx, s.ConsumerURL+"/ready", 200)) +} +func replaceDeploymentKeys(t *testing.T, s *runenv.Stack, keys map[string]string) { + t.Helper() + path := filepath.Join(s.Directory, "run.env") + raw, e := os.ReadFile(path) + require.NoError(t, e) + encoded, e := json.Marshal(keys) + require.NoError(t, e) + lines := strings.Split(string(raw), "\n") + for i, line := range lines { + if strings.HasPrefix(line, "API_KEYS=") { + lines[i] = "API_KEYS=" + string(encoded) + } + } + require.NoError(t, os.WriteFile(path, []byte(strings.Join(lines, "\n")), 0600)) +} +func TestCredentialOverlapAndRefresh(t *testing.T) { + s, ctx := deployment(t, true) + p := deploymentPool(t, ctx, s) + old := s.APIKey() + newKey := strings.ReplaceAll(uuid.NewString()+uuid.NewString(), "-", "") + a, b := freshEvent(), freshEvent() + require.Equal(t, 202, deploymentSend(t, s, "/v1/events", old, a)) + replaceDeploymentKeys(t, s, map[string]string{old: "default", newKey: "default"}) + _, e := s.Compose(ctx, "up", "-d", "--no-deps", "--force-recreate", "--wait", "api") + require.NoError(t, e) + require.Equal(t, 202, deploymentSend(t, s, "/v1/events", old, a)) + require.Equal(t, 202, deploymentSend(t, s, "/v1/events", newKey, b)) + replaceDeploymentKeys(t, s, map[string]string{newKey: "default"}) + _, e = s.Compose(ctx, "up", "-d", "--no-deps", "--force-recreate", "--wait", "api") + require.NoError(t, e) + require.Equal(t, 401, deploymentSend(t, s, "/v1/events", old, a)) + require.Equal(t, 202, deploymentSend(t, s, "/v1/events", newKey, b)) + require.NoError(t, waitForIDs(ctx, p, "default", []uuid.UUID{a.EventID, b.EventID})) +} +func TestBackupRestoresIntoOwnedReplacement(t *testing.T) { + source, ctx := deployment(t, true) + sourcePool := deploymentPool(t, ctx, source) + a := freshEvent() + require.Equal(t, 202, deploymentSend(t, source, "/v1/events", source.APIKey(), a)) + require.NoError(t, waitForIDs(ctx, sourcePool, "default", []uuid.UUID{a.EventID})) + dump, e := source.Compose(ctx, "exec", "-T", "postgres", "pg_dump", "-U", "ingestkit_admin", "-d", "ingestkit", "-Fc") + require.NoError(t, e) + require.True(t, strings.HasPrefix(dump, "PGDMP")) + replacement, replacementCtx := deployment(t, true) + p := deploymentPool(t, replacementCtx, replacement) + require.NotEqual(t, source.Project, replacement.Project) + require.NoError(t, replacement.SetServiceRunning(replacementCtx, "consumer", false)) + var n int + require.NoError(t, p.QueryRow(replacementCtx, "SELECT count(*) FROM ingestkit.events").Scan(&n)) + require.Zero(t, n, "restore target must be an owned empty replacement") + // Recreate only this test-owned empty database so the documented restore is + // exercised without --clean or a pre-existing migration/table scaffold. + p.Close() + _, e = replacement.Compose(replacementCtx, "exec", "-T", "postgres", "psql", "-U", "ingestkit_admin", "-d", "postgres", "-v", "ON_ERROR_STOP=1", "-c", "DROP DATABASE ingestkit WITH (FORCE)") + require.NoError(t, e) + _, e = replacement.Compose(replacementCtx, "exec", "-T", "postgres", "psql", "-U", "ingestkit_admin", "-d", "postgres", "-v", "ON_ERROR_STOP=1", "-c", "CREATE DATABASE ingestkit OWNER ingestkit_admin") + require.NoError(t, e) + p = deploymentPool(t, replacementCtx, replacement) + + path := filepath.Join(t.TempDir(), "snapshot.dump") + require.NoError(t, os.WriteFile(path, []byte(dump), 0600)) + _, e = replacement.Compose(replacementCtx, "cp", path, "postgres:/tmp/snapshot.dump") + require.NoError(t, e) + _, e = replacement.Compose(replacementCtx, "exec", "-T", "postgres", "pg_restore", "-U", "ingestkit_admin", "-d", "ingestkit", "--exit-on-error", "/tmp/snapshot.dump") + require.NoError(t, e) + require.NoError(t, replacement.SetServiceRunning(replacementCtx, "consumer", true)) + b := freshEvent() + require.Equal(t, 202, deploymentSend(t, replacement, "/v1/events/batch", replacement.APIKey(), map[string]any{"events": []event.Input{a, b}})) + require.NoError(t, waitForIDs(replacementCtx, p, "default", []uuid.UUID{a.EventID, b.EventID})) + var payload string + require.NoError(t, p.QueryRow(replacementCtx, "SELECT payload->>'amount' FROM ingestkit.events WHERE event_id=$1", a.EventID.String()).Scan(&payload)) + require.Equal(t, "25", payload) + require.NoError(t, waitForIDs(ctx, sourcePool, "default", []uuid.UUID{a.EventID})) + require.NoError(t, sourcePool.QueryRow(ctx, "SELECT count(*) FROM ingestkit.events WHERE event_id=$1", b.EventID.String()).Scan(&n)) + require.Zero(t, n) +} + +func TestReusableClientsThroughHTTPS(t *testing.T) { + s, ctx := deployment(t, true) + p := deploymentPool(t, ctx, s) + root, e := runenv.Root() + require.NoError(t, e) + events := []event.Input{freshEvent(), freshEvent(), freshEvent()} + raw, e := json.Marshal(map[string]any{"events": events}) + require.NoError(t, e) + fixture := filepath.Join(t.TempDir(), "events.json") + require.NoError(t, os.WriteFile(fixture, raw, 0600)) + baseEnv := append(os.Environ(), "API_URL="+s.APIURL, "INGESTKIT_API_KEY="+s.APIKey(), "INGESTKIT_CA_FILE="+filepath.Join(s.Directory, "root.crt"), "EVENTS_FILE="+fixture) + for _, language := range []struct{ binary, path string }{{"python3", "examples/checkout/send.py"}, {"node", "examples/checkout/send.mjs"}} { + for _, mode := range []string{"single", "batch"} { + cmd := exec.CommandContext(ctx, language.binary, language.path) + cmd.Dir = root + cmd.Env = append(baseEnv, "SEND_MODE="+mode) + out, e := cmd.CombinedOutput() + require.NoError(t, e, string(out)) + require.Contains(t, string(out), "accepted") + } + } + // Verify the documented Python package import as well as direct-file CLIs. + cmd := exec.CommandContext(ctx, "python3", "-c", `import json,os; from examples.checkout.ingest_client import Client; c=Client(os.environ['API_URL'],os.environ['INGESTKIT_API_KEY'],ca_file=os.environ['INGESTKIT_CA_FILE']); c.send(json.load(open(os.environ['EVENTS_FILE']))['events'][0])`) + cmd.Dir = root + cmd.Env = baseEnv + out, e := cmd.CombinedOutput() + require.NoError(t, e, string(out)) + ids := []uuid.UUID{} + for _, event := range events { + ids = append(ids, event.EventID) + } + require.NoError(t, waitForIDs(ctx, p, "default", ids)) +} + +func TestSelfhostPipelineUsesTrustedHTTPS(t *testing.T) { + s, ctx := deployment(t, true) + p := deploymentPool(t, ctx, s) + client, e := s.HTTPClient() + require.NoError(t, e) + report, e := benchmark.RunPipeline(ctx, benchmark.PipelineConfig{Pool: p, HTTPClient: client, Namespace: "https-" + uuid.NewString(), APIURL: s.APIURL, APIKey: s.APIKey(), Tenant: "default", Rate: 20, Concurrency: 2, Duration: time.Second, Warmup: 100 * time.Millisecond, DrainDeadline: 15 * time.Second, PollInterval: 25 * time.Millisecond, BatchSize: 2, PayloadBytes: 128, Pattern: "steady", Seed: 98, Repetitions: 3}) + require.NoError(t, e) + require.Len(t, report.Runs, 3) + for _, run := range report.Runs { + require.True(t, run.Correct) + require.Equal(t, 20, run.Persisted) + require.Positive(t, run.ObserverQueries) + } + manifest, e := benchmark.CaptureManifest(ctx, s, p) + require.NoError(t, e) + require.Equal(t, "1G", manifest.Settings["redpanda_memory"]) + require.Equal(t, 1, manifest.Settings["redpanda_smp"]) + require.Equal(t, true, manifest.Settings["api_tls"]) + raw, e := json.Marshal(manifest) + require.NoError(t, e) + cfg, e := runenv.ReadDeploymentConfig(filepath.Join(s.Directory, "run.env")) + require.NoError(t, e) + for _, secret := range []string{s.APIKey(), cfg.WriterPassword, cfg.AdminPassword, "postgres://"} { + require.NotContains(t, string(raw), secret) + } +} diff --git a/tests/integration/outbox_test.go b/tests/integration/outbox_test.go new file mode 100644 index 0000000..03e995c --- /dev/null +++ b/tests/integration/outbox_test.go @@ -0,0 +1,131 @@ +//go:build integration + +package integration + +import ( + "bufio" + "context" + "encoding/json" + "net/http" + "os" + "os/exec" + "path/filepath" + "testing" + "time" + + "github.com/feat7/ingestkit/internal/runenv" + "github.com/google/uuid" + "github.com/stretchr/testify/require" +) + +func outboxCommand(t *testing.T, ctx context.Context, s *runenv.Stack, database string, args ...string) ([]byte, error) { + t.Helper() + root, e := runenv.Root() + require.NoError(t, e) + command := append([]string{"-m", "examples.outbox"}, args...) + command = append(command, "--database", database) + cmd := exec.CommandContext(ctx, "python3", command...) + cmd.Dir = root + cmd.Env = append(os.Environ(), "API_URL="+s.APIURL, "INGESTKIT_API_KEY="+s.APIKey(), "INGESTKIT_CA_FILE="+filepath.Join(s.Directory, "root.crt")) + return cmd.CombinedOutput() +} +func createOutboxOrder(t *testing.T, ctx context.Context, s *runenv.Stack, database string) uuid.UUID { + t.Helper() + out, e := outboxCommand(t, ctx, s, database, "create-order", "--order-id", "order-"+uuid.NewString(), "--amount-cents", "2500") + require.NoError(t, e, string(out)) + var created struct { + ID uuid.UUID `json:"event_id"` + } + require.NoError(t, json.Unmarshal(out, &created)) + require.NotEqual(t, uuid.Nil, created.ID) + return created.ID +} +func assertOutboxState(t *testing.T, ctx context.Context, s *runenv.Stack, database, state string, n int) { + t.Helper() + out, e := outboxCommand(t, ctx, s, database, "status") + require.NoError(t, e, string(out)) + var counts map[string]json.RawMessage + require.NoError(t, json.Unmarshal(out, &counts)) + var found int + require.NoError(t, json.Unmarshal(counts[state], &found)) + require.Equal(t, n, found) +} +func TestOutboxSurvivesBrokerOutage(t *testing.T) { + s, ctx := deployment(t, true) + p := deploymentPool(t, ctx, s) + database := filepath.Join(t.TempDir(), "orders.db") + id := createOutboxOrder(t, ctx, s, database) + require.NoError(t, s.SetServiceRunning(ctx, "redpanda", false)) + t.Cleanup(func() { + end, c := context.WithTimeout(context.Background(), 30*time.Second) + defer c() + require.NoError(t, s.SetServiceRunning(end, "redpanda", true)) + }) + out, e := outboxCommand(t, ctx, s, database, "dispatch", "--max-attempts", "1") + require.Error(t, e) + require.Contains(t, string(out), `"acknowledged": 0`) + assertOutboxState(t, ctx, s, database, "pending", 1) + require.NoError(t, s.SetServiceRunning(ctx, "redpanda", true)) + client, e := s.HTTPClient() + require.NoError(t, e) + require.Eventually(t, func() bool { + res, e := client.Get(s.APIURL + "/ready") + if e != nil { + return false + } + defer res.Body.Close() + return res.StatusCode == http.StatusOK + }, 30*time.Second, 100*time.Millisecond) + out, e = outboxCommand(t, ctx, s, database, "dispatch") + require.NoError(t, e, string(out)) + assertOutboxState(t, ctx, s, database, "acknowledged", 1) + require.NoError(t, waitForIDs(ctx, p, "default", []uuid.UUID{id})) +} +func TestOutboxCrashAfterAckReplaysSafely(t *testing.T) { + s, ctx := deployment(t, true) + p := deploymentPool(t, ctx, s) + database := filepath.Join(t.TempDir(), "orders.db") + id := createOutboxOrder(t, ctx, s, database) + root, e := runenv.Root() + require.NoError(t, e) + script, e := os.ReadFile(filepath.Join(root, "tests/fixtures/outbox/crash_dispatch.py")) + require.NoError(t, e) + cmd := exec.CommandContext(ctx, "python3", "-c", string(script)) + cmd.Dir = root + cmd.Env = append(os.Environ(), "API_URL="+s.APIURL, "INGESTKIT_API_KEY="+s.APIKey(), "INGESTKIT_CA_FILE="+filepath.Join(s.Directory, "root.crt"), "OUTBOX_DATABASE="+database) + stdout, e := cmd.StdoutPipe() + require.NoError(t, e) + require.NoError(t, cmd.Start()) + defer func() { + if cmd.ProcessState == nil { + _ = cmd.Process.Kill() + _ = cmd.Wait() + } + }() + signaled := make(chan string, 1) + go func() { + scanner := bufio.NewScanner(stdout) + if scanner.Scan() { + signaled <- scanner.Text() + } else { + signaled <- "child exited before ACK" + } + }() + select { + case line := <-signaled: + require.Equal(t, "broker-acknowledged", line) + case <-ctx.Done(): + t.Fatal(ctx.Err()) + } + require.NoError(t, cmd.Process.Kill()) + require.Error(t, cmd.Wait()) + assertOutboxState(t, ctx, s, database, "pending", 1) + require.NoError(t, waitForIDs(ctx, p, "default", []uuid.UUID{id})) + out, e := outboxCommand(t, ctx, s, database, "dispatch") + require.NoError(t, e, string(out)) + assertOutboxState(t, ctx, s, database, "acknowledged", 1) + require.NoError(t, waitForIDs(ctx, p, "default", []uuid.UUID{id})) + var n int + require.NoError(t, p.QueryRow(ctx, "SELECT count(*) FROM ingestkit.events WHERE tenant_id='default' AND event_id=$1", id.String()).Scan(&n)) + require.Equal(t, 1, n) +} diff --git a/tests/integration/pipeline_test.go b/tests/integration/pipeline_test.go index aa8f6da..97fc80d 100644 --- a/tests/integration/pipeline_test.go +++ b/tests/integration/pipeline_test.go @@ -7,6 +7,7 @@ import ( "context" "encoding/json" "fmt" + "github.com/feat7/ingestkit/internal/benchmark" "github.com/feat7/ingestkit/internal/event" "github.com/feat7/ingestkit/internal/runenv" "github.com/google/uuid" @@ -18,6 +19,7 @@ import ( "net/http" "os" "os/exec" + "strings" "testing" "time" ) @@ -196,3 +198,37 @@ func TestBrokerAcknowledgementsUseDiskFlush(t *testing.T) { require.True(t, found, "topic durability configuration must be observable") } } + +func TestBrokerDoesNotBypassFsync(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 5*time.Second) + defer cancel() + // Inspect the running broker, since the dev-container mode adds flags that do + // not appear literally in Compose or in the topic configuration response. + command := `for p in /proc/[0-9]*; do case "$(readlink "$p/exe" 2>/dev/null)" in */redpanda) cat "$p/cmdline"; exit 0;; esac; done; exit 1` + raw, err := stack.Compose(ctx, "exec", "-T", "redpanda", "sh", "-c", command) + require.NoError(t, err) + args := strings.Split(strings.TrimRight(raw, "\x00"), "\x00") + require.NotEmpty(t, args) + require.True(t, strings.HasSuffix(args[0], "/redpanda")) + for i, arg := range args { + if strings.HasPrefix(arg, "--unsafe-bypass-fsync=") { + require.Contains(t, []string{"false", "0"}, strings.TrimPrefix(arg, "--unsafe-bypass-fsync="), "broker acknowledgements must not bypass fsync") + } + if arg == "--unsafe-bypass-fsync" { + require.Less(t, i+1, len(args)) + require.Contains(t, []string{"false", "0"}, args[i+1]) + } + } +} + +func TestBenchmarkManifestRecordsBrokerFsync(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second) + defer cancel() + manifest, err := benchmark.CaptureManifest(ctx, stack, pool) + require.NoError(t, err) + raw, err := json.Marshal(manifest) + require.NoError(t, err) + var fields map[string]any + require.NoError(t, json.Unmarshal(raw, &fields)) + require.Equal(t, false, fields["broker_fsync_bypass"], "future performance captures must include the effective broker fsync state") +} diff --git a/tests/integration/study_test.go b/tests/integration/study_test.go new file mode 100644 index 0000000..a2c6586 --- /dev/null +++ b/tests/integration/study_test.go @@ -0,0 +1,120 @@ +//go:build integration + +package integration + +import ( + "context" + "encoding/json" + "os" + "path/filepath" + "testing" + "time" + + "github.com/feat7/ingestkit/internal/benchmark" + "github.com/feat7/ingestkit/internal/runenv" + "github.com/google/uuid" + "github.com/stretchr/testify/require" +) + +func TestStudySmokeAndImmutableResume(t *testing.T) { + ctx, cancel := context.WithTimeout(context.Background(), 2*time.Minute) + defer cancel() + dir := t.TempDir() + first, stopFirst := context.WithCancel(ctx) + cfg := benchmark.StudyConfig{OutputDirectory: dir, Smoke: true, Seed: 42, OnCaseStart: func(c benchmark.Case, _ *runenv.Stack) { + if c.Kind == "pipeline" { + stopFirst() + } + }} + require.Error(t, benchmark.RunStudy(first, cfg)) + stopFirst() + partialRaw, e := os.ReadFile(filepath.Join(dir, "index.json")) + require.NoError(t, e) + var partial benchmark.StudyIndex + require.NoError(t, json.Unmarshal(partialRaw, &partial)) + databaseRef := partial.Cases[0].Artifact + databaseBytes, e := os.ReadFile(filepath.Join(dir, databaseRef.Path)) + require.NoError(t, e) + // Resume on a fresh owned stack; the completed database case stays immutable. + cfg.OnCaseStart = nil + cfg.Resume = true + require.NoError(t, benchmark.RunStudy(ctx, cfg)) + raw, e := os.ReadFile(filepath.Join(dir, "index.json")) + require.NoError(t, e) + var index benchmark.StudyIndex + require.NoError(t, json.Unmarshal(raw, &index)) + require.Equal(t, "complete", index.Status) + require.Equal(t, "smoke", index.Identity.Mode) + require.Len(t, index.Cases, 2) + require.Equal(t, databaseRef, index.Cases[0].Artifact) + require.Equal(t, 1, index.Cases[0].Attempt) + preserved, e := os.ReadFile(filepath.Join(dir, databaseRef.Path)) + require.NoError(t, e) + require.Equal(t, databaseBytes, preserved) + + captures := map[string][]byte{} + for _, c := range index.Cases { + require.Contains(t, []string{"complete", "limited"}, c.Status) + require.NoError(t, benchmark.VerifyArtifact(dir, c.Artifact)) + raw, e := os.ReadFile(filepath.Join(dir, c.Artifact.Path)) + require.NoError(t, e) + captures[c.Artifact.Path] = raw + } + cfg.Resume = true + require.NoError(t, benchmark.RunStudy(ctx, cfg)) + for path, expected := range captures { + actual, e := os.ReadFile(filepath.Join(dir, path)) + require.NoError(t, e) + require.Equal(t, expected, actual) + } + cfg.Seed++ + require.Error(t, benchmark.RunStudy(ctx, cfg)) +} +func TestStudyInterruptPreservesEvidenceAndOwnership(t *testing.T) { + ctx, cancel := context.WithCancel(context.Background()) + defer cancel() + dir := t.TempDir() + var owned *runenv.Stack + err := benchmark.RunStudy(ctx, benchmark.StudyConfig{OutputDirectory: dir, Smoke: true, Seed: 42, OnCaseStart: func(_ benchmark.Case, s *runenv.Stack) { owned = s; cancel() }}) + require.Error(t, err) + require.NotNil(t, owned) + require.FileExists(t, filepath.Join(dir, "journal.json")) + require.FileExists(t, filepath.Join(owned.Directory, "services.log")) + probe, end := context.WithTimeout(context.Background(), 10*time.Second) + defer end() + ids, e := owned.Compose(probe, "ps", "-a", "-q") + require.NoError(t, e) + require.Empty(t, ids) + original := owned.Project + owned.Project = stack.Project + require.Error(t, owned.Stop(probe)) + owned.Project = original + require.NoError(t, waitStatus(probe, stack.APIURL+"/ready", 200)) +} +func TestStudyRecoveryExperimentsRecordRealFaults(t *testing.T) { + s, _ := deployment(t, true) + ctx, cancel := context.WithTimeout(context.Background(), 6*time.Minute) + defer cancel() + p := deploymentPool(t, ctx, s) + for _, c := range benchmark.StudyCases() { + if c.Kind != "recovery" { + continue + } + t.Run(c.ID, func(t *testing.T) { + report, e := benchmark.RunRecoveryCase(ctx, s, p, c, 42, "recovery-test-"+uuid.NewString()) + require.NoError(t, e) + require.Len(t, report.Runs, 3) + for _, r := range report.Runs { + require.True(t, r.Correct) + require.GreaterOrEqual(t, len(r.Faults), 2) + require.NotEmpty(t, r.AcceptedIDs) + require.ElementsMatch(t, r.AcceptedIDs, r.StoredIDs) + if c.Recovery == "outbox" { + require.GreaterOrEqual(t, r.FirstAttemptNS, int64(5*time.Second)) + require.Contains(t, []string{"http_503", "delivery_uncertain"}, r.FirstAttemptStatus) + require.Len(t, r.AmbiguousIDs, 100) + } + } + }) + } +}