Is Micro-services the way to go in the future?
How can Micro-services improve productivity and developer experience?
While intern-ing at a small company, one of the problems we face is our infrastructure of software. It was never built to scale. Sure, scaling is managed by our service providers but we're talking about maintenance of the application and urgent bug fixes in the application. Here is the current infrastructure of our application:
Now here comes a problem that occurs a lot. We receive notice that one of our modules are broken (Payment Module). This would require the whole backend to have a downtime while we fix/patch and re-deploy. Other modules (e.g. Search) would be affected too because of the downtime. In this modern world where there are millions, if not billions of users of the internet, is this really the way to go?
Micro-services solves the problem by lifting different modules of our application in a separate container. This allows for the easy plug-in-plug-out scenario. Let's say here is the proposed Micro-services architecture of our current app (not comprehensive):
So how does Micro-services solve the problem?
Simple, we do not need to bring down the whole backend to fix one module. We can instead plug-out, fix and plug it back in, redeploy the affected service without affecting other services (that are not reliant)
In the old architecture, the Backend is affected (as a whole)
In the new architecture, only the Payment service is affected
Companies that adopt Micro-services
While discovering this new technology, I am sure that I am not the only one who sees Micro-services the same way. Companies such as Shopee, Google and Netflix are adopting and using Micro-services in their products to serve large scale software.
Testing and Running Micro-services locally
You can run Micro-services locally using Docker. Writing backend services that adopts the Micro-services pattern is available using Nest.js
Did you find this article valuable?
Support Nabil Ridhwan by becoming a sponsor. Any amount is appreciated!