by dumpster_fire · 3y ago · 0 comments
The truth is somewhere in between where you have dependent services large enough to warrant being their own monolith being split off. Breaking up of a monolith is almost never (anecdotal observation after 15 years of seeing this argument surface in every company I've been in) a technical need, but a combination of organizational and business requirements. This is not to say it's never technical, just that it's rare for it to be a reason.
Organizational: The teams are so huge that they prefer their own development cycle, deployment, and rollout safeguards.
Business: Partitioning of products for different SLAs, which is difficult to guarantee when you have a different team introducing some bug every other week that takes down the servers.
Nah, they make a lot of sturdy, well structured rocky balls.
And let them move around a big mud soup that is outside of their sight. So they don't even see mud.
And definitely runs on the same underlying language/compiler/runtime version
Still, thanks to AWS it's vogue, expensive and probably keeps half of us employed when we have to untangle it all!
I’d actively encourage splitting a monolith into services when the candidate split would be:
1. A service that has a clear purpose that can be explained either separately from the monolithic whole or as a complementary piece
2. It will receive enough active development that the cost of upgrading/on-going investment is an acceptable percent of total work time
3. It can improve the organisations state of ‘ownership’ and better align the codebase with the team structure that own it
There is always a middle ground, and I should’ve done better to explain that.
We are essentially doing this right now, I personally don't think the teams are yet large enough to warrant this migration, but leadership says that we can't scale further before we have microservices. Imo most of the problems could be solved with increased testing and knowledge about the system. The tech also could definitely still scale with just by boosting the hardware and occasional performance passes on slow endpoints/queries.
These are depressingly common alarm bells.
There are companies with valuations over 12 figures which don't do microservices, so the scaling justification is dubious at best.
Scale what? Load (Seems not)
Scale the team? This is often an overlooked aspect of microservices you're able to isolate the domain knowledge to smaller services and hire more specialized engineers who can focus on a specific silo of the app and only have to work to discrete APIs.
Scale features? There's a legit argument to be made that if you see yourself going to a microservice architecture in the future based on your current codebase or product roadmap that doing it sooner then later is always going to be preferable. The bigger the monolith the harder it is to unwind. It could also be that there's some tech debt that's something of a limiting factor, making the change in architecture could be an opportunity to address some of that.
>separate databases
Isnt it like the basic thing?
Splitting each and every service with its own database, talking to other services to access their database by default is cargo-cult behavior. All it's going to do is make it hell for you to work on those services.
It will be a lot more technical reason from now on, when we begin to utilize more "AI" stuff, like language models.
all of those stuffs are slow to start, because they need time to load the huge model, so it is better to make a service that dedicated to the AI stuff, so the development of the business side do not get hold back by the slow restart cycle.
and AI is just an example, there is a lot of case when it more reasonable to split it to another service too, for example some CPU intensive tasks. Even Erlang/BEAM can't do anything about it if the code is writing in C/Zig/Rust and get called using NIF.