Skip to content

design(id): DoS suite & performance benchmark programme — adversarial CI coverage and per-interface regression gates #5685

Open

Description

@dezren39

Summary

Two programmes in one design, because they share infrastructure and each is half as useful without the other:

  1. A denial-of-service test suite in CI — adversarial load and abuse coverage that runs continuously, extending id(world): F12.18 denial-of-service test suite in CI #560 (F12.18 DoS test suite in CI) from a test-suite idea into a full adversarial programme.
  2. A performance benchmark programme — repeatable, comparable benchmarks of a standard server and of advanced scaling techniques, per interface, run as regression gates, not one-offs.

Relates to: #560.

Why both, why together

  • A system can pass benchmarks and still fall over under adversarial traffic; it can survive abuse and still be unusably slow for honest users. The load-generation, measurement, and environment machinery is largely the same — designing them separately duplicates it and guarantees the two suites drift into incomparable numbers.
  • Benchmarks without gates decay into dashboard decoration. DoS tests without baselines cannot distinguish "attack worked" from "server was already slow." Each programme supplies what the other lacks.

Part 1 — DoS / adversarial load suite (extends #560)

Threat and load classes to cover

  • Connection-level abuse: slow clients (slowloris-style), connection floods, half-open churn, oversized / never-ending requests, rapid reconnect storms.
  • Request-level abuse: expensive-query amplification, large payload / blob abuse, decompression and parsing bombs within protocol limits, request floods against the costliest endpoints (identify them — do not guess).
  • Protocol / interface abuse: per transport surface (each protocol id speaks): malformed frames, replay floods, capability-check bypass attempts via volume, federation / bridge traffic floods from a single peer.
  • State-exhaustion: storage growth attacks (journal / blob / index bloat), memory pressure via concurrent worlds / sessions, descriptor and task exhaustion equivalents in the server's runtime.
  • Fairness attacks: one tenant / world / identity starving others; noisy-neighbour scenarios in multi-world hosting.
  • Legitimate-surge control cases: flash-crowd patterns that are NOT attacks — the suite must show the server degrades gracefully rather than treating all load as hostile (rate-limit false-positive measurement).

Suite design requirements

  • In CI, but tiered: a fast adversarial smoke tier on every relevant change, a heavier suite on a schedule / merge queue, and a soak tier run less frequently — with explicit budgets so CI time does not explode.
  • Deterministic enough to gate on: pass/fail expressed as server behaviour under a defined load profile (stays responsive to a health probe, rejects excess within stated latency, recovers within N seconds after load stops), not as raw throughput numbers that flake between runners.
  • Recovery is part of the test: every scenario asserts post-attack recovery — no restart required, no corrupted state, queues drain, honest clients succeed again.
  • Blast-radius safety: the suite must never be runnable against a shared / production target by accident — environment guards, dedicated fixtures, and load-generator isolation.
  • Findings loop: a failing DoS scenario files / links a hardening follow-up; the suite is a source of hardening tickets, not just a gate.

Part 2 — Performance benchmark programme

The standard baseline

  • One standard server: a single, fixed, documented reference configuration (hardware class or CI runner class, server build, single database, default settings) that is THE baseline every result is compared against. Changing the baseline is a versioned event, announced and re-measured, never a silent drift.
  • Baseline workload suite: representative honest workloads — identity operations, capability checks, journal append/read, world sync, blob transfer — at defined scales (single user, small community, large world).

Advanced scaling techniques (measured against the baseline)

Each technique is benchmarked as baseline-vs-technique on identical workloads, reporting gain, cost, and complexity honestly — including "no gain" results:

  • Workers: additional worker processes / threads / async capacity — scaling curve as workers are added, and the point of diminishing returns.
  • Additional / sharded databases: extra database instances, read replicas, and sharded storage — which workloads actually benefit, cross-shard costs, and consistency-visible effects.
  • Other techniques the design identifies (caching layers, connection pooling, batching) — admitted only with the same baseline-comparison discipline.

Per-interface comparisons

  • Every benchmark that touches the network is run per interface: each transport / protocol surface id exposes, on identical workloads, so interface choice becomes a measured fact (throughput, latency percentiles, CPU per operation, behaviour under the Part 1 load profiles) rather than folklore.
  • A published comparison matrix: interface × workload × configuration (baseline / scaled), kept current by the programme rather than by one-off measurements.

Benchmarks as regression gates

  • Thresholds, not eyeballs: each gated metric has a regression budget (e.g. p95 latency or ops/sec may not regress beyond X% vs the stored baseline without an explicit, reviewed waiver recorded on the PR / issue).
  • Noise discipline: runner variance measured and published; gates tuned so real regressions fail and noise does not — including the procedure for re-baselining when a change is intentionally slower (with the trade-off stated).
  • Artefacts: every run stores machine-readable results (environment, build, config, workload, raw numbers) so results are comparable across months, not just across one PR.
  • Cadence: per-change micro-benchmarks for hot paths, scheduled full-suite runs for the matrix, and release-gate runs for the standard server.

Shared infrastructure

  • One load / workload generator framework serving both programmes (honest workloads and adversarial profiles as configurations of the same tool).
  • One results store and reporting format; dashboards are a view, never the only record.
  • Environment specification strict enough that "works on my runner" is diagnosable: pinned instance types or runner classes, warm-up rules, co-tenancy noise handling.

Non-goals

  • Production load testing or chaos programmes against live deployments (this is CI / dedicated-environment work).
  • Fixing every DoS weakness the suite finds — fixes are follow-on tickets; this programme finds, measures, and gates.
  • Benchmarking other systems as competitors (internal comparisons: baseline vs scaled, interface vs interface).
  • A general observability / metrics platform (consume what exists; only add what the gates require).

Acceptance criteria for the design deliverable

  • A design document covering both programmes, their shared infrastructure, CI tiering, and gating rules, linked from this issue.
  • The adversarial scenario catalogue (Part 1 classes above, made concrete per interface) with pass/fail and recovery criteria per scenario.
  • The standard-server baseline fully specified (environment, build, config, workloads, scales) and versioned.
  • The per-interface comparison matrix defined, with the scaling-technique comparison protocol (baseline-vs-technique, identical workloads).
  • Regression-gate rules: budgets, noise handling, waiver and re-baselining procedure.
  • Follow-on design tickets filed from the Decomposition sketch (or the sketch revised with reasons).

Decomposition sketch

Follow-on design tickets to be filed from this issue (indicative; revise during the work):

  1. Design: shared load & workload generator — one framework for honest workloads and adversarial profiles.
  2. Design: DoS scenario catalogue per interface — concrete scenarios, load profiles, pass/fail and recovery assertions.
  3. Design: CI tiering for adversarial & benchmark suites — smoke / scheduled / soak tiers, time budgets, and environment guards.
  4. Design: the standard server baseline — reference environment, workload suite, scales, and baseline versioning.
  5. Design: scaling-technique comparisons — workers and additional/sharded databases vs baseline, measurement protocol.
  6. Design: per-interface benchmark matrix — workloads × interfaces × configurations, results format and publication.
  7. Design: regression gates — budgets, noise model, waiver and re-baselining procedure, results store.

Open questions

  • How deterministic can adversarial pass/fail criteria be on shared CI runners — and which scenarios must move to dedicated hardware to mean anything?
  • What is the "standard server" when contributors' and CI hardware differ — a fixed cloud instance class, a container with enforced limits, or a normalised scoring model?
  • Which single workload is most representative of real id usage today, and how will the programme notice when real usage drifts away from the benchmark workloads?
  • Sharding: at what measured point does the baseline actually need it — is the sharded configuration a real roadmap item or a benchmark-only curiosity?
  • Who may grant a regression waiver, and how is a pattern of repeated waivers surfaced before it becomes the de-facto baseline?
  • How long are benchmark artefacts retained, and what storage / CI-minute budget does the whole programme get?

Expansion of #560: adversarial coverage plus a standing benchmark programme, with benchmarks as regression gates.

Activity

  1. added
    priority/normal
    app/id
    effort/l
    mode/online
    kind/design
    source/design-architect
    on Nov 4, 2026
  2. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    Gap pass (WS-F, 2026-11-04): this issue's decomposition sketch is now filed.

    Each follow-on design ticket named in the sketch above was filed as its own issue (label app/id), so the acceptance item “Follow-on design tickets filed from the Decomposition sketch” can now be checked:

    Exception, where applicable: any sketch item already answered by a later filing is noted in the pass worklog rather than duplicated. Design prioritisation is now independent per ticket; implementation timing is a separate decision.

  3. added
    queue/queued
    task/triage
    work/assigned
    queue/claimed
    status/in-progress
    and removed
    queue/queued
    on Nov 5, 2026
  4. dezren39 commented on Nov 5, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · picked up

  5. 30 remaining items

  6. added a commit that references this issue on Nov 9, 2026
  7. added
    epic/id-program
    on Nov 12, 2026
  8. dezren39 commented on Nov 17, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

    Evidence (fresh, 2026-11-16):

    Issue #5685 stays open as the umbrella; it closes when #5892, #5894, and #5897 close.

  9. added
    work/assigned
    queue/claimed
    status/in-progress
    and removed
    status/in-progress
    queue/claimed
    work/assigned
    on Nov 17, 2026
  10. removed their assignment
    on Nov 20, 2026
  11. dezren39 commented on Nov 24, 2026

    @dezren39
    MemberAuthor

    🤖 Agent note · triaged

    Second-pass findings — umbrella nearly complete (verified fresh 2026-11-24, task 21834)

  12. developing-today-fleet commented on Nov 26, 2026

    @developing-today-fleet
    Contributor

    Triage verdict — oc-code-07, 2026-11-26

    Verdict: still open; programme umbrella nearly complete, no packet from this pass.

    Re-verified: #5685 OPEN (status/triaged, no holds). Children: #5891 closed, #5892 closed, #5893 OPEN (sole remainder), #5894 closed, #5895 closed, #5896 closed, #5897 closed. #5893 is queue-backed by live blocked task 12893 (CI tiering confirmations). A new #5685 packet would duplicate #5893's scope. Umbrella closes when #5893 lands. No code changed in this pass.

  13. dezren39 commented on Nov 29, 2026

    @dezren39
    MemberAuthor

    🤖 Census note — 2026-11-29 (lane CEN-C04, full-census pass)

    Verdict: blocked on one child. Rechecked firsthand. Six of seven decomposition children are CLOSED (#5891, #5892, #5894, #5895, #5896, #5897). Sole blocker: #5893 (CI tiering for the adversarial/benchmark suites), itself blocked on the first stored server-baseline run (see its record). Parent #560 is CLOSED. This umbrella closes when #5893 lands; no separate packet belongs here.

    Census actions: no label changes — labels already sane (kind/design, priority/normal, status/triaged).

  14. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Census 2026-11-29 (Felix):

  15. developing-today-fleet commented on Nov 29, 2026

    @developing-today-fleet
    Contributor

    Issue census — 2026-11-29

    Gaps found: none material.
    Strengths: complete design-programme brief — adversarial CI coverage and per-interface regression gates scoped, ## Acceptance criteria present (checked in the live body), labels complete (kind/design, priority/normal, status/triaged, effort/l, app/id, source/design-architect). Its decomposition is already being honoured: the CI-tiering follow-on exists as #5893.
    Actions: Verified complete — no changes needed.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    app/ideffort/lepic/id-programkind/designmode/onlinepriority/normalsource/design-architectstatus/triagedtask/triage

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions