Replay 2023: From Monolith to Workflows at Twilio

Twilio Logo White PNG

Industry

High Tech

Use Case

State Machine

Company Size

2000-10000

SDK

Java

Temporal

Self-Hosted

From Monolith to Workflows at Twilio

The Twilio messaging application used a monolithic architecture that was difficult to change. Their registration process, for instance, was a single state machine with 2,000 lines of code. This meant that adding a new step to the registration process required significant effort. Additionally, their system relied on many third-party integrations with rate limits, making it difficult to manage and troubleshoot errors.

Evaluation Process for Choosing a Workflow Solution**

Twilio considered several workflow solutions, including Temporal, Apache Airflow, Netflix Conductor, and Amazon Step Functions. They chose Temporal because it met their criteria:

  • Workflows as code: This was important because Twilio’s workflows are complex with a lot of branching logic.
  • Java support: Their existing monolith was written in Java.
  • Minimal code overhaul: They didn’t want to rewrite their entire codebase.
  • Dynamic workflows: This was important because they needed workflows that could be updated even while running.
  • Rate limiting: Temporal allows configuring the rate at which downstream APIs are called.
  • Managed cloud solution: Twilio wanted to focus on building features and not managing infrastructure.

Benefits of Migrating to Temporal**

Twilio observed several benefits after migrating to Temporal:

  • Easier feature implementation: Temporal workflows are implemented as a sequence of steps, making it easier to understand and modify workflows.
  • Improved developer productivity: The small learning curve of Temporal made it easy for developers to adopt.
  • Faster development: Temporal workflows can be easily integrated into new features.
  • Scale: Temporal allowed Twilio to scale their engineering teams.
  • Easier onboarding: New team members were able to quickly learn Temporal and contribute to workflows.

Overall, migration to Temporal was a positive experience for Twilio. It streamlined their development process, improved developer productivity, and made their workflows more scalable and maintainable.

Replay Video

This summary was pulled from a talk that the Twilio team provided at Replay 2023. You can check out the video below or see all the videos from the show on our Replay 2023 video page.

Build invincible apps

Ready to learn why companies like Snap, Alaska Airlines, and Nvidia trust Temporal as their secure and scalable way to build and innovate?