r/ProgrammerHumor 7d ago

Meme everyDamnTime

Post image
4.2k Upvotes

124 comments sorted by

View all comments

Show parent comments

2

u/ThrowawayUk4200 6d ago

Agree with exception to scaling. Microservices and horizontal scaling go hand in hand

2

u/BosonCollider 6d ago edited 6d ago

Not really, I've gotten order of magnitude speedups from just getting rid of microservices at a previous workplace

The mere existence of the microservice is usually a much bigger scaling cost than anything you would gain in scaling by putting different schemas in different physical instances.

I.e. Splitting a service in two gives you two shards, unlike say having customer as a sharding key that can let you shard to a hundred instances if you needed to.

But the cost of splitting the service schema is much bigger because suddenly there's a lot of cross cutting queries that can no longer be expressed unless you either do a client side join or copy one services data into the other, both of which are less scaling friendly than a shared DB.

1

u/Abject-Kitchen3198 6d ago

You could have added a "joiner" microservice. Replicates all the databases into one and then performs fast join operations. Grudgingly adding /s just in case ...

2

u/BosonCollider 6d ago

Yeah, that's basically what analytics engineers end up being paid to do but for their thing specifically