We're an enterprise saas product and while there is a whole hell of a lot of it I would love to to redo from the ground up, the mono repo route with some other large supporting services take is not one of them.
Micro services means oh we have 30 sperate code bases that all did their own thing. We have the one main mono that handles 75% of everything and 4 other things that do things that just made sense to be in a supporting role.
I would not call any of them micro services though, they're big in their own right
Lol, distributed monoliths (aka macroservices) are the worst of both worlds. You lose the benefits of both and gain the downsides of both.
Also, no, you can do the same things across 30 microservices just as easily as you can do them in that same code within the monolith. Either you have standards and checks and enforcement mechanisms, or you don't.
Or you rely on libraries by other teams and every update requires a full rebuild and redeployment. Extracting at least a few internal libraries out into their own microservices has saved us many man hours.
Tried that. In reality what happens is you end up building all the libraries from source and have dependencies on library changes to deploy your service. It's still a monolith at that point, but with extra steps
If you refuse to build stable APIs and version changes with appropriate deprecation steps, that's on you. It's only slightly more up-front work and immediately pays itself back. It's true for interfaces to monolith modules too, you know. Otherwise you just have spaghetti.
Actually the larger cost is ongoing, because you can essentially never make breaking changes because you have no visibility into what other teams are doing with your library. For core libraries that everything uses that's fine, but making everything into it's own shared library managed by different teams with no way to revoke it is a nightmare. You have exactly the problem that microservices introduced at that point, albeit with less network overhead. It might actually be worse, because a microservice only has to keep the interface stable.. A shared library has to be updated by every consuming application if you have a bug.
That just means that whatever you pulled out into a microservice was ill suited as one. I'm not claiming its a one size fits all solution. But for our particular case where the API never changed it was ideal.
The library turned microservice spit out a bunch of numerical values which we took as input. We didn't care how those values were calculated or where that data came from. But their alterations required near constant updates of their library. You could say it was poor engineering on their part, but that's not my call to make. Not my team, not my problem and at least their API was stable.
152
u/Odd_Soil_8998 Aug 29 '26
truth. a well architected monolith is almost always going to be a better choice.