Best of 2023: Microservices Sucks — Amazon Goes Back to Basics
As we close out 2023, we at DevOps.com wanted to highlight the most popular articles of the year. Following is the latest in our series of the Best of 2023. Welcome to The Long View—where we peruse the news of the week and strip it to the essentials. Let’s work out what really matters. This week: Amazon Prime Video has ditched its use of microservices-cum-serverless, reverting to a traditional, monolithic architecture. It vastly improved the workload’s cost and scalability. I’m Shocked. Shocked. Analysis: But it depends what you mean by “monolithic” None of this is a surprise to us old-skool devs. Although the team did need to clone the monolith a few times, splitting up the tasks so as to retain enough scaling headroom. But it shouldn’t be at all shocking—unless you’ve drunk the µservices Kool-Aid. What’s the story? Joab Jackson reports—“Return of the Monolith”: “Hopelessly archaic”The engineering team at Amazon Prime Video has been roiling the cloud native computing community with its explanation that … a monolithic architecture has produced superior performance over a microservices- and serverless-led approach. … Shocking!…In theory, the use of serverless would allow the team to scale each service independently. It turned out … they hit a hard scaling limit at only 5%. … Initially, the team tried to optimize individual components, but this did not bring about significant improvements. So, the team moved all the components into a single process, hosting them on … EC2 and … ECS.…The IT world is nothing but cyclical, where an architectural trend is derided as hopelessly archaic one year [and] the new hot thing the following year. Certainly, over the past decade when microservices ruled—and the decade before when web services did—we’ve heard more than one joke … about “monoliths being the next big thing.” Now it may actually come to pass. Not just a scaling advantage? Rafal Gancarz also notes huge cost savings—“Prime Video Switched from Serverless to EC2 and ECS”: “Single application process”Prime Video, Amazon’s video streaming service … achieved a 90% reduction in operational costs as a result. … The initial architecture of the solution was based on microservices … implemented on top of the serverless infrastructure stack. The microservices included splitting audio/video streams into video frames or decrypted audio buffers as well as detecting various stream defects … using machine-learning algorithms.…The problem of high operational cost was caused by a high volume of read/writes to the S3 bucket storing intermediate work items … and a large number of step function state transitions. … In the end, the team decided to consolidate all of the business logic in a single application process. … The resulting architecture had the entire … process running [as] instances distributed across different ECS tasks to avoid hitting vertical scaling limits. Horse’s mouth? Marcin Kolny, a Prime Video dev—“The move from a distributed microservices architecture to a monolith application helped achieve higher scale, resilience, and reduce costs”: “Also simplified the orchestration”We took a step back and revisited the architecture. … The main scaling bottleneck in the architecture was the orchestration management that was implemented using AWS Step Functions. Our service performed multiple state transitions for every second of the stream.…We realized that distributed approach wasn’t bringing a lot of benefits in our specific use case, so … we moved all components into a single process to keep the data transfer within the process memory, which also simplified the orchestration logic. [Then] we cloned […]
