Why Twilio Segment moved from microservices back to a monolith

https://news.ycombinator.com/rss Hits: 16
Summary

Given that there would only be one service, it made sense to move all the destination code into one repo, which meant merging all the different dependencies and tests into a single repo. We knew this was going to be messy. For each of the 120 unique dependencies, we committed to having one version for all our destinations. As we moved destinations over, we鈥檇 check the dependencies it was using and update them to the latest versions. We fixed anything in the destinations that broke with the newer versions. With this transition, we no longer needed to keep track of the differences between dependency versions. All our destinations were using the same version, which significantly reduced the complexity across the codebase. Maintaining destinations now became less time consuming and less risky. We also wanted a test suite that allowed us to quickly and easily run all our destination tests. Running all the tests was one of the main blockers when making updates to the shared libraries we discussed earlier. Fortunately, the destination tests all had a similar structure. They had basic unit tests to verify our custom transform logic was correct and would execute HTTP requests to the partner鈥檚 endpoint to verify that events showed up in the destination as expected. Recall that the original motivation for separating each destination codebase into its own repo was to isolate test failures. However, it turned out this was a false advantage. Tests that made HTTP requests were still failing with some frequency. With destinations separated into their own repos, there was little motivation to clean up failing tests. This poor hygiene led to a constant source of frustrating technical debt. Often a small change that should have only taken an hour or two would end up requiring a couple of days to a week to complete. The outbound HTTP requests to destination endpoints during the test run was the primary cause of failing tests. Unrelated issues like expired credentials shouldn鈥檛 fail tes...

First seen: 2025-12-13 21:52

Last seen: 2025-12-14 12:54