Usage Metering & Billing Pipeline  ·  View 16 of 22  ·  Operations

Deployment Architecture

One active region across three zones, with a cross-region ledger replica rather than a hot second region.

Editable source SVG draw.io All views
AWS eu-west-1 — primary region Entry CloudFront + WAF console assets API Gateway regional, OIDC Route 53 health checks Compute — three availability zones AZ-a Ingest tasks ECS Fargate Rating tasks Flink task manager AZ-b Ingest tasks ECS Fargate Rating tasks Flink task manager AZ-c Ingest tasks ECS Fargate Rating tasks Flink task manager Regional data — zone-redundant per service Event ledger S3, 11 nines Aggregates & dedup DynamoDB Invoice ledger Aurora Multi-AZ Entitlement cache DAX, 3 nodes Audit tail Glacier, locked Orchestration and platform Invoice & restatement runs Step Functions Outbox EventBridge Observability CloudWatch, Grafana Secrets & keys Secrets Manager, KMS Ledger replica us-east-1, cross-region Standby control plane us-east-1, RTO 15 min Product services events replication Deployment Architecture — Region, Zones and Data Security / platform Interface / broker Application we own Data store Queue / topic External / third party event / async batch Single-region active with a cross-region ledger replica: an accepted event survives a region loss, and the control plane is restored from the replica rather than run hot. Lifecycle to the audit tail is shown in view 10. Active-active ingestion is Phase 3. v 1.0 · owner Architecture Practice · date 2026-10

Decisions

  • Single-region active with a cross-region ledger replica. An accepted event survives the loss of a region; the control plane is restored from the replica rather than run hot, because active-active ingestion needs a deduplication story that spans regions and that is Phase 3.
  • Compute is zone-redundant and stateless; all state is in zone-redundant managed services, so an AZ loss costs capacity and not correctness.
  • The invoice and restatement runs are orchestrated rather than deployed as services, because they are periodic and must be resumable, which is a workflow property rather than a serving one.

Assumptions

  • RTO 15 minutes for ingestion and 4 hours for the invoice run; RPO 0 for acknowledged events (stated assumptions).
  • Producer-side buffers hold long enough to cover a 15-minute ingestion outage, which is what makes RPO 0 meaningful rather than aspirational.

Risks

  • A regional outage longer than producer buffer depth is unbilled usage. This is the accepted cost of not running active-active, and it should be stated to the business in those words.
  • Flink task managers across three zones means cross-zone traffic on every shuffle; at 250,000 events/s that is a real line on the bill, and it is why cost-per-million-events is watched.