Scalability

The monolithic code is a single unit. Thus, all parts of the application share the same memory. For a bigger system, we need to have a bigger infrastructure. When the application grows, we need to scale the infrastructure as needed. The scaling of an already bigger infrastructure is always a difficult and costlier task for operations. 

Even though they have all the necessary code to handle anything in the product at a single place (no need to worry about latency or availability), it is difficult to handle the resources that it consumes to run and it is definitely not scalable. If one part of the application fails, then the whole product will be impacted. When one thread or query of the product clings on to the memory, then the impact will be seen by millions of our customers.

Microservices, on the other hand, require less memory per service to run since we are splitting the application into smaller components, which, in turn, could reduce the infrastructure's cost for high-bandwidth applications. For example, it is cheaper to run ten 2 GB instances (costs ~$170 per month on AWS) than running a single 16 GB instance (costs ~$570 per month on AWS). Each component runs in its own environment, which makes microservices much more developer-friendly (if you are a large team) and cloud-native. Similarly, microservices also increase the throughput across services. A memory-intensive operation on one service will not affect any other service as the load is distributed.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.116.62.45