Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / Why Monzo Rewrote Its Core Banking Engine
Transcript
- Lucas: So Monzo rebuilt its core transaction-processing engine. Not a refactor, not a gradual migration to microservices — a full, from-scratch rewrite of the system that moves money between accounts. And they did it while the bank was live with nine million customers. Luna: That sounds like the kind of project that keeps a CTO up at night. What broke first? What forced the rewrite? Lucas: What broke was the relational database. Monzo had been running on a standard PostgreSQL setup, but by 2023, transaction volume during peak hours — think Friday evenings, payday, Black Friday — was hitting about 1,000 transactions per second. The database couldn't keep up. Latency spikes, timeouts, occasional failed payments. The team traced the bottleneck to write contention on the accounts table. Every transaction locks the account row, and with that many concurrent writes, the lock queue became the system's choke point. Luna: So the database couldn't scale writes. That's a classic problem — did they look at sharding PostgreSQL first? Lucas: They did. Sharding was the obvious tactical fix. But the engineering team, led by CTO Sujata Bhatia, realised that sharding would only delay the inevitable. The real issue was the relational model itself. Every transaction requires a balance check, a debit, a credit, and a history entry — all wrapped in a database transaction. That pattern doesn't scale horizontally because the balance check is a read modify write cycle that needs a lock. So they asked a harder question: what if we don't store balances at all? Luna: Wait — how do you process a payment without knowing the current balance? Lucas: You compute it on the fly from the event log. That's the event-sourcing model. Instead of storing a row that says 'account 12345 has a balance of 500 pounds', you store every event that changed that account — 'deposit 100 pounds', 'withdrawal 30 pounds', 'payment received 50 pounds'. The balance is the sum of all events. No locks needed because events are append-only. Monzo built this new engine on Apache Kafka for the event stream and CockroachDB for the current state snapshot — a globally distributed SQL database that handles the read workload. Luna: So they moved from a state-first model to an event-first model. That's a fundamental shift in how you think about money. What did that mean for the engineers building it? Lucas: It meant unlearning a lot of assumptions. The team had to redesign the entire transaction lifecycle. For example, in the old system, a failed payment was simple — you just rolled back the database transaction. In the event-sourcing model, you can't roll back an event. Instead, you issue a compensating event: a 'payment failed' event that reverses the earlier 'payment initiated' event. That's a different mental model. It's more like accounting than programming — every event is permanent, and corrections are new events. Luna: That sounds like the kind of change that would break every downstream system — reporting, fraud detection, notifications. How did they manage that while keeping the bank running? Lucas: They ran two systems in parallel for eighteen months. That's the part that surprised me. Bhatia structured the migration into six-week phases. Each phase moved a single transaction type — say, 'internal transfers between Monzo accounts' — from the old system to the new one. During each phase, both systems processed the same transactions, and the team compared outputs. Only when the new system matched the old one for two weeks without a single discrepancy did they cut over. Luna: That sounds expensive. You're paying for two infrastructure stacks, two teams maintaining them, and you're slowing down feature development. Lucas: Exactly. Bhatia was open in her internal post-mortems that the parallel run cost the company roughly 15 percent of the engineering org's capacity for over a year. Features that would have taken two weeks took three. But the alternative — a big-bang cutover — was too risky. One bug in the new engine could freeze customer money for hours. Monzo had already been through a major outage in 2020, and they knew regulatory trust is fragile. The slow, dual-system approach was the most expensive safe path. Luna: And the results? After eighteen months, what did they get? Lucas: They got a system that can handle over 10,000 transactions per second — a tenfold improvement from the old ceiling. More importantly, latency dropped from an average of 120 milliseconds per transaction to under 10 milliseconds. And because the new system is horizontally scalable, they can add capacity by spinning up more Kafka partitions and CockroachDB nodes, no sharding required. The cost per transaction also dropped by about 40 percent, because the new system uses commodity hardware more efficiently. Luna: So the rewrite paid off. But let's be honest — most rewrites fail. What did Monzo do differently that made this one succeed? Lucas: The biggest factor, I think, was that they didn't treat it as a pure engineering project. Bhatia made sure the business understood the trade-offs from day one. She presented the rewrite to the board as a risk-reduction investment, not a tech upgrade. She explicitly said: 'We are spending engineering time to reduce the probability of a catastrophic outage.' That framing made it easier to justify the slow pace and the dual-system cost. Luna: It also helps that Monzo is a digital-native bank. They didn't have forty years of COBOL spaghetti to untangle. Lucas: True, but they had complexity of a different kind. Monzo's old system had been built by a small team in 2015, and then patched and extended for eight years. There were stored procedures that nobody fully understood, edge cases in the transaction logic that only surfaced during specific currency conversions. One of the biggest wins of the rewrite was simply documenting every transaction type and verifying the behaviour with the product team. That documentation didn't exist before. Luna: What about the team? Rewrites are notorious for burning out engineers. How did Monzo keep morale up through eighteen months of parallel systems? Lucas: Bhatia rotated engineers between the old and new systems. Nobody spent more than three consecutive months on the migration. She also set a rule: no more than 30 percent of any team's capacity could be dedicated to the rewrite at any time. The rest had to go toward features that customers could see. That way, engineers still shipped visible improvements — new budgeting tools, better notifications — which kept the work feeling meaningful. Luna: So the lesson isn't just about technology. It's about organisational design for a long migration. Lucas: Exactly. And there's one more lesson that I think other CTOs should hear: Monzo chose to build their own ledger rather than buy one. There are off-the-shelf core banking platforms, like Thought Machine or Mambu, that offer event-sourced ledgers. Monzo evaluated them and decided their transaction patterns were unique enough — they offer features like split payments, instant notifications, and real-time rounding — that a custom build would give them more flexibility long-term. Luna: That's a big bet. How do they know they made the right call? The build probably took longer than integrating a vendor. Lucas: They don't know for sure yet. But the data so far is promising. The new system handles their current volume with room to spare, and they've already extended it to support a new 'joint accounts' feature that would have been very difficult under the old model. Bhatia told a conference earlier this year that the build decision saved them from a vendor lock-in that would have cost them more in the long run. But she also admitted that the build took six months longer than projected, and that the team underestimated the complexity of migrating historical data — they had to replay five years of events through the new engine, which exposed a lot of data quality issues. Luna: Data quality issues during migration — that's something that every CTO I know has a story about. What kind of issues? Lucas: Things like duplicate transaction IDs from a bug in the old system that had been patched but not cleaned up. Or missing events for accounts that had been closed and reopened with the same account number. The team had to write custom reconciliation scripts for each anomaly. That added about three months to the timeline. But the upside is that the new system now has a clean, validated event store that can be audited end to end. Regulators love that. Luna: So the migration is complete now? They're fully on the new engine? Lucas: As of early this year, yes. The old PostgreSQL system was decommissioned in February 2026. Monzo published a technical blog post in March detailing the architecture — it's a good read. They also open-sourced some of their internal monitoring tools, which is unusual for a bank. I think they're proud of the work, and they should be. Luna: What's the one takeaway you'd give to a CTO who's considering a core system rewrite? Lucas: Make sure you understand the business value of the rewrite in terms of risk, not just performance. If you frame it as 'we need to handle more transactions,' the business will ask 'can we just buy a bigger database?' But if you frame it as 'the current system has a single point of failure that could cause a multi-hour outage,' the conversation changes. Monzo's board approved the rewrite because Bhatia showed them the cost of a worst-case outage: lost customer trust, regulatory fines, potential loss of banking license. The projected cost of the rewrite was lower than the expected cost of one major outage. Luna: That's a powerful framing. So the CTO's job in a rewrite is as much about storytelling as it is about architecture. Lucas: Exactly. And that's the part that doesn't show up in the system diagrams. Monzo's rewrite succeeded because Bhatia convinced everyone — board, product, compliance, engineers — that the pain was worth it. She gave them a clear timeline, visible milestones, and a way to measure progress. That's the kind of leadership that turns a risky bet into a competitive advantage. Luna: And now Monzo has a transaction engine that can scale for the next decade. Not bad for eighteen months of work. Lucas: Yeah. And it makes you wonder — how many other fintechs are sitting on a ticking time bomb in their core ledger, hoping that sharding or a bigger instance will hold them over? I suspect we'll see more rewrites in the next few years, especially as real-time payments become the norm. Luna: Let's hope they take notes from Monzo's playbook. Lucas: Here's hoping. That's it for this episode of The CTO Podcast. I'm Lucas. Luna: And I'm Luna. See you next time.