On mar 22 2023 Amazon team published this article after which it all started, internet got divided and missed the important point.
What amazon was building? : –
The team was building a real-time user experience analytics engine for live video that analyzed all users rather than just a subset, which is highly desirable. In fact, when Netflix launched its streaming service in 2007, it incorporated monitoring for all users, and it was the first workload to migrate to AWS in 2009. With Netflix now offering live broadcasts, it’s reasonable to assume that they have expanded their own capabilities to include something similar to what Prime Video describes. This reflects the growing trend among streaming services, including the use of technologies like the Amazon Prime Microservice, to enhance real-time analytics and user experience monitoring for all users.
The problem they were facing:
The major scalability bottleneck in the architecture was the orchestration management, which utilized AWS Step Functions. Their service underwent multiple state transitions for each second of the stream, resulting in exceeding account limits quickly. Additionally, AWS Step Functions charged users for each state transition, compounding the cost problem. The second issue they encountered was related to the method they used to transfer video frames between various components. However, the large number of Tier-1 calls to the S3 bucket resulted in high costs.
The Solution:
Amazon team then combined the existing code into a single long-running microservice, horizontally scaled using ECS and invoked through a Lambda function. This was just one of the microservices used in the Prime Video application. Although the team called it a microservice to monolith transition, it was actually a microservice refactoring step, which is what the Serverless first approach recommends. As a result amazon successfully saved 90% of costs on this service’s hosting. The idea is not to advocate for Serverless Only, but rather to recommend building a rapidly developed prototype as a continuously running autoscaled container for sustained high traffic, low latency, and higher efficiency as part of a larger serverless event-driven architecture. Starting with an Amazon Prime Microservice would likely take longer and be less flexible as the team figures out exactly what they are trying to build.
Conclusion:
In my view, Amazon team misunderstood the situation, although the team followed the best practices “they were simply refactoring a microservice to be used more efficiently instead switching to monolith”. However, there is currently a popular trend to criticize microservices and return to monoliths, which has some facts behind it. Microservices were oversold as a universal solution, perhaps by people promoting Kubernetes with a simple marketing message that all enterprises should modernize and adopt cloud-native microservices.
Do you like to read more educational content? Read our blogs at Cloudastra Technologies or contact us for business enquiry at Cloudastra Contact Us.