There are many ways to design the platform architecture, however every platform has its own unique requirements. The architecture of every platform can vary totally to meet the needs of respective platform.
There are many case studies to look into platform architecture which I will cover in different article, we can look into linked-in, ebay, Amazon and netflix architectures to get better understanding on Platform architecture.
For now in this article we will understand first approach that Having Multiple Apps with its own independent Database and Backend. For our understanding purpose we will consider designing a platform for an Amazon Kind of Online Shopping Platform
Platform Architecture for Amazon Kind of Online Shopping Platform with Multiple Apps Approach
If you consider Amazon kind of Online Shopping Platform, we first have to identify which are the different huge modules which are candidates for making it as a separate app altogether
- Sellers or Vendors who sell the products
- Seller is the one who has his shop and sell products in amazon
- He should be able to add his products
- He should be able to manage discounts, offers for his products
- He should be able to dispatch his product
- He should be able to manage his revenue/profit and other finance aspects
- The one who buy products in Amazon
- He should be able to manage his Cart
- He should be able to manage his delivery addresses
- He should be able to do payment using his choice of payment mode
- Product Dispatch Management
- Tracking the product while dispatching from one place to another
- Every city has a collection centers and products has to be managed for timely delivery
- Products Delivery Management
- Once product is reached the destination city it has to be picked by delivery person
- Assign delivery person
- Deliver to customer and update the status
- receive cash in case is Cash-On-Delivery
- Amazon Finance Management
- This is kind of Super Admin Functionality
- Managing refunds
- managing failed transactions
- Transferring money to Seller
I listed only few functionalities however there will be many more under each of these main features.
Why Can’t be its one super big Monolithic Application ? Rather than multiple Apps ?
To answer this question we have to think of following important aspects which we covered in our first Article Which are as follows
- Scalability : For Amazon Kind of Applications, millions of requests will be coming every second. There are millions of users buying and millions of sellers selling and millions of products listed, millions of transactions happening. It is highly impossible to handle everything in one huge monolithic server, because every server has some upper limits with respect to hardware and capacity, one huge database to scale it to that level we have to divide it into multiple pieces and manage it independently.
- Maintainability: It is very hard to maintain one huge monolithic app for such a huge volume.
- Resilient: Any major update to particular part of the platform should not affect to other parts of the platform
- Development: For amazon kind of huge platforms, they have huge team spread across the world and each teach is enhancing their own module by doing lot of research within their small team. It is not possible to manage development activity effectively if its one huge monolithic app
Now let us see how the Architecture Diagram looks: You can use various apps for designing Architecture Diagram
In the above diagram, each app is one server and it has its own database. There are third party services used commonly across many apps, like
- Elastic Search Service : For faster product search, Elastic Database is must for better searching capability.
- Cloudinary is another service used for multi media file handling
- Authentication service is like firebase, auth0 for user authentication
- Many more such services will be used
Advantages of Multi Application Platform Architecture
Scalability: In this architecture the platform is scalable to handle high traffic, because during peak time like Amazon big billion day, more and more people will buy products, the traffic will be too high for Consumer App. So in that case if its independent server by itself, we can increase the capacity of that server alone to handle millions of requests, however other apps may not need so much so at this stage.