The original plan for this post was an overview into the technologies and patterns used in microservices, in particular I wanted to look at the bits we often see missing or poorly implemented. A colleague of mine, Dan Dekel, recently gave a talk at a local meetup on a similar topic, and it generated more debate than he had expected. He covered the importance of CICD, running multiple instances of each microservice, consistency across the environments, patterns such as circuit breaker, general transient fault handling, correlation and analytics on logging, API versioning and consumer driven contract testing. It seems that opinions (and emotions) on microservices still run deep, and what ensued was a debate on synchronous vs asynchronous architectures.
When I speak with developers that have had a poor technical experience with microservices, there seems to be a common denominator. The team was often well aware of the problems, and they had ideas on how to fix it, but they were essentially stuck with a blueprint handed down from above.
So in this post I’m instead going to look at some of the cultural warning signs you might want to consider before making a decision to go with microservices.
There is no question that well designed microservices can scale in ways that are difficult for a monolith. But seldom do I see a monolith that has gotten anywhere near the limits to which it could scale. Monoliths can and do operate at global scale loads. If your monolith is having trouble supporting a few hundred users, then it’s probably not because it’s a monolith, or because it was written to use some (now) less fashionable framework. Scale issues will exist regardless of the architecture and if you can’t fix these problems in your existing application, microservices aren’t necessarily going to improve the situation.
This is an interesting one, because the ability to decouple teams and have them work on separate groups of microservices is a significant productivity gain.
One observation is that a monolith can create contention at the source code level. As the number of developers increases, you can easily trip over each other as changes are merged. At a certain size and level of complexity a few key individuals become the only people that have the knowledge necessary to make significant changes to the monolith, and it becomes difficult to scale around these people. In contrast, microservices will generally be divided into much smaller self-contained repositories and this makes it easier and safer to make changes. However, this isn’t an intrinsic benefit of microservices, it is really just an argument for good code structure and separation of concerns - you could achieve something similar in a monolith by organising the code differently.
The most significant productivity improvements are realised inside an organisational culture that understands and grants autonomy to the teams. And that remains true independent of whether you are building monoliths or microservices. Further, if you don’t already have that sort of culture, then a pivot to microservices is likely to create a really big mess.
Here are a few warning signs that your culture might not be ready to support microservices:
In one way or another, all of these items shift control away from the development team. Why is this particularly problematic with microservices? The productivity gains of microservices come from the fact that they are decoupled from each other (and by extension, other teams). This empowers teams to operate with a minimum of external dependencies and each to operate at close to their sustainable capacity.
Anything that gets in way of this autonomy has the potential to render the productivity gains of microservices irrelevant, and you’ll likely be running significantly slower than you were with a monolith or an older tech stack. If you are considering microservices, or have already started using them, I’d highly recommend reading Accelerate. It provides a comprehensive overview of research into the capabilities of high performing teams and how they can be measured. Don’t head down the microservices path without a culture that can support autonomous teams.
❤ Australian Owned & Operated, 100% Onshore
Organisations across Australia turn to Patient Zero design, build and maintain custom software applications. Our Australian based development teams are vendor & technology agnostic and ready to deliver your next project.
We have a proven track record of projects delivered in a diverse range of industries including Education, Insurance, Waste Management, Health/Medtech, Government and even EV Charging.
1300 714 093
[email protected]
Brisbane
Level GR-109
310 Edward Street
BNE QLD 4000
Sydney
Level 3-104
320 Pitt Street,
Sydney NSW 2000
ABN 98 611 165 498