\u003Cfigcaption>\u003Cstrong>Fig 1.\u003C/strong> Rollout: traffic to the old sender dies down as the new sender's efficiency takes over its work\u003C/figcaption>\u003C/figure>\n\u003C!-- /wp:image -->\n\n\u003C!-- wp:image -->\n\u003Cfigure class=\"wp-block-image\">\u003Cimg src=\"https://lh3.googleusercontent.com/6qP9P7vRMwSS2ZlcQfrGzqFv-orXt-n4bFMUWmfGx3OoAnU7oJdI8MDsVVebXnWoBIfF_eLcjvFRrUGoftg5QUbjtfB4xT5urggrGz1dTsnLHJNUzRJvLtUU0gZOPFe_esSgJKw3\" alt=\"\"/>\u003Cfigcaption>\u003Cstrong>Fig 2. \u003C/strong>Rollout: the new sender picks up servicing\u003C/figcaption>\u003C/figure>\n\u003C!-- /wp:image -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>In the end, our largest cluster went from 4 * machines, each with 12 clowns, to 3-15 Kubernetes pods, each requesting 250mCPU.\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:image -->\n\u003Cfigure class=\"wp-block-image\">\u003Cimg src=\"https://lh3.googleusercontent.com/voprbXmIvHfefHylSl5JgUqZwS-F-ZtPf8LVNakANVCpgROAVNn_gT0R5E0IItkdagto8nhgDlnWywg-VTJJ_0rE1A9qohsBLghiJ2EHQBlY17X1wg5LrR637id0aHNz7bGpVPVZ\" alt=\"\"/>\u003Cfigcaption>\u003Cstrong>Fig 3. \u003C/strong>Change in backlog service over the period of retirement\u003C/figcaption>\u003C/figure>\n\u003C!-- /wp:image -->\n\n\u003C!-- wp:image -->\n\u003Cfigure class=\"wp-block-image\">\u003Cimg src=\"https://lh6.googleusercontent.com/xxaFLySFnaaDEHU4fYdiP-mHrt3nx98VNlTiwoSomqm4D5iGcA_C8I98VOfmZ76LmIiVYJapZF-CT1Bt6LIL0rZKP4pcUx8CgFTk87BrOI_0577uiA-S_OIuT3HMFKmB3hj8Z4mh\" alt=\"\"/>\u003Cfigcaption>\u003Cstrong>Fig 4. \u003C/strong>New autoscaling (over a one week period)\u003C/figcaption>\u003C/figure>\n\u003C!-- /wp:image -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>In short, this was highly successful. Another component from our EC2 and Eventmachine architecture crossed off the list and another <N> boxes removed.\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:heading -->\n\u003Ch2 id=\"h-summary\">\u003Cstrong>Summary\u003C/strong>\u003C/h2>\n\u003C!-- /wp:heading -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>Well-documented stories about trying to rebuild, re-architect, and re-envision systems are countless, and often contain a warning about embarking on such projects. Those of us with previous experience in architecture overhauls will almost always avoid rewrites at any cost because they so often go wrong. Also, complex systems are usually that way for a reason. As explained by \u003Ca href=\"https://fs.blog/2020/03/chestertons-fence/\">Chesterton’s fence\u003C/a>, we are usually better off assuming that the person who came before us knew something we did not.\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>After some failures and challenges along the way, however, we found a path to progress and an approach that does allow us to rewrite code effectively and efficiently while also reducing our maintenance burden. To be fair, our rewrite probably wasn’t what Joel Spolsky meant when he called rewrites one of the \u003Ca href=\"https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/\">things you should never do\u003C/a>.\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>But what we have found is that by identifying components with well defined boundaries, it is possible to rewrite them without throwing entire systems away. If you can identify well-defined boundaries and interfaces, things become a lot easier. In the case of the webhooks pipeline, this had a logical boundary in the form of a queue. We could rewrite parts of this over time, which gave us great ability to test and verify new components in the pipeline while still having the ability to rollback in case of failure.\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>We have also found that with each one of these projects completed, we are realising benefits of less operational burden, which means we can actually speed up the rate of progress. Making that initial breakthrough was the greatest challenge and it’s important to keep up momentum to avoid slipping back into an unsustainable realm. Now that we’ve broken the wall, we’re excited and confident about having a simpler system that allows us to focus on doing the stuff we actually love to do—building great products and cool features, rather than just keeping the lights on.\u003C/p>\n\u003C!-- /wp:paragraph -->\n\n\u003C!-- wp:separator -->\n\u003Chr class=\"wp-block-separator has-alpha-channel-opacity\"/>\n\u003C!-- /wp:separator -->\n\n\u003C!-- wp:paragraph -->\n\u003Cp>\u003Cem>The Stack Overflow blog is committed to publishing interesting articles by developers, for developers. From time to time that means working with companies that are also clients of Stack Overflow’s through our advertising, talent, or teams business. When we publish work from clients, we’ll identify it as Partner Content with tags and by including this disclaimer at the bottom.\u003C/em>\u003C/p>\n\u003C!-- /wp:paragraph -->","html","2021-05-19T14:00:00.000Z",{"current":752},"rethinking-system-architecture-can-kubernetes-help-to-solve-rewrite-anxiety",[754,762,766,771,773,777],{"_createdAt":755,"_id":756,"_rev":757,"_type":758,"_updatedAt":755,"slug":759,"title":761},"2023-05-23T16:43:21Z","wp-tagcat-code-for-a-living","9HpbCsT2tq0xwozQfkc4ih","blogTag",{"current":760},"code-for-a-living","Code for a Living",{"_createdAt":755,"_id":763,"_rev":757,"_type":758,"_updatedAt":755,"slug":764,"title":765},"wp-tagcat-kubernetes",{"current":765},"kubernetes",{"_createdAt":755,"_id":767,"_rev":757,"_type":758,"_updatedAt":755,"slug":768,"title":770},"wp-tagcat-partner-content",{"current":769},"partner-content","Partner Content",{"_createdAt":755,"_id":767,"_rev":757,"_type":758,"_updatedAt":755,"slug":772,"title":770},{"current":769},{"_createdAt":755,"_id":774,"_rev":757,"_type":758,"_updatedAt":755,"slug":775,"title":776},"wp-tagcat-partnercontent",{"current":776},"partnercontent",{"_createdAt":755,"_id":778,"_rev":757,"_type":758,"_updatedAt":755,"slug":779,"title":781},"wp-tagcat-software-architecture",{"current":780},"software-architecture","software architecture","Using Kubernetes to rethink your system architecture and ease technical debt",[784,790,796,802],{"_id":785,"publishedAt":786,"slug":787,"sponsored":12,"title":789},"a049cba9-0033-4fa1-a6f8-22266173df37","2025-10-09T14:00:40.220Z",{"_type":10,"current":788},"who-watches-the-watchers-llm-on-llm-evaluations","Who watches the watchers? LLM on LLM evaluations",{"_id":791,"publishedAt":792,"slug":793,"sponsored":12,"title":795},"151b41b3-ad6c-4a40-9de3-d652c27eb146","2025-10-08T14:00:00.000Z",{"_type":10,"current":794},"a-new-look-for-comments","A new look for comments",{"_id":797,"publishedAt":798,"slug":799,"sponsored":12,"title":801},"1ef8acf8-1023-4010-88df-d0d4f54403ac","2025-10-06T07:40:00.000Z",{"_type":10,"current":800},"beyond-code-generation-how-ai-is-changing-tech-teams-dynamics","Beyond code generation: How AI is changing tech teams' dynamics",{"_id":16,"publishedAt":17,"slug":803,"sponsored":12,"title":20},{"_type":10,"current":19},{"count":805,"lastTimestamp":806},3,"2023-05-25T09:47:33Z",["Reactive",808],{"$sarticleModal":809},false,["Set"],["ShallowReactive",812],{"sanity-_cPxCjzLfXl-2TRg3ttaukwO8H5LNTdvyQ1GF_c_58g":-1,"sanity-comment-wp-post-18096-1760235417256":-1},"/2021/05/19/rethinking-system-architecture-can-kubernetes-help-to-solve-rewrite-anxiety"]