Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Nubank Cut Cloud Costs While Scaling to 80 Million Customers
Transcript
- Lucas: So Luna, you know how most fintechs brag about user numbers? Nubank crossed 80 million customers in Latin America, but the number that caught my eye wasn't the customer count. It was their cloud bill. Luna: Their cloud bill? That's not the typical headline. What did they do? Lucas: They managed to cut cloud costs by about 30 percent while scaling to 80 million customers. That's counterintuitive. Usually, as you grow, your infrastructure costs balloon. They went the other way. Luna: How? Did they just renegotiate with AWS or something? Lucas: Part of it, but the real story is architectural. They moved to a multi-cloud strategy, mainly using AWS and Google Cloud, and they made some hard choices about where workloads live. But the biggest lever? They rethought their data storage. Luna: Storage is usually the boring stuff. What did they do that was so clever? Lucas: They stopped treating all data as equal. Most companies store everything in high-performance databases. Nubank tiered their storage. Hot data—like transaction histories that customers access daily—stays in fast, expensive storage. Cold data—like compliance archives—moves to cheaper object storage. They also compressed aggressively. That alone cut storage costs by 40 percent. Luna: Forty percent just from tiering and compression? That's a massive win. Lucas: It sounds simple, but it requires discipline. They built automated policies to move data between tiers based on access patterns. And they used compression algorithms tuned for their specific data types—like financial records, which are mostly text. Luna: So they're not just manually sorting files. It's systemized. Lucas: Exactly. And that's the kind of thing that scales. They also optimized their Kubernetes clusters. They had hundreds of microservices running, and they found that many were over-provisioned. They right-sized them, and they implemented autoscaling that reacts to actual load, not just CPU spikes. Luna: Right-sizing is a classic. But with that many services, how do you even know which ones are over-provisioned? Lucas: They built internal tooling that profiles each service's resource usage over time. It's like a continuous audit. Every service gets a cost report, and teams are accountable for their own spend. That cultural shift is huge. Luna: So every engineering team at Nubank is cost-aware. That's a different mindset. Lucas: Right. And it's not just about saving money. It's about efficiency. When you're scaling to 80 million customers, every millisecond of latency and every dollar of compute matters. They even redesigned how they handle database connections to reduce overhead. Luna: I imagine that's tricky with a regulated industry like banking. You can't just move data wherever you want. Lucas: That's a great point. They had to comply with local data residency laws in Brazil, Mexico, Colombia. So their multi-cloud strategy isn't just about cost—it's also about regulatory compliance. They use Google Cloud for some workloads, AWS for others, and they keep certain data in-country. Luna: So the cost savings didn't come at the expense of compliance. That's impressive. Lucas: Exactly. And they did it without sacrificing reliability. Their uptime has actually improved. They moved to a microservices architecture years ago, and that gave them the flexibility to move workloads between clouds without downtime. Luna: It sounds like they've built a culture of cost awareness. That's not easy. Lucas: Yeah, it's a long game. They started this initiative back in 2022, and it took over two years to see the full impact. But now, they're in a position where they can grow without their infrastructure costs spiraling out of control. Luna: That's a lesson for any tech leader. It's not just about the tech—it's about the culture. Lucas: Absolutely. And you know, if today's episode is giving you ideas for your own infrastructure, that's exactly what we're here for. These conversations stay ad-free because of listener support. If you found this useful, you can buy me a coffee at buy me a coffee dot com slash fexingo. It helps us keep doing deep dives like this. Luna: Yeah, and we're not asking for a lot—just enough to keep the servers running, ironically. Lucas: Ha, exactly. Anyway, back to Nubank. One more thing that stood out to me was how they handled their database migrations. They moved from a monolithic database to a distributed one, and they did it incrementally, using a strangler pattern. They didn't do a big bang switch. Luna: Incremental migrations are safer, but they take longer. How did they manage the transition? Lucas: They used dual-writes for a while—writing to both the old and new systems—and then they backfilled data and switched reads over. It's a common pattern, but doing it at their scale is impressive. They had to ensure consistency across millions of transactions. Luna: And that's where most teams get it wrong. They rush it and end up with data corruption. Lucas: Right. Nubank took their time. They had a dedicated team for the migration, and they had rollback plans at every step. That discipline is probably why they didn't have major outages. Luna: So what's the takeaway for a CTO listening? Is it the storage tiering, the multi-cloud, the culture? Lucas: I'd say the biggest takeaway is the culture. Technology choices are important, but if your engineers aren't thinking about cost, you'll never sustain these savings. Nubank made cost a first-class citizen in their engineering org. They embedded cost metrics into their dashboards and review processes. Luna: That's a smart move. It's not just a finance team's responsibility. Lucas: Exactly. And they also didn't sacrifice innovation. They're still shipping new features and expanding to new markets. They just do it with a cost-aware lens. It's a balancing act, and they seem to have found the sweet spot. Luna: I wonder if this approach could work for smaller startups or if it's only for scale-ups like Nubank. Lucas: Honestly, I think even a small startup can benefit from the mindset. You don't need to be at 80 million customers to start thinking about data tiering or right-sizing your Kubernetes clusters. The earlier you build that culture, the easier it is. Luna: That's a good point. It's like compound interest for your infrastructure costs. Lucas: Exactly. And as we look ahead, I think we'll see more fintechs adopting similar strategies. Cloud costs are becoming a bigger share of the budget, and the ones who manage it well will have a competitive advantage. Luna: So, what's the one thing you'd tell a CTO to do tomorrow to start down this path? Lucas: Start by measuring. You can't optimize what you don't measure. Get a clear view of your current cloud spend by service, by team, by environment. Then identify the top three cost drivers and dig into whether they're really necessary. Luna: That's practical. And it's something you can start without any major architectural changes. Lucas: Right. And once you have that data, you can begin making small changes—like setting up autoscaling or moving old logs to cheaper storage. Those little wins add up over time. Luna: It's a marathon, not a sprint, then. Lucas: Definitely. Nubank's 30 percent savings didn't happen overnight. It took years of consistent effort. But the payoff is real, and it's a model worth studying. Luna: Well, I think we've given our listeners a lot to chew on. Thanks for joining us, and we'll catch you next time.