Amazon Prime Video Application Architecture: From Micro-services to Monolithic
Hemang Davé
Strategic Thinker & Innovator | Servant-Leader | Keynote Speaker | American Dream
As the saying goes, “Everything old is new again!”??If you wait long enough, trends from the past inevitably return to become contemporary and hip – and technology trends are no exception to that rule. Recently, Amazon announced that its Prime Video application is switching its architecture from serverless microservices-based architecture to monolithic architecture.?
What does this mean???You may recall that Amazon, as a part of its Amazon Web Services (AWS), championed serverless microservices-based architecture almost 15 years ago;??up until then, almost all applications were monolithic (this will be further defined below).??
Each type of application architecture, whether serverless microservices-based or monolithic, has its own advantages and disadvantages, but the question remains – why, after so many years of utilizing serverless microservices-based architecture (with great success), is Amazon shifting towards monolithic architecture???There are two main drivers for Amazon’s move: performance and cost.
Before we delve further into the main topic, let us define our key terms:
-???????Serverless microservices-based architecture?means that the application developer does not need to worry about the underlying infrastructure, as a piece of code is first invoked via a trigger, then the AWS compute platform intercepts the trigger and executes the associated piece of code.??The application code is spread across hundreds, or even thousands, of files.
-???????Monolithic application architecture?means that most of the application code is concentrated in one or a handful of files along with the application’s needed configuration information. Monolithic application code can be many millions of lines of code in one file, depending on the application’s complexity and scope.
Since serverless microservices-based architecture splits the application code in much smaller segments of code, each piece is much simpler to write, manage, modify, and promote into production. This architecture is well-suited for agile and global teams, as well as for cloud and distributed infrastructure platforms. These infrastructure platforms are typically constructed using smaller commodity hardware, and this type of architecture scales very well horizontally.??
领英推荐
However, while utilizing this architecture, Amazon observed that there was a huge amount of communication overhead taking place across components on network and storage devices, introducing undesirable performance degradation and latency.
After moving the Amazon Prime Video application to monolithic architecture, Amazon observed that application performance improved greatly and overhead was significantly reduced since communication across application modules did not need to travel over the network and to the storage subsystems.??Perhaps the biggest payoff of this change was that Amazon was able to reduce infrastructure costs by?90%!
You may be asking, “If it is possible to improve application performance?and?reduce infrastructure costs by 90%, why wouldn’t everyone choose to use monolithic architecture?”??It is not as simple as it may seem;??remember, each architecture methodology has its own unique advantages and disadvantages.??Monolithic applications do require vertical infrastructure scaling – which means each server must be more powerful and needs more CPUs, more memory, and other server components, leading to higher and more specialized HW costs.??For example, IBM Mainframe (also known as IBM Z Series) is legendary when it comes to vertical scaling, so it was the hardware choice for past monolithic applications.??It is also worth noting that monolithic applications may prove hard to maintain over their life span.?
Below are some notables for application architecture:
What lessons can we draw from this???The simple answer is never “one size fits all” in technology, and this is no less true for application architecture.??Over the last 15 years, everyone has wanted to move to serverless microservices-based horizontally-scaled architecture – but it is not ideal for every application’s specific needs.??As with any choice in life and in business, there are always tradeoffs;??you must evaluate and choose the appropriate architecture based on your business and technology needs. Another important dimension to this is workforce skills for application architecture.
Hope you found this blog insightful!??Feel free to share it with others in your network. I would love to hear your thoughts in the comments section below. Please note that all views expressed in here are mine, and do not necessarily represent Kyndryl’s official positions.
Principal Enterprise Architect at TriNet
1 年I think scale / performance is part of the take-away here as well. Concurrently analyzing 1000+ livestreams is a demanding task. The deeper you push an app into the top right corner of the volume / performance graph, the more rewarding it is to look beyond the typical 'best practices' and employ some creative systems thinking.
Director of Enterprise Architecture & Strategy
1 年In short: IPC outperforms RPC.