Latest / The CTO Podcast with Fexingo: Technical Leadership, Architecture, and Engineering Org / How Cloudflare Rebuilt Its Network for Zero Trust
Transcript
- Lucas: If these conversations are useful for what you're building or running, we hope you stick around — because today's episode is about one of the most ambitious infrastructure rewrites in recent memory. Lucas: Cloudflare started life as a content delivery network — speed up websites, protect against DDoS attacks. Today it's positioning itself as a zero-trust security platform. That shift didn't happen by marketing. It happened by rebuilding the network from the ground up while the old network kept running. Luna: And this isn't just an architecture story. It's also a business story — because the rewrite changed who Cloudflare's customers are. Lucas: Exactly. The old Cloudflare was about making websites faster. The new Cloudflare is about replacing corporate VPNs and firewalls. And those two businesses have very different technical requirements. Lucas: I want to start with a specific number: in 2019, Cloudflare launched something called Argo Smart Routing. It's basically a smarter way to route traffic across their network — instead of taking the standard BGP path, they use real-time data to find faster routes. But here's the thing — they had to build that capability into every single server in every single data center. Luna: And they have, what, over 300 data centers now? 330 maybe? Lucas: Yeah, they were around 200 in 2019. Now it's over 330. So rolling out new routing logic to every edge server, without breaking the existing traffic — that's a massive orchestration problem. Luna: And they did it while the old CDN kept serving traffic. No downtime. Lucas: Right. They used a technique called 'canary deploys' at the network level — they'd push the new routing logic to a small percentage of servers, monitor latency and error rates, then gradually expand. If something went wrong, they could roll back in seconds. Lucas: But Argo was just the beginning. The bigger pivot came in 2020, when Cloudflare launched Cloudflare for Teams — their zero-trust product. And that required a fundamentally different network architecture. Luna: Because zero-trust isn't about speeding up public websites. It's about securing internal applications — things like a company's HR system, its code repositories, its internal dashboards. Lucas: Exactly. With a CDN, you're handling traffic that's destined for public IPs. With zero-trust, you're handling traffic that's destined for private IPs — and you need to authenticate every single request, not just route it fast. Lucas: So Cloudflare had to build what they call a 'global private network' — essentially a VPN replacement that runs on their existing edge infrastructure. Every request goes through a Cloudflare server, where it's authenticated, inspected, and then forwarded to the destination. Luna: That's a huge architectural shift. The CDN was a proxy — you cache content, you serve it. The zero-trust product is a forward proxy — you intercept traffic and make decisions on every packet. Lucas: And the latency requirements are different. With a CDN, users expect a website to load in a couple of seconds. With zero-trust, you're adding authentication and inspection on every request — users are sitting there waiting for a terminal or a web app to respond. If you add 100 milliseconds, they notice. Luna: So Cloudflare had to make the security layer fast enough that it didn't feel like security was there. Lucas: Exactly. And they did it by integrating the security decisions directly into the routing layer — instead of having a separate proxy that inspects traffic, they embedded the logic into the same servers that handle routing. That way, the authentication check happens in the same memory space as the packet forwarding. Luna: That sounds like a huge engineering effort. Did they have to rewrite their core routing software? Lucas: They did. They built a new runtime called 'Workers' — not the serverless Workers that developers use, but a lower-level runtime that runs network functions. That's what powers their zero-trust filtering. And they had to deploy that to every edge server while the old CDN software was still running. Lucas: A couple of dollars a month is genuinely what keeps these episodes going — buy me a coffee dot com slash fexingo, if you've gotten something out of them. We keep the show ad-free because listeners support it directly. Luna: And it makes a real difference — it's what lets us dig into these architecture stories without worrying about sponsors. So if you find this useful, that's where you can help. Lucas: So back to Cloudflare. The organizational challenge here was huge — they had to maintain the old CDN business while building the new zero-trust business, and the two stacks shared the same physical infrastructure. Luna: How did they manage that without slowing down the CDN side? Lucas: They created separate engineering teams with separate roadmaps, but they shared the same platform team that maintained the edge servers. The platform team's job was to make sure that a new feature from the zero-trust team didn't introduce latency for the CDN team's traffic. Lucas: And they used a concept called 'resource isolation' — each team's software ran in its own container on the same server, with strict CPU and memory limits. If the zero-trust team's code had a memory leak, it couldn't crash the CDN process. Luna: So they effectively built a multi-tenant operating system for their own internal products. Lucas: Yes. And that's actually become a product in itself — Cloudflare's own infrastructure is now running on the same platform they sell to customers. It's dogfooding at the architectural level. Luna: I want to circle back to the business side. Cloudflare's CEO Matthew Prince said in 2020 that the zero-trust product would be free for up to 50 users. That's a bold move — giving away a product that competes with Zscaler and Palo Alto Networks. Lucas: It was a land-grab strategy. They knew that once a company had deployed Cloudflare's zero-trust client on a few machines, it was easy to scale up. And because the underlying platform was already paid for by the CDN business, the marginal cost of serving a free customer was almost zero. Luna: So the CDN business subsidized the zero-trust expansion. Lucas: Exactly. And that's only possible because the architecture allows both products to run on the same infrastructure. If they had built a separate network for zero-trust, the cost would have been prohibitive. Lucas: There's a lesson here for any CTO who's considering a platform pivot. The architectural decision — whether to build on shared infrastructure or separate stacks — is also a business decision. It determines your cost structure and your go to market strategy. Luna: And Cloudflare chose shared infrastructure, which gave them the ability to offer a freemium model that competitors couldn't match. Lucas: Right. Zscaler's architecture is built on dedicated proxies — every customer gets their own isolated infrastructure. That's more secure, but it's more expensive. Cloudflare's shared model is cheaper, but it means the security boundary is at the software layer, not the hardware layer. Luna: Which is a risk. But Cloudflare's bet is that software isolation is good enough — and the cost advantage lets them win the mid-market. Lucas: And so far, it's working. Cloudflare's revenue from zero-trust and other non cdn products has been growing faster than the core CDN business. In 2025, about 30 percent of their revenue came from those newer products. Luna: That's a meaningful shift for a company that started as a CDN. Lucas: It is. And it shows that when you get the architecture right, you can change your entire business model without rebuilding from scratch — just by layering new capabilities on top of the same infrastructure. Luna: I think the takeaway for CTOs is: think about your infrastructure as a platform, not a product. If you design it to be extensible, you can pivot faster than competitors who have to rip and replace. Lucas: I think that's the right note. Cloudflare's rewrite wasn't just a technical project — it was a strategic bet on where the network was going. And they built the architecture to make that bet pay off. Luna: Thanks for listening. We'll be back next week with another story from the engineering trenches.