4 ms·
If you’re replacing nanosecond function calls with microservices, you’re doing it wrong. It’s a specious argument. In the domains in which I’ve worked, most se
by doctor_eval 3y ago
If you’re replacing nanosecond function calls with microservices, you’re doing it wrong. It’s a specious argument.
In the domains in which I’ve worked, most services receive calls over the network, and go on to make database calls that also go over the network. So whether you do the routing inside or outside a monolith makes almost no difference to latency. And what’s more, with a front end like GraphQL, you can parallelise the work which reduces latency further.
Microservices have a lot of benefits relative to monoliths, but they aren’t a panacea any more than monoliths are. They’re a useful architecture for certain workloads and a poor fit for certain others.
But in my experience it’s quite a lot more difficult to maintain discipline over the long term with monolithic architectures, and that’s why I tend to prefer microservices attached to messaging architectures like NATS. YMMV, and that’s fine.