Trade-offs, written down while they were still true
Decisions and what they cost.
Eleven architecture decisions, each featuring the alternative rejected, the engineering rationale, and what the choice actually cost in production. Categorized into two groups: System Topology (how the delivery platform is shaped) and Production Operations (what keeps 53 microservices running on a weekday). A decision with no cost line next to it is an advertisement, so every card here carries one, including the choices that cost an argument with a team.
DECISION What was decidedALTERNATIVE Options considered and rejectedWHY Engineering rationaleCOST Real trade-offs and maintenance accepted
Category 01 · System Architecture
System Topology
How the delivery platform is structured: one gateway routing 53 services across 5 artifact types, fail-closed gates, dual CI engines, and ticket-level state machines without external state stores.
ADR-0001
One gateway, not per-repo templates
decision
A single gateway.yml include routes every repository to its domain pipeline standard. Services declare their type and domain; the gateway dynamically invokes the corresponding pipeline workflow.
alternative
Copy-paste pipeline templates into all 53 individual service repositories, or provide per-repository overrides as the default escape hatch.
why
The delivery standard evolves in one central place. Onboarding stays a four-line include, and security scanner upgrades propagate across all 53 services instantaneously without chasing 40 drifting YAML files.
cost
The gateway is on the critical release path: one bad merge affects all 53 services. Paid for by versioning and testing the gateway with the exact same pipeline that protects production releases.
ADR-0002
Gates fail closed
decision
Every pipeline gate evaluates in fail-closed mode: a missing secret, an unconfirmed merge, an unreachable scanner, or an unparseable result stops the job with non-zero exit code (exit 1).
alternative
Warn and continue, keeping builds green to prioritize developer convenience.
why
A silently falling back secret or skipped scanner check is a compliance incident with a head start. In a regulated bank, a green build that silently skipped validation is worse than a failed build because people trust green.
cost
Builds fail when configuration is incomplete. The team cursed it for a week, then configuration drift stopped shipping to staging. Availability is traded for correctness, with manual rerun from GitLab UI as the transparent fallback.
ADR-0003
Two CI engines, no big-bang migration
decision
Two CI engines running side by side: GitLab CI and legacy Jenkins are bound by one shared stage contract per artifact type (build, scan, gate, deploy, verify).
alternative
Force every pipeline onto one engine via a big-bang migration, or freeze Jenkins and let legacy pipelines decay without modern security gates.
why
29 pipelines still actively delivered banking features with immovable deadlines. Migration is safe only behind a unified stage contract where services see identical exit conditions regardless of which engine executes the job.
cost
Dual maintenance plus maintaining the contract abstraction layer itself across Groovy and GitLab YAML, which is invisible to delivery teams. The contract must be tested twice to prevent abstraction drift.
ADR-0004
What I deliberately did NOT build
decision
No dedicated state database for the release board; no asynchronous deploy queue; no bot that clicks merge on a human's behalf.
alternative
Postgres for state storage, a job queue for concurrent deploys, and an automated merge bot executing upon green gates.
why
State lives natively inside the ticket and GitLab objects, providing an immutable audit trail without synchronization jobs. A second deploy targeting an active route is refused, not queued, and the merge bot reverts the card and waits for a designated person to hold regulatory accountability.
cost
Fewer moving parts and zero state reconciliation jobs. The cost is that promotion lead time is bounded by human approval latency, and an operator occasionally waits for an active slot.
ADR-0005
Built the control plane, did not buy one
decision
Built the control plane, did not buy one: a custom release board, an append-only release ledger, and automated notification reports, built on top of Jira and GitLab APIs with Node.js Express and SSE event streaming.
alternative
Adopt ArgoCD for deployments, GitLab Environments for promotion, Spinnaker, or Backstage as the central portal.
why
The source of truth is the issue board, not a git repository: a release is the set of services that diverged between environments, and each promotion requires approval across a five-layer governance chain (team, business, product, architecture, engineering). Argo reconciles one repo toward one desired state, and GitLab Environments assume one approver. On-premises OpenShift lacked cloud tenancy to attach either tool.
cost
I own a UI that Argo ships for free, every enhancement costs personal engineering time, and the bus factor is small. Accepted with an explicit exit condition: if workloads migrate to public cloud git-native models, retire the custom control plane and adopt the standard.
ADR-0006
Agents write the pipeline. Nothing they write merges itself.
decision
AI coding agents draft and edit gateway.yml, Groovy shared libraries, and shell scripts; a model generates merge request scanner summaries, but possesses zero push, merge, or bypass authority. Nothing they write merges itself.
alternative
Ban generative models completely from the platform delivery path, or grant autonomous agents direct write and merge access to release branches.
why
Drafting boilerplate pipeline logic is cheap, provided it arrives in front of the identical quality gates and human engineering review as human commits. Summary generation is a convenience over raw scanner findings; the composite quality gate underneath is arithmetic, and arithmetic stays strictly outside the model.
cost
Reviewers must inspect agent diffs thoroughly, and an overly confident scanner summary is dangerous. Summary metrics must point directly back to verbatim scanner lines, and approvals are never recorded as a model's opinion.
Category 02 · Operational Standards
Running it in production
How services are operated and governed in live production: upstream capacity contracts, deterministic rolling updates with mutex locks, verifiable backup expiration, measured baseline sizing, and telemetry carrying explicit sample sizes.
ADR-0007
Capacity is decided upstream. I make it stick.
decision
Capacity is decided upstream. I make it stick. CPU requests, memory limits, and horizontal pod autoscaler thresholds default from the shared stage contract. Any service requiring deviations must carry an explicit manifest override with a documented rationale.
alternative
Allow every team to copy a deployment manifest and configure arbitrary resource numbers by hand.
why
Capacity targets belong to system analysts and capacity planners. The platform role is ensuring agreed targets reach production unchanged across all 53 services, so exceptions read as audited architectural changes rather than silent configuration forks.
cost
A flawed default propagates to all repositories including the contract, and overrides can outlive the workload condition that justified them. Mitigated by versioning the contract and requiring merge request reviews on all override additions.
ADR-0008
One rollout rule, and no two deploys at once.
decision
One rollout rule, and no two deploys at once. The rolling update strategy is enforced globally in the stage contract rather than configured per team. The deployment job enforces a mutex lock that refuses a second deployment while one is actively executing.
alternative
Permit individual services to select disparate rollout strategies (such as stop-then-start recreate), and allow concurrent deployment pipelines targeting shared routes.
why
A deployment that interrupts active banking traffic causes an immediate production incident. Two simultaneous releases racing for the same ingress route turn rollbacks into non-deterministic recovery guesswork.
cost
One standardized rule requires services with non-standard lifecycle hooks to request audited exceptions. Refusing concurrent releases rather than queuing them means operators occasionally wait for an open slot.
ADR-0009
A backup is only real if it expires.
decision
A backup is only real if it expires. Destructive deployment steps cannot execute without a timestamped backup created first, and all backups carry strict expiration dates with automated scheduled pruning.
alternative
Take one-off backups, keep snapshots indefinitely, and manually purge storage volumes only when disk exhaustion alerts fire.
why
"We have backups" without retention rules inevitably causes disk exhaustion outages months later. Directories that operators are forbidden to clean eventually stop being inspected or tested altogether.
cost
A flawed cleanup script risks removing necessary recovery evidence. Timestamps must live in the snapshot filename, retention policies must be published, and all deletion actions must write audit logs.
ADR-0010
Measured baseline per artifact type, not copied configs
decision
Measured baseline per artifact type, not copied configs. Derive resource requests, memory limits, and JVM heap configurations from measured baseline profiles per artifact type (Spring Boot JAR, container image, static web bundle, Android APK, iOS IPA) rather than copied templates.
alternative
Copy resource values from whatever service deployed most recently, or assign uniform generic sizing across radically different runtime technologies.
why
Different runtimes exhibit fundamentally different memory dynamics: Java Virtual Machines require heap headroom, whereas Go binaries and static bundles operate in minimal memory. Sizing from empirical observation prevents node memory pressure while keeping the override list short enough to review in one sitting.
cost
Requires ongoing profiling and benchmarking across staging clusters whenever runtime base images (such as JDK versions or Node runtimes) are upgraded across the domain.
ADR-0011
Numbers, with the sample size attached
decision
Numbers, with the sample size attached. Every published deployment timing, performance metric, and pipeline SLA must disclose its explicit sample size (n), percentiles (median/p50 and p90), and observation window measured directly from private platform telemetry.
alternative
Publish synthetic vanity benchmarks, single best-case timing runs, or unverified speed claims without sample size, variance, or date context.
why
A figure you cannot interrogate is worth nothing in engineering. Measured from the platform's own GitLab API on 8 October 2026: 53 services declared across the service maps, 99 source repositories carrying no CI file at all (46 of them with pipeline history), and 10 pipeline projects that have run 7,550 pipelines between them. On one backend service: a deploy to an app-server VM takes a median 93 seconds (n = 13 successful jobs, p90 162 s, range 19–199 s), and the SonarQube gate a median 80 seconds (n = 30, p90 140 s). On private banking infrastructure, transparency about empirical metrics builds verifiable technical credibility.
cost
Disclosing empirical sample sizes reveals operational variance and long-tail outliers rather than an idealized clean graph, and requires persistent metrics collection across both CI engines.
Sanitized: Service names, internal hosts, and infrastructure identifiers are synthetic. The decisions, rejected alternatives, engineering rationales, and real costs paid reflect genuine production mileage.