Isolating Failures: Microservices Again
This is inadvertently becoming very much a pro-Microservice series.
To repeat an earlier statement, my motivation behind Microservices is not scalability. That is just a benefit. But, I thought of another benefit which (fortunately) did not come from first hand experience today; Microservices allow you to fail in isolation.
I will concede, if your microservices are co-dependent this won't be the case (necessarily). But it still could be. And that is a huge win.
Firstly, when they aren't co-dependent, it means that there is absolutely no reason for a failure in one service to bring another one down. This minimizes the impact and severity of any such issues. If there is a common underlying cause, like a shared service is down, or if they all use the same DB, then sure... things will go down. But not because of the architecture.
On the flip side, if they share a database, you haven't built a true microservice. Though that argument is a tad weak because they likely still rely on the same DB provider, and likely server even if they aren't in the same database. But, that is another debate.
And the last thing I'll say is about co-dependent services. Assuming it isn't some infrastructure failure which would bring things down regardless of architecture, there is a chance that if you're running in a cluster with redundant nodes of each service and load balancer which can detect and adjust for the outage, then even the loss of a single service won't take down co-dependent services. It may have an impact on performance and a few calls may be lost. But, it would be a lot less impactful than a single node in a distributed monolith going down.
Additionally, the performance hit will likely be rather isolated. Whereas, if a node in a distributed monolith goes down, that traffic needs to be distributed across all other nodes, potentially impacting all functionality. And in that sense, I suppose that isolating failures actually is a scalability concern as well.
So, incidentally, another point for Microservices.
Comments
Post a Comment