From a single-server monolith to a platform that scales.
PCI compliance, multi-currency settlement and horizontal scale, all needed at once. We re-architected the payment core in place — in production, behind a feature flag, with no downtime at cutover.
What was breaking
A single Postgres instance behind a Node.js monolith — fine at launch volume, timing out as throughput grew. Three pressures landed together: auditors needed PCI DSS scope reduction, engineering needed horizontal scale, and logging was noisy enough that incident response depended on whoever happened to know the system best.
The technical bets we made
- 1
Split the monolith into 4 services along the payment lifecycle (intake, fraud screening, settlement, reconciliation) — kept synchronous APIs at the boundary, async messaging internally via Redis Streams.
- 2
Tokenised every PAN at intake through a dedicated vault service in a separate VPC, reducing PCI DSS scope from the whole platform to two services in one VPC — which is what makes the audit tractable at all.
- 3
Moved settlement reconciliation onto a partitioned Postgres cluster with per-currency partitions, so reconciliation scans one partition instead of the whole table.
- 4
Built a real-time fraud-screening pipeline on Redis feature vectors, scoring asynchronously so a slow model never blocks the payment path, and holding flagged transactions before settlement.
- 5
Set up structured logging (OpenTelemetry → Grafana Loki) and a runbook-driven on-call rotation, so detection stops depending on who happens to be awake.
What powers this system
From kickoff to production
Architecture audit, PCI scope analysis, threat model session with the founder + CTO.
Service decomposition diagrams, API contracts, infra plan. Shipped a working tokenisation vault end of week 3.
2-week sprints, weekly demos, gradual traffic migration behind a feature flag. Shadow-tested on production traffic for 2 weeks before cutover.
Zero-downtime migration over a weekend window, followed by the auditor walkthrough against the reduced scope.
What the architecture changed
The ceiling moved from a single vertical instance to horizontal capacity that grows with spend rather than stepping. PCI scope shrank from the whole platform to two services — the difference between an audit that touches every deploy and one that touches a boundary. And incident detection became a property of the system, through structured traces and alerts, rather than a property of the on-call engineer.
Need something similar?
Book a free 30-min architecture audit. We'll sketch the system you need.
Book a 30-min Architecture Audit