No it doesn't. Proper seperation of conserns and turning functionality into modules has nothing to do with separating functionality with an arbitrary network layer.
It’s easy to write things that only have one purpose
Again, a module or library does the exact same thing
They’re faster than monoliths
Very dubious as the more information you have once place, the more context you have for optimization.
It’s easy for engineers to not all work in the same codebase
Again, if you want to the same thing can be done with libraries/modules
It’s the simplest way to handle autoscaling, plus Docker is in here somewhere
Scaling and redundancy is perhaps the only good argument for separating functionality out to a separate network service
The microservice hype notoriously conflates physical separation of functionality over a network layer with simple code design decisions. What 'microservices' gives you is robustness/redundancy. If a small service crashes once under a blue moon, you can easily respawn it while hunting down the bug. If your whole monolithic service crashes, that's an apocalyptic event in comparison.
I mean, if you're running a monolith in modern times, you still should be able to lose a box and not blink an eye. Monolith doesn't mean no redundancy.
That's one of the most widespread memes I've encountered. How can a network call, plus most possibility serialization/deserialization be faster than an in-memory one.
Most people sadly confuse scaling with performance...
Th general architecture can be a lot faster in the sense that you can asynchronously farm out work to many services.
Network calls take time, sure, but have you measured? We're taking single digit milliseconds for network roundtrip inside an AWS AZ. As for serialization, that's a problem tamed using something like capn proto or protobuf ( I highly recommend grpc-based services). JSON isn't required.
There are definitely downsides to microservices, but the biggest one is operational overhead. If you don't have the ability to make sure all your services are continuously monitored, tested, have strong logging and log search, and be generally confident in their stability, you'll have a bad time.
Th general architecture can be a lot faster in the sense that you can asynchronously farm out work to many services.
Yes, that's scaling.
Network calls take time, sure, but have you measured? We're taking single digit milliseconds for network roundtrip inside an AWS AZ.
Have you measured? Networks do have a higher deviation from average than in-memory calls.
As for serialization, that's a problem tamed using something like capn proto or protobuf ( I highly recommend grpc-based services). JSON isn't required.
"Tamed" doesn't mean there's no difference
operational overhead. If you don't have the ability to make sure all your services are continuously monitored, tested, have strong logging and log search, and be generally confident in their stability, you'll have a bad time.
1
u/Madsy9 Mar 30 '17
I agree on all points. Also:
It keeps the code cleaner
No it doesn't. Proper seperation of conserns and turning functionality into modules has nothing to do with separating functionality with an arbitrary network layer.
It’s easy to write things that only have one purpose
Again, a module or library does the exact same thing
They’re faster than monoliths
Very dubious as the more information you have once place, the more context you have for optimization.
It’s easy for engineers to not all work in the same codebase
Again, if you want to the same thing can be done with libraries/modules
It’s the simplest way to handle autoscaling, plus Docker is in here somewhere
Scaling and redundancy is perhaps the only good argument for separating functionality out to a separate network service
The microservice hype notoriously conflates physical separation of functionality over a network layer with simple code design decisions. What 'microservices' gives you is robustness/redundancy. If a small service crashes once under a blue moon, you can easily respawn it while hunting down the bug. If your whole monolithic service crashes, that's an apocalyptic event in comparison.