~/talk

From Flying Circus to Holy Grail: Migrating the Twilio API from PHP to Python

Talkat PyOhio 2016 · 2016-07-30..07-31· [python, software-architecture]
links:none on file
slides:none on file

Twilio’s REST API migrates from a 500k‑line PHP monolith to a fleet of Python services behind a starship proxy (Flask + Flask‑RESTful + requests) that maps public routes to internal REST services. Starship implements auth, validation, rate limits, instrumentation (Datadog), and async I/O with gevent, and handles ~5,000 req/s. Migration proceeds endpoint‑by‑endpoint using nginx routing, the proxied resource pattern, unit/integration/cluster tests, response diffing, shadowing and canary rollouts to validate behavior without downtime.

AI-written summary · about

  1. 0:00Start
  2. 4:34Difficult deploys
  3. 5:09Hard to understand
  4. 5:36Operationally awful
  5. 6:49What to do?
  6. 7:08Refactor and replace!
  7. 8:50Starship: API Federation (The Next Generation)
  8. 10:32Proxied Resource
  9. 11:43Benefits
  10. 12:21Flexibility
  11. 12:49Operational excellence
  12. 15:10Planning
  13. 15:56Start small
  14. 16:41Architecture
  15. 17:09We can solve any problem by introducing a layer of indirection
  16. 18:18Keep it simple
  17. 18:43Testing
  18. 19:30Test in layers
  19. 21:31Starship's Test Pyramid Unit tests: auth functions, transformations, serializations, etc. • Integration tests: mocked-out requests • Cluster tests: black box requests to live systems • Manual tests
  20. 22:15Starship's Test Pyramid Unit tests: auth functions, transformations, serializations, etc. • Integration tests: mocked-out requests Cluster tests: black box requests to live systems • Manual tests
  21. 22:39Reduce overhead: find common cases
  22. 24:35Throwaway tests
  23. 25:02Response diffing
  24. 26:46Small Fast Simple
  25. 27:31Shadow deployments
  26. 28:56Canaries
  27. 29:26Batch
  28. 30:09Cheat
  29. 38:02NEXT DAY VIDEO
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.