Depending on your organization scale of course, but for many smaller shops, there is a significant performance overhead of going over the network.
Ie a Single binary running Rust/Go/Java/NodeJs vs distributed Microservices applications.
Depending on your organization scale of course, but for many smaller shops, there is a significant performance overhead of going over the network.
Ie a Single binary running Rust/Go/Java/NodeJs vs distributed Microservices applications.
I've consistently heard good things about Erlang/OTP.
If you have a monolith, you have less control over the service’s shape—the CPU, RAM, IO footprints. If you break it up into smaller microservices, the footprints are smaller and you have more options for how you schedule them.
There is a tradeoff here—services that are too small have high overhead. Services that are too large are inefficiently scheduled. Services that are way too large force you to spend money buying the massive machines needed to run them.
A monolith easily achieves 10x throughput of what microservices will do on the same hardware. Which is why people build monoliths, they can be extremely efficient. Microservices are usually about trading resource efficiency for organizational convenience.
> A monolith easily achieves 10x throughput of what microservices will do on the same hardware.
If we’re gonna talk about unwarranted assumptions, this one takes the cake.
I’ve seen services spun up where the resources to run them simply didn’t exist in our data centers. As monoliths, their throughput was effectively zero. The cost tradeoff was “buy bigger servers and wait until they arrive” versus “spend engineering resources and stop buying bigger servers.” Again—this is going to depend on the particulars. The better answer is not necessarily obvious.
Similarly, you could do TDD on a high percentage of the code by using injection, then automatically rewrite the code into static methods, as Atwood was saying they needed for performance, if that’s what would help.
Code generation, etc. got a bad name over the years as people tended to use it to balloon the eventual source, like that of many autogenerated config files today, but it can be used to do almost anything.
You don't end up with lots of network calls for one use case and still have good maintainability.
Microservices can be advantageous but I don't think I've ever cited speed, unless I was talking about deployments and build times (which are definitely part of the conversation since architecture affects the entire SDLC). Usually my strongest points about microservices are about maintainability from the team perspective, reliability (if done right), and earlier parts of the SDLC like testing and build times. The cons are that you are usually having to maintain (and test against) very strong external contracts, inner-service knowledge is strong due to a smaller codebase but often times developers have very little intra-service knowledge (they don't understand the big picture, which is important), and many times codesharing is tricky or just not possible.
Let me guess. Vertically, bigger computer, horizontally, more computers?
These cloud business speaks is getting to my head.
But these terms are way older than any cloud-computing and go back many many years.
It’s one of the big reasons why horizontally architected applications have thrived in the cloud era.
What makes you think that they don't already realise this? What suggests to you that web developers work on webapps for performance reasons, rather than familiarity with the technology or ease of development (or cross-platform support, or lack of user barriers, etc)?
When you get to a global, millions-of-requests-per-second system like e.g. Twitter, you've gone well beyond vertical scaling.
Know your problem, then pick a solution. I'll admit that the microservices architecture is overused and I'm sure that's what you're aiming at, and I fully agree with that. But I also feel like you cannot understand the scale of true 'web scale' companies and their application. I know I can't.
Replication is the same as usual; have another machine setup to replicate onto. The restriction is you can't fan out hundreds of application servers and half a dozen database servers if you need that - but I don't need to.
I haven't done this with clients but I'm doing it with my own (cost-sensitive) side projects and appreciate removing the internal network latency.
Rather than
web + local db <-----> rds
you end up with web + local db <-\
|--> rds
web + local db <-/
At which point the two masters plus a RDS slave is something I don't know if it's feasible.https://colin-scott.github.io/personal_website/research/inte...
It can be faster to read over the network than to read from a hard drive.
But none of this applies to your run of the mill REST web service.
Good developers choose the architecture that works best for what they're building.
A microservices approach does not mean that they should run on different hosts and an early design decision should be that the entire architecture can run on a single host and that the scale out is a feature of the system.
It's worrying that this assumption is often made because it does lead to the maintenance and velocity issues that teams encounter when naively adopting microservices.
The inherent cost of microservices is conceptual and organizational complexity, not runtime performance (though you can certainly build slow microservices, you can also build slow monoliths).