Mild mannered microscopic monoliths
Jonas Hultenius
2023-05-09
An article from the Amazon Prime team is making the rounds these last couple of days and like clockwork everyone is on the bandwagon. Either stating that this proves everything or nothing.
The article I’m thinking of is “Scaling up the Prime Video audio/video monitoring service and reducing costs by 90%” and talk about the enormous saving the prime team have made from switching from a microservice centric approach to a more traditional monolith.
This have had folks coming out of the woodworks claiming that they had infarct been right all the time and that this proves once and for all that the modular and distributed model was always just driven by less tech savvy engineers or salespeople driven by greed.
On the other hand, the microservice lovers, are parading an article about how Netflix find micros services to be a business-critical part of their solution to combat low latency and outages all over the globe. And how this is a critical part of modern architecture and that the other, the monolith crowd, is just a bunch of old engineers from the 1970 that are afraid of change and the next generation.
Being a pragmatic man, and architect, I would say… their both right.
Micro services are of then a great tool and should be used often. It has several great benefits that will help you and your organization to lower both costs, making thing modular and parts replaceable (and reusable) and helping us all reduce our carbon footprint.
But they are not a one-size-fits-all for every system and they should not be over relied on. The last part I can’t stress enough. They are a great tool but once ou see it as the only option you must stop, have a glass of water and ponder your future and start looking for a map back, you have gone too far.
The same thing goes for the monolith. It has it place in the broader IT ecosystem and is often a great solution to booth. It has been with us for year and years and have been proven effective and robust. We should not throw out the baby with the bathwater, let the monolith stay.
Now for my conclusion. We need to find common ground. Unoptimized code, architecture and solutions as a whole tend to be just that, unoptimized, any way you slice it. There are great benefits and use cases in both camps and we tend to find flaws in other solutions but not to admit that we make them ourselves.
I would suggest a truce between both partis and the establishment of a new shared, I hope, vision of the future. That of ‘micro monoliths!
Think about it. Things that are optimized for micro service deployment should still be deployed as just that but following strict guidelines to ensure correct network architecture and to lower unwanted and costly traffic. Monoliths should still exist but with inspiration taken from the distributed and modulate model. Keep the monolith intact and optimized but, less monolithic in size. Let more monoliths comingle and together form an optimized whole. An then let these monolithic ecosystems combine with microservices to form a colonial system. All working on their own but tougher for the greater good of all.
If we then combine it with a proper use of hybrid and multi cloud architecture, we can have the foundation for something more than the petty chiefdoms that currently are fighting.
It all comes down to choosing the right tool at the right time and to keep looking at the end result as a guiding principle. Architecture should not be about technics, it has always been about results, and how we use the tools in our disposal to make something greater than the sum of their parts.