Breaking the Monolith: How We Used the Strangler Fig Pattern to Transform Segment’s Notification Architecture
Blog post from Twilio
Segment's notification architecture faced significant reliability challenges due to its evolution into a monolithic system, which created cascading failures and inefficiencies. To address this, the team employed the Strangler Fig pattern, a strategy that allows for incremental migration by building new functionalities alongside the existing system and gradually redirecting traffic. They focused first on the API layer, extracting CRUD operations into a standalone service and employing a dual-write pattern for seamless data synchronization. This was followed by moving event processing from a cron job scheduler to a more modern orchestration platform, Orkes, which transformed monolithic procedures into task-based workflows, enabling modularity and parallel development. The orchestration approach provided clear separation between the control plane and data plane, enhancing resilience, scalability, and simplicity. This transformation journey, which combined the benefits of microservices with unified service management, demonstrated that orchestration could effectively modernize complex systems by transforming operational complexity into composable workflows. The project highlighted the importance of prioritizing customer impact, favoring orchestration over traditional microservices, and designing for reusability to drive rapid innovation while maintaining reliability.