SlideShare a Scribd company logo
a
REARCHITECTING THE TWILIO API FOR
SCALE
SAM KITAJIMA-KIMBREL |
SAM KITAJIMA-KIMBREL |
EVERY COMMUNICATION COUNTS
SAM KITAJIMA-KIMBREL |
I’M SAM. I WORKED ON THIS.
SAM KITAJIMA-KIMBREL |
WHAT EVEN IS AVAILABILITY?
SAM KITAJIMA-KIMBREL |
api.twilio.com

Calls Messages Numbers
SAM KITAJIMA-KIMBREL |
api.twilio.com
😄

Calls Messages Numbers
SAM KITAJIMA-KIMBREL |
api.twilio.com
😭

Calls Messages Numbers
❌
đŸ’„
SAM KITAJIMA-KIMBREL |
api.twilio.com
😭

Calls Messages Numbers
❌
đŸ’„
😄
✅
REST API: 2013
SAM KITAJIMA-KIMBREL |
99.5%
AVAILABLE
1000 RPS
REST API: TODAY
SAM KITAJIMA-KIMBREL |
99.9994%
AVAILABLE
5000 RPS
SAM KITAJIMA-KIMBREL |
TWILIO API:
PAST AND PRESENT
SAM KITAJIMA-KIMBREL |
LONG LONG AGO

ORIGINAL TWILIO ARCHITECTURE
SAM KITAJIMA-KIMBREL |
api.twilio.com (PHP)
Twilio Voice
GROWTH OVER TIME
SAM KITAJIMA-KIMBREL |
api.twilio.com (PHP)
Twilio Voice
SMS
GROWTH OVER TIME
SAM KITAJIMA-KIMBREL |
api.twilio.com (PHP)
Twilio Voice
SMS ...
SAM KITAJIMA-KIMBREL |
GOOD
SAM KITAJIMA-KIMBREL |
COMMON IMPLEMENTATION
SAM KITAJIMA-KIMBREL |
COMMON
AUTH
VALIDATION
FORMATTING
DATA MODEL
SAM KITAJIMA-KIMBREL |
NOT SO GOOD
SAM KITAJIMA-KIMBREL |
VARIED WORKLOAD
SAM KITAJIMA-KIMBREL |
VARIED WORKLOAD
SAM KITAJIMA-KIMBREL |
COMMON
WORKER POOL
REQUEST QUEUE
SAM KITAJIMA-KIMBREL |
SYNCHRONOUS I/O
SYNCHRONOUS I/O
SAM KITAJIMA-KIMBREL |
Fixed-size pool of workers
1 N
... ...
Request
Queue
SYNCHRONOUS I/O
SAM KITAJIMA-KIMBREL |
1 N
... ...
SYNCHRONOUS I/O
SAM KITAJIMA-KIMBREL |
1 N
... ...
BLOCKE
D
SAM KITAJIMA-KIMBREL |
SAM KITAJIMA-KIMBREL |
api.twilio.com (PHP)
Twilio Voice
SMS ...
SAM KITAJIMA-KIMBREL |
api.twilio.com (PHP)
Twilio Voice
SMS ...
☠
SAM KITAJIMA-KIMBREL |
api.twilio.com (PHP)
Twilio Voice
SMS ...
☠
âČ
SAM KITAJIMA-KIMBREL |
api.twilio.com (PHP)
Twilio Voice
SMS ...
☠
âČâČâČâČâČâČâČâČâČâČâČ
SAM KITAJIMA-KIMBREL |
api.twilio.com (PHP)
Twilio Voice
SMS ...
☠
âČâČâČâČâČâČâČâČâČâČâČ
❌
SAM KITAJIMA-KIMBREL |
api.twilio.com
😭

Calls Messages Numbers
❌
đŸ’„
😄
✅
SAM KITAJIMA-KIMBREL |
api.twilio.com
😡

Calls Messages Numbers
😡 😡 😡😡😡😡
❌
SAM KITAJIMA-KIMBREL |
SAM KITAJIMA-KIMBREL |
KEEP
CODE REUSE
RAPID DEVELOPMENT
SAM KITAJIMA-KIMBREL |
FIX
RESOURCE UTILIZATION
FAULT ISOLATION
SAM KITAJIMA-KIMBREL |
SERVICE DECOMPOSITION
SERVICES, SERVICES EVERYWHERE
SAM KITAJIMA-KIMBREL |
Retrieve SMSLive Calls
Completed
Calls
Send SMS
...Numbers TaskRouter Lookups
WOULDN’T IT BE NICE IF

SAM KITAJIMA-KIMBREL |
Retrieve SMSLive Calls Completed
Calls
Send SMS
...Numbers TaskRouter Lookups
api.twilio.com
đŸ€”
SAM KITAJIMA-KIMBREL |
STARSHIP: API FEDERATION
(THE NEXT GENERATION)
API FEDERATION
SAM KITAJIMA-KIMBREL |
Retrieve SMSLive Calls
Completed
Calls
Send SMS
...Numbers TaskRouter Lookups
Starship — HTTP only!
API FEDERATION IN DETAIL
SAM KITAJIMA-KIMBREL |
smssend
Auth
Starship
Auth
Rate limit
Validate
Transform
Dispatch
Transform
Serialize
SAM KITAJIMA-KIMBREL |
SINGLE
IMPLEMENTATION
SAM KITAJIMA-KIMBREL |
MONITORING
METRICS
MANAGEMENT
SAM KITAJIMA-KIMBREL |
SAM KITAJIMA-KIMBREL |
SAM KITAJIMA-KIMBREL |
FLEXIBILITY AND SPEED
SAM KITAJIMA-KIMBREL |
UNIFIED WORKLOAD
+
ASYNC I/O
SYNCHRONOUS I/O
SAM KITAJIMA-KIMBREL |
Lightweight callback stack
...
... ...
Request
Queue
... ...
⏰
API FEDERATION
SAM KITAJIMA-KIMBREL |
Retrieve SMSLive Calls
Completed
Calls
Send SMS
...Numbers TaskRouter Lookups
Starship
API FEDERATION
SAM KITAJIMA-KIMBREL |
Retrieve SMSLive Calls
Completed
Calls
Send SMS
...Numbers TaskRouter Lookups
Starship
⚠
API FEDERATION
SAM KITAJIMA-KIMBREL |
Retrieve SMSLive Calls
Completed
Calls
Send SMS
...Numbers TaskRouter Lookups
Starship
⚠✅ ✅ ✅
✅ ✅ ✅ ✅
SAM KITAJIMA-KIMBREL |
api.twilio.com
😄

Calls Messages Numbers
😄 😄 😄😄😄😄
SAM KITAJIMA-KIMBREL |

More Related Content

PDF
"Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk
PDF
Building Blocks for Next Generation Contact Centers
PDF
Create an IVR that Keeps Up with Your Customers
PDF
Salesforce’s Andy Kung on the Power of CRM Integrations
PPTX
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
PDF
Why Mobile Messaging Works?
PDF
Understand How Consumers Use Messaging
PDF
What Can You Do With Twilio
"Reinventing the Dialplan" slides from Twilio's Astricon 2009 talk
Building Blocks for Next Generation Contact Centers
Create an IVR that Keeps Up with Your Customers
Salesforce’s Andy Kung on the Power of CRM Integrations
All Web Leads’ Lorena Lauv on How to Scale a Virtual Call Center
Why Mobile Messaging Works?
Understand How Consumers Use Messaging
What Can You Do With Twilio

More from Twilio Inc (20)

PDF
How To Track Calls Using Twilio?
PDF
Twilio Contact Center Overview
PDF
Twilio Signal 2016 WebRTC Reborn
PDF
Twilio Signal 2016 Using Add-ons
PDF
Twilio Signal 2016 Technical Blogging
PDF
Twilio Signal 2016 Serverless Contact Center
PDF
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
PDF
Twilio Signal 2016 Leading An Open Hardware Revolution
PDF
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
PDF
Twilio Signal 2016 Chaos Patterns
PPTX
Twilio Signal 2016 How to Impact Non-profits
PDF
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
PDF
Twilio Signal 2016 Listing Services and Lead Generation
PDF
Twilio Signal 2016 Bots
PDF
Twilio Signal 2016 Taking Your SMS App Global
PDF
Twilio Signal 2016 Real-time Communications Overview
PDF
Twilio Signal 2016 Omni-channel Routing Bots
PDF
Twilio Signal 2016 New Documentation
PDF
Twilio Signal 2016 Keynote
PDF
Twilio Signal 2016 How to Build Next Generation Speech Analytics
How To Track Calls Using Twilio?
Twilio Contact Center Overview
Twilio Signal 2016 WebRTC Reborn
Twilio Signal 2016 Using Add-ons
Twilio Signal 2016 Technical Blogging
Twilio Signal 2016 Serverless Contact Center
Twilio Signal 2016 Robots-IoT-Watson-Cognitive + Twilio
Twilio Signal 2016 Leading An Open Hardware Revolution
Twilio Signal 2016 IoT Using LittleBits and Twilio SMS
Twilio Signal 2016 Chaos Patterns
Twilio Signal 2016 How to Impact Non-profits
Twilio Signal 2016 Bringing P2P to the Masses with WebRTC
Twilio Signal 2016 Listing Services and Lead Generation
Twilio Signal 2016 Bots
Twilio Signal 2016 Taking Your SMS App Global
Twilio Signal 2016 Real-time Communications Overview
Twilio Signal 2016 Omni-channel Routing Bots
Twilio Signal 2016 New Documentation
Twilio Signal 2016 Keynote
Twilio Signal 2016 How to Build Next Generation Speech Analytics

Recently uploaded (20)

PDF
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
PDF
How to Migrate SBCGlobal Email to Yahoo Easily
PDF
medical staffing services at VALiNTRY
PPTX
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
 
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
history of c programming in notes for students .pptx
PDF
Nekopoi APK 2025 free lastest update
PPTX
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
PDF
Adobe Illustrator 28.6 Crack My Vision of Vector Design
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
CHAPTER 2 - PM Management and IT Context
PDF
System and Network Administration Chapter 2
PPTX
Operating system designcfffgfgggggggvggggggggg
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
How to Choose the Right IT Partner for Your Business in Malaysia
PDF
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
PDF
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
PPT
Introduction Database Management System for Course Database
PDF
Digital Systems & Binary Numbers (comprehensive )
PDF
Understanding Forklifts - TECH EHS Solution
Internet Downloader Manager (IDM) Crack 6.42 Build 42 Updates Latest 2025
How to Migrate SBCGlobal Email to Yahoo Easily
medical staffing services at VALiNTRY
Lecture 3: Operating Systems Introduction to Computer Hardware Systems
 
Which alternative to Crystal Reports is best for small or large businesses.pdf
history of c programming in notes for students .pptx
Nekopoi APK 2025 free lastest update
Embracing Complexity in Serverless! GOTO Serverless Bengaluru
Adobe Illustrator 28.6 Crack My Vision of Vector Design
Design an Analysis of Algorithms II-SECS-1021-03
CHAPTER 2 - PM Management and IT Context
System and Network Administration Chapter 2
Operating system designcfffgfgggggggvggggggggg
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
How to Choose the Right IT Partner for Your Business in Malaysia
SAP S4 Hana Brochure 3 (PTS SYSTEMS AND SOLUTIONS)
Raksha Bandhan Grocery Pricing Trends in India 2025.pdf
Introduction Database Management System for Course Database
Digital Systems & Binary Numbers (comprehensive )
Understanding Forklifts - TECH EHS Solution

Twilio Signal 2016 API Architecture