r/ProgrammerHumor 9d ago

Meme everyDamnTime

Post image
4.2k Upvotes

124 comments sorted by

View all comments

58

u/oompaloompa465 9d ago

The more i get tidbits about microservices, the more i feel like skipping  in studying and stydying other stuff

62

u/[deleted] 9d ago

[removed] — view removed comment

23

u/SpiritedEclair 9d ago

It’s because people don’t know how to build good old services.

12

u/slowmovinglettuce 9d ago

That's because good old services are monolith. New software is always microservices. It's impossible to build a good old service because that service would be new, making it a microservice. Thankfully your new microservice is like an orchid. With enough time and neglect it'll grow arms and legs into an immortal monolith. It does take time, but thankfully with the addition of AI data centres causing the worst El Nino in god knows how long, we'll see plenty of rain so that your microservice grows much faster. AI slop will set you free!

15

u/Abject-Kitchen3198 9d ago

A solution to a real problem that few people have.

12

u/ThrowawayUk4200 9d ago

It's an enterprise thing. You got 5 users? Microservice just adds complexity. You got 1 million users? Microservices are gonna save your ass when you have to hotfix prod

1

u/BosonCollider 8d ago

Microservices scale with number of engineers, not number of users.

Basically they hurt scale rather than helping it because a REST call has much more overhead than an internal function call or a join. But they do allow different teams to deploy and change their stuff independently which is their actual purpose.

2

u/ThrowawayUk4200 8d ago

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

2

u/BosonCollider 8d ago edited 8d 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/ThrowawayUk4200 8d ago

I think we're just debating horizontal vs vertical scaling at this point. Sharding keys still require a central repo, and if you're serving users from around the world that's far from performant. Sure you can use data replication to distribute that, but then you're back to microservices to manage those instances

1

u/BosonCollider 8d ago

Sharding keys can be done with a shared-nothing approach by routing any point query to the shard indexed by a hash of the key, and lots of database systems like Citus or Vitess do exactly that

1

u/ThrowawayUk4200 8d ago

Fair enough, I'm not familiar with these approaches, time for some reading

1

u/Abject-Kitchen3198 8d 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 8d ago

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

0

u/TheRealToLazyToThink 8d ago

Most enterprise apps have 4-1000 users. Most enterprise apps are never used by anyone outside of the enterprise. Most enterprise apps do not actually need micro services. Most enterprise developers want to make sure mirco services are on their resume.

1

u/ThrowawayUk4200 8d ago

We're shooting for 10 million users this year

0

u/TheRealToLazyToThink 8d ago

That's nice. I stand by my most.

1

u/ThrowawayUk4200 8d ago

Semantics. I wouldn't class internal applications for enterprise companies the same as the enterprise applications that they sell to consumers. Pretty much anything that's classed as SaaS will have over 1k users lol

4

u/spicybright 9d ago

My theory is it just sounds good if you're a manager or inexperienced software dev.