Skip to content

docs(adr): decide pipeline architecture v2 (adopt as target, gate graduation)#2522

Merged
devarismeroxa merged 1 commit into
mainfrom
docs/adr-pipeline-arch-v2
Jul 5, 2026
Merged

docs(adr): decide pipeline architecture v2 (adopt as target, gate graduation)#2522
devarismeroxa merged 1 commit into
mainfrom
docs/adr-pipeline-arch-v2

Conversation

@devarismeroxa

Copy link
Copy Markdown
Contributor

Resolves the open question of what to do with the v2 pipeline architecture (pkg/lifecycle-poc) — an undocumented, incomplete (single source/dest), unbenchmarked preview that taxes every data-path change (it had to be reasoned about for #2268, SIGTERM, and the #2519 force-stop follow-up).

Decision — driven by a benchmark, not a hunch

Benchmarked both architectures on the same 100k-record workload (committed, reproducible; no-op connectors isolating data-path orchestration):

Per 100k records v1 (record-at-a-time) v2 (1000-batch) v2 advantage
Allocations ~6.9M ~1.1M ~6.3× fewer
Memory ~250 MB ~76 MB ~3.3× less

The batching amortizes per-record channel/ack overhead that v1 pays across four nodes on every record. Allocation/GC pressure drives throughput and tail latency under load, so this is a real efficiency win.

So: adopt v2 as the target architecture; keep it behind -preview.pipeline-arch-v2 (v1 default) until explicit graduation criteria are met — multi-destination, recovery parity, a chaos-test correctness bar (invariants 1–7 under SIGKILL mid-batch), an end-to-end benchi confirmation, and Tier-1 sign-off (realistically Phase 2 + a second maintainer). Do not delete it (win is proven); do not make it default prematurely (it's incomplete/unrecovered).

The ADR also bounds the interim dual-maintenance tax (portability rule + explicit gap-tracking) and includes a supersession clause if a future benchi run shows no end-to-end win.

Files

  • docs/architecture-decision-records/20260704-pipeline-architecture-v2.md
  • pkg/lifecycle/stream/benchmark_test.go — the v1 counterpart benchmark (reproducibility of the claim)

Tier 3 (docs + a test-only benchmark). Advances the "no undocumented architectural forks" discipline.

🤖 Generated with Claude Code

…aduation

Resolve the open question of what to do with the v2 pipeline architecture
(pkg/lifecycle-poc), which shipped as an undocumented, incomplete, unbenchmarked
preview that taxes every data-path change.

Benchmarked both architectures on the same 100k-record workload (committed:
BenchmarkStreamOld vs the existing BenchmarkStreamNew). v2 allocates ~6.3× fewer
objects and ~3.3× less memory per record — a real, batching-driven data-path
efficiency win. So: adopt v2 as the target, keep it behind the preview flag with
v1 default until explicit graduation criteria are met (multi-destination,
recovery parity, chaos-tested correctness, an end-to-end benchi confirmation,
Tier-1 sign-off), and do not delete it. Documents the decision and its finish
line so the fork stops being a silent tax on future PRs.

Adds the v1 counterpart benchmark for reproducibility of the claim.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@devarismeroxa devarismeroxa requested a review from a team as a code owner July 4, 2026 23:20
@devarismeroxa devarismeroxa merged commit fd36828 into main Jul 5, 2026
6 checks passed
@devarismeroxa devarismeroxa deleted the docs/adr-pipeline-arch-v2 branch July 5, 2026 04:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant