Microservices and scalability

At the start of the chapter, I mentioned Microservices are a natural fit for scalable applications. Well, it is always easier to make copies of a smaller piece of code than a huge, monolith application, and as we have seen so far in this book, Microservices is all about breaking a monolithic application into smaller and more meaningful services.

Most importantly, Microservices can scale independently. Let's take an example: we have a huge e-commerce application that has multiple services, such as search, payment gateway, product catalog, and shopping cart. We are observing a lot of load on search due to the launch of new product lines. It is easier to just create replicas of search services and let the search functionality scale independently without worrying about the rest of the services. Here's another example: on a college admission day, we see a lot of load on the admission form-submission service, whereas the rest of the services, such as attendance or exam scheduling are seeing an almost negligible load. We can upscale the admission service without impacting the rest of the services.

Due to this independent nature of services, Microservices are a good fit for environments where one or more services is required to scale independently, without impacting the rest of the application.

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

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