New

Odisey — our 30+ module microservice library is now live.

Explore Odisey
Back to Blog
EngineeringApril 10, 2025

Building Scalable Fintech Infrastructure: Lessons from 50M+ Transactions

How we engineered Project S to handle 50 million transactions with 99.9% uptime — the architecture decisions that made it possible.

Salesvex Engineering

Engineering Team

8 min read

E
Listen to Article

When Project S crossed 10 million transactions in its first quarter, we knew the architecture decisions we'd made during the early days would either carry us forward or become the walls we'd hit. This is the story of how we engineered a fintech infrastructure that now handles over 50 million transactions with 99.9% uptime — and the lessons we learned along the way.

The Early Mistakes We Made

Every engineering team building fintech infrastructure makes mistakes. Ours came early, and they were instructive.

We started with a monolithic architecture — one large service handling payment processing, ledger management, user authentication, and notification delivery. It worked fine at 100,000 transactions per month. At 1 million, we started seeing the cracks: a single slow database query could degrade the entire payment flow. A surge in notifications could block payment confirmations.

The first lesson: in fintech, every subsystem is mission-critical, and they cannot share failure modes.

The Architecture Shift: Event-Driven Microservices

We rebuilt around an event-driven microservices architecture. Each domain — payments, ledger, compliance, notifications — became an independent service communicating through an event bus. We chose Apache Kafka as our backbone, not for its popularity, but for its specific properties: guaranteed message ordering within partitions, durable log storage, and the ability to replay events for reconciliation.

The key design decisions:

Payment Processing Service: Stateless, horizontally scalable. Each instance handles a transaction from initiation to authorization. No shared in-memory state. If an instance fails mid-transaction, another picks up from the last persisted checkpoint.

Ledger Service: The single source of truth for all financial balances. We implemented an append-only ledger — every credit and debit is a new record, never an update. This immutability was non-negotiable: it gives us a complete audit trail and makes reconciliation straightforward.

Compliance Service: Async processing for AML and fraud checks. For low-risk transactions under defined thresholds, compliance checks run post-authorization. For high-risk, they block synchronously. This tiered approach reduced average transaction latency from 800ms to 120ms.

Database Strategy: Separating Read and Write Paths

One of the most impactful decisions was separating read and write paths entirely.

All writes go through a primary PostgreSQL cluster with synchronous replication to a standby. Reads — which represent 80% of all database operations — go through read replicas with a 50ms replication lag tolerance.

For transaction lookups and balance queries, we added a Redis caching layer with a 30-second TTL. This alone reduced database read load by 65%.

We also implemented event sourcing at the data layer: every state change in the payment lifecycle is stored as an immutable event. The current state of any transaction can be reconstructed by replaying its event history. This has been invaluable for debugging customer disputes and regulatory investigations.

Handling the 50x Traffic Spikes

Fintech platforms see predictable and unpredictable traffic spikes. Salary disbursement days, end-of-quarter payments, and promotional campaigns can produce 50x normal traffic within minutes.

Our approach combined pre-scaling with reactive autoscaling:

  • Pre-scaling: We analyze historical transaction patterns and scale up 20 minutes before expected peaks
  • Reactive autoscaling: Kubernetes HPA triggers on custom metrics — not just CPU, but transaction queue depth and p95 processing latency
  • Circuit breakers: Every external API call (card networks, banking partners) has a circuit breaker. If a dependency degrades, we fail fast and queue for retry rather than holding threads

The result: our last major traffic event (a large e-commerce integration going live) produced a 47x traffic spike. We saw zero dropped transactions.

The 99.9% Uptime Reality

Uptime targets are easy to write. Achieving them requires ruthless discipline in two areas: deployment practices and dependency management.

For deployments, we use blue-green with canary releases. New versions receive 5% of traffic for 30 minutes before full rollout. Any p99 latency increase above 20% triggers automatic rollback.

For dependencies, we assume every external system will fail. Card network APIs, banking partner connections, KYC providers — all of them sit behind a local fallback queue. When a dependency goes down, transactions queue locally, and we process them with exponential backoff as the dependency recovers. Users see a slight processing delay, not a failure.

What We'd Do Differently

If we were starting from scratch, we'd do three things earlier:

  1. Implement distributed tracing from day one. We added OpenTelemetry six months in, and reconstructing the transaction lifecycle from logs alone cost us hundreds of engineering hours.

  2. Define SLOs before writing code. Our 99.9% uptime target came from a business requirement. The technical implementation should have been designed around that target from the first line of code.

  3. Invest in chaos engineering earlier. We didn't run our first GameDay until month four. By then, we'd already encountered two failure modes we hadn't designed for in production.

The Numbers Today

  • 50M+ transactions processed
  • 99.9% uptime over 18 months
  • 120ms average transaction latency (p50)
  • 380ms p99 latency at peak load
  • Zero data loss events

The architecture decisions that matter in fintech aren't glamorous. They're about consistency over availability in the right places, about assuming failure everywhere, and about maintaining an audit trail that regulators and customers can trust completely.

FintechInfrastructureScalability

Try Salesvex

Explore the Salesvex enterprise software platform for free.