this post was submitted on 12 Sep 2023
116 points (96.0% liked)

Programming

17443 readers
311 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] lysdexic@programming.dev 6 points 1 year ago (1 children)

Microservices are great if you have enough traffic that you can get an efficiency gain by independently scaling all those services. But if you aren’t deploying onto thousands of servers just to handle traffic volume, you probably don’t need 'em.

I don't think that's a valid take. Microservices have nothing to do with scaling or performance, at least for 99% of the cases out there. Microservices are a project- and team-management strategy. It's a way to peel out specific areas of responsibility from a large project, put together a team that is dedicated to that specific area of responsibility, and allow it to fully own and be accountable for the whole development life cycle, specially operations.

Being able to horizontally scale a service is far lower in the priority queue, and is only required once you exhaust the ability to scale vertically.

[–] lemmyvore@feddit.nl 2 points 1 year ago (1 children)

Microservices have nothing to do with scaling or performance,

Microservices are not just about scaling and performance but it is a core advantage. To say they have "nothing" to do with it is outright false.

Scalability isn't something you pull out of the pocket when you need it, you must incorporate scalability by design in everything you do. (Same as with security, and testability, etc.)

Microservices are about modular design and decoupling units of code from each other. Having a bunch of pieces of code run together on a monolithic group of resources that you choose to scale vertically becomes a choice not the be-all-end-all way of doing things.

Being able to horizontally scale a service is far lower in the priority queue, and is only required once you exhaust the ability to scale vertically.

The problem with this approach is that switching from vertical to horizontal is extremely hard if you didn't plan for it from the start. Thinking in monolithics is a very hard habit to break and it's good odds that any platform that is steeped in verticality will be permeated by it at all levels. You can't just come in and switch, you typically end up having to uproot and redesign a lot of things from scratch, which in most cases ends up as a non-starter from a cost perspective.

[–] lysdexic@programming.dev 1 points 1 year ago

Microservices are not just about scaling and performance but it is a core advantage. To say they have “nothing” to do with it is outright false.

They have nothing to do with performance. You can improve performance with vertical scaling, which nowadays has a very high ceiling.

It's not a coincidence that startups are advised against going with microservices until they grow considerably. The growth is organizational, and not traffic.

Microservices are about modular design and decoupling units of code from each other.

Yes, but you're failing to understand that the bottleneck that's fixed by peeling off microservices is the human one faced by project managers. In fact, being forced to pay the microservices tax can and often does add performance penalties.

The problem with this approach is that switching from vertical to horizontal is extremely hard if you didn’t plan for it from the start.

I think you're missing the point that more often than not ain't going to need it.

In the rare cases you do, microservices is not a magic wand that fixes problems. The system requires far more architectural changes that go well beyond getting a process to run somewhere else.