> Markdown version of [/videos/100234-20-billion-requests-a-week-upgrading-twilio-s-api-gateway-at-scale?t=3](https://www.wearedevelopers.com/videos/100234-20-billion-requests-a-week-upgrading-twilio-s-api-gateway-at-scale?t=3). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # 20 billion requests a week: Upgrading Twilio's API gateway at scale How do you safely upgrade a legacy API gateway handling 20 billion weekly requests? Discover Twilio's five-year modernization strategy that conquered extreme technical debt with zero major disruptions. - **Speakers:** [Ainhoa Arruabarrena Ortiz](https://www.wearedevelopers.com/@ainhoa-arruabarrena-ortiz), [Mario Román Dono](https://www.wearedevelopers.com/@mario-roman-dono), [Marius Obert](https://www.wearedevelopers.com/@marius-obert) - **Event:** World Congress 2026 Europe - **Published:** July 10, 2026 - **Duration:** 22:08 - **URL:** https://www.wearedevelopers.com/videos/100234-20-billion-requests-a-week-upgrading-twilio-s-api-gateway-at-scale ## Summary Twilio handles over 20 billion requests a week, an operational scale that exposed the technical debt of a decade of rapid, undocumented growth. The legacy infrastructure lacked governance and relied on implicit behaviors across multiple API gateways, making scaling and maintenance increasingly risky. To safeguard performance without disrupting customer traffic, Twilio embarked on a five-year modernization strategy to unify their ingress behind a single, hardened API gateway. This transition established contract-driven development through OpenAPI specs as the single source of truth and distributed workloads across functional, Kubernetes-based cells tailored to specific traffic needs like messaging versus video. The migration strategy heavily leveraged weighted DNS records and YAML-based infrastructure as code to execute incremental rollouts and enable immediate rollbacks. Taking this methodical approach proved essential when encountering real-world friction, such as legacy non-SNI connections and Hyrum's Law—where customers silently relied on undocumented behaviors like specific JSON object ordering. The team even had to accommodate an infamous legacy asset, cowbell.mp3, which remained highly trafficked due to its presence in external developer tutorials. By treating migrations as long-term, iterative processes starting with unglamorous tasks like deprecating TLS v1, they achieved zero major disruptions. Ultimately, modernizing the API ingress drastically reduced cognitive load for internal teams, who no longer need to manage edge infrastructure and can instead focus on feature delivery. Customers benefit from globally distributed CDNs offering up to 30% latency reduction and cellularized infrastructure for superior reliability. Positioning themselves for the AI era, Twilio is now focusing on JSON-first API modernization and enhancing support for agentic workflows with newly introduced Model Context Protocol (MCP) servers. **Keywords:** api gateway modernization, edge infrastructure scaling, kubernetes cellularization, contract-driven development, openapi specification, weighted dns traffic routing, hyrum's law api dependency, zero downtime migration strategy, technical debt resolution, legacy system deprecation, infrastructure as code yaml, global cdn integration, model context protocol servers, agentic workflows, backwards compatibility management, json payload ordering ## Chapters 1. **The origin of Twilio's API tech debt** (00:03) — Years of rapid exponential growth created an undocumented ingress infrastructure that struggled to scale reliably. 1. **Legacy infrastructure components and non-negotiable requirements** (02:21) — Replacing a sprawling fleet of instances and dual gateways required maintaining strict backwards compatibility for existing clients. 1. **Architecting a unified contract-driven API gateway** (05:13) — Adopting a single source of truth based on Open API specifications enabled a modular, Kubernetes-driven cellular architecture. 1. **Executing safe traffic routing using intermediate DNS** (07:39) — Weighted DNS records and infrastructure-as-code configurations allowed granular traffic splitting and immediate rollback capabilities during the transition. 1. **Real-world migration roadblocks and undocumented dependencies** (12:21) — Uncovering unexpected client dependencies like legacy non-SNI connections and specific JSON orderings complicated simple platform updates. 1. **Performance outcomes of regional routing and cellularity** (16:39) — Rebuilding the edge infrastructure yielded improved network latency, zero downtime deploys, and an elevated developer experience for internal product teams. 1. **Modernizing edge experiences for agentic AI architectures** (19:18) — The next phase focuses on transitioning legacy XML responses to idiomatic JSON interfaces to empower conversational AI integrations. ## Related Moments - [Managing technical debt while iterating on API infrastructure](https://www.wearedevelopers.com/videos/942-insights-from-building-the-canva-developers-platform-to-empower-185-million-designers) (from "Insights from building the Canva Developers Platform to empower 185 million designers") - [Executing massive cloud network migrations while maintaining live systems](https://www.wearedevelopers.com/videos/100128-the-golden-age-of-email-owning-the-inbox-in-the-age-of-ai) (from "The Golden Age of Email: Owning the Inbox in the Age of AI") - [Designing a resilient API gateway architecture](https://www.wearedevelopers.com/videos/54-improving-developer-happiness-with-gitops) (from "Improving Developer Happiness with GitOps") - [Refactoring a complex legacy monolith into microservices](https://www.wearedevelopers.com/videos/371-retooling-and-refactoring-an-investment-in-people) (from "Retooling and refactoring - an investment in people.") - [Addressing runtime migration specifics and future open source framework ambitions](https://www.wearedevelopers.com/videos/100311-swapping-a-data-warehouse-at-runtime-zero-downtime-migration-without-changing-a-single-client) (from "Swapping a Data Warehouse at Runtime: Zero-Downtime Migration Without Changing a Single Client") - [Understanding technical debt and legacy application risks](https://www.wearedevelopers.com/videos/1605-navigating-application-modernization-leveraging-gen-ai) (from "Navigating Application Modernization - Leveraging Gen-AI") ## Related Articles - [The CAMARA Project: How Telcos Collaborating Improves Developer Experience](https://www.wearedevelopers.com/magazine/671-the-camara-project-how-telcos-collaborating-improves-developer-experience) - [Dev Digest 132 - Binging WADFlix?](https://www.wearedevelopers.com/magazine/473-dev-digest-132-binging-wadflix) - [Navigating the AI Shift](https://www.wearedevelopers.com/magazine/629-navigating-the-ai-shift) - [Dev Digest 120 - Apple and peers](https://www.wearedevelopers.com/magazine/455-dev-digest-120-apple-and-peers) ## Related Jobs - [Principal Software Engineer](https://www.wearedevelopers.com/jobs/ext/267591-principal-software-engineer) at **Twilio** - [Principal Software Engineer](https://www.wearedevelopers.com/jobs/ext/115163-principal-software-engineer) at **Twilio** - [Principal Software Engineer](https://www.wearedevelopers.com/jobs/ext/267587-principal-software-engineer) at **Twilio** - [Artificial Intelligence (AI)](https://www.wearedevelopers.com/jobs/ext/1952055-artificial-intelligence-ai) at **Twilio** - [Principal Software Engineer](https://www.wearedevelopers.com/jobs/ext/146806-principal-software-engineer) at **Twilio** - [Senior Software Engineer (L3)](https://www.wearedevelopers.com/jobs/ext/1956800-senior-software-engineer-l3) at **Twilio**