Before I start this post, I feel it necessary to give you some pertinent information about my background. I love distributed systems. My focus/specialization in grad school was distributed systems. My early professional career was spent exclusive working on extremely distributed systems. It was some time into my professional career before I first worked on a system that could be described as a "monolith". I have done more of my fair share of evangelizing the benefits of distributed systems to anyone that would listen and have personally helped more than one organization that had outgrown it's previous architectural paradigm, transform their platform to a more fitting distributed architecture.
Given the above, one could be forgiven for assuming that I would be excited with the industry's current obsession with micro services. Nothing could be further from the truth. Anyone with experience in distributed systems will tell you two things:
- They are hard to build properly (I'm reminded of the old joke. What's the first rule of distributed systems.....don't build them)
- They are expensive to maintain (considerably more expensive than most people estimate).
- Micro-services are not the solution for a poorly designed monolith
- Micro-services are not the solution to a lack of process and/or discipline in an organization's engineering process
- Micro-services are not the solution to a lack of experience within an engineering team
The problem is that the high level symptoms presented by an overstretched monolith, are similar to the symptoms presented by the above problems. Issues like difficulty in deployment, drop in velocity, drop in quality etc. So often times people will prematurely jump to micro-services as a solution when they see these issues, rather than digging in and doing the work to ensure the root cause is actually a case of the architectural paradigm no longer fitting the problem space. Millions of dollars are then wasted heading in a different direction only to end up in an even worse place than where they started.
Micro-services are a very effective solution created for a very specific problem space, just make sure you are actually in that problem space before walking down that very painstaking path, else it will make your problems much worse.