Distributed monolith - a microservices nightmare

"... and then the interviewer coined an expression. I stared wide eyed as it hit me... microservices or not the monolith looms behind every feature... and it is a distributed monolith" TL;DR not what you think read on.

From monolith to microservices to monolith

What is it that fascinates developers all over the world with microservices? Some say it is the separation of concerns into tiny services focused on one task. Some say it is the scaling capabilities the architecture provides. Others like the fact that there is no single point of failure. Or is there? I came across this video and article by Ben Christensen about the perils of a miscoservice architecture to become a distributed monolith. And then it hit me. It is not only what is described in the article as signs and perils of a distributed monolith.

Consider a set of microservices "perfectly" orchestrated. They each pass around different DTOs, even if duplicate ones, that can evolve in separate paths over time, 3rd party vendor services are hidden behind some microservice of your own providing a facade. There is sufficient code reuse but also purposeful code duplication to prevent coupling and everything is ticking like a Swiss clock.

Consider however the following premise; When one service fails the whole system collapses. Your services are not fault tolerant enough. This also constitutes a distributed monolith.

I can almost hear your thoughts saying "impossible, we check for faults, we are fault tolerant, this guy is grasping at straws". I can, almost also, see you running  first thing in the morning and checking if that service you built on your last sprint is fault tolerant and won't take the whole system down with it when it fails. If it does you are not decoupled enough. In fact you are a monolith. I would add this argument to the article as well.

So how are your microservices faring? 


Popular posts from this blog

NUnit Console Runner and NLog extension logging for your tests

Tests code coverage in Visual Studio Code with C# and .Net Core

Applying an internal forums system in the company culture - thoughts