top | item 41756273

(no title)

guideamigo_com | 1 year ago

I never get this desire for micro services. You IDE can help if there are 500 functions, but nothing would help you if you have 500 micro services. Almost no one fully understands such a system. Is is hard to argue who parts of code are unused. And large scale refactoring is impossible.

The upside seems to be some mythical infinite scalability which will collapse under such positive feedback loops.

discuss

order

FooBarWidget|1 year ago

The point of microservices is not technical, it's so that the deployment- and repository ownership structure matches your organization structure, and that clear lines are drawn between responsibilities.

sim7c00|1 year ago

its also easier to find devs that have the skills to create and maintain thin services than a large complicated monolith, despite the difficulties found when having to debug a constellation of microservices during a crisis.

ton618|1 year ago

The reality is, the organizational structure likely to change over time, then would anyone want to mirror it in the repo structure?

atemerev|1 year ago

I prefer mid-scale services. For a given app, there shouldn’t be more than 20-30 of them (and preferably around 10). Each will still have clean ownership and single responsibility, but the chaotic quadratic network effect will hopefully not get out of control. Cleanly defined protocols become a necessity though.

hinkley|1 year ago

Except it never does. Have you ever heard of a company with a thousand teams?

Or for that matter, how many default alive companies have more teams than customers?

Joker_vD|1 year ago

But, uh, both Google and Yandex use monorepo-style of development; and microservices style of deployment, yes. Go figure.

delusional|1 year ago

I think the dream is that you can reason locally. I'm not convinced that it actually help any, but the dream is that having everything as services, complete with external boundaries and enforced constraints, you're able to more accurately reason about the orchestration of services. It's hard to reason about your order flow if half if it depends on some implicit procedure that's part of your shopping cart.

The business I'm part of isn't really after "scalable" technology, so that might color my opinion, but a lot of the arguments for microservices I hear from my colleagues are actually benefits of modular programs. Those two have just become synonyms in their minds.

klabb3|1 year ago

> […] the dream is that having everything as services, […], you're able to more accurately reason about the orchestration of services.

Well.. I mean that’s an entirely circular point. Maybe you mean something else? That you can individually deploy and roll back different functionality that belong to a team? There’s some appeal for operations yeah.

> but a lot of the arguments for microservices I hear from my colleagues are actually benefits of modular programs

Yes I mean from a development perspective a library call is far, far superior to an http call. It is much more performant and orders of magnitude easier to reason about since the caller and callee are running the same version of the code. That means that breaking changes is a refactor and single commit, whereas with a service boundary you need a whole migration.

You can’t avoid services altogether, like say external services like a payment portal by a completely different company. But to deliberately create more of these expensive boundaries for no reason, within the same small org or team, is madness, imo.

deterministic|1 year ago

You can absolutely reason locally with libraries. A library has an API that defines its boundary. And you can enforce that only the API can be called from the main application.

morningsam|1 year ago

>The upside seems to be some mythical infinite scalability which will collapse under such positive feedback loops.

Unless I misunderstand something here, they say pretty early in the article that they didn't have autoscaling configured for the service in question and there is no indication they scaled up the number of replicas manually after the downtime to account for the accumulated backlog of requests. So, in my mind, of course there can be no infinite, or really any, scalability if the service isn't allowed to scale...

vrosas|1 year ago

I’ve seen monumental engineering effort go into managing systems because for one reason or another people refused to use (or properly configure) autoscaling.

golergka|1 year ago

> You IDE can help if there are 500 functions, but nothing would help you if you have 500 micro services.

Using micro-services doesn't mean you're using individual repositories and projects for each one. The best approach I've seen is one repo, with inter-linked packages/assemblies (lingo can vary depending on the language).

deterministic|1 year ago

Agree 100%

A monolith with N libraries (instead of N microservices) work so much better in my experience. You avoid the networking overhead, and the complexity of reasoning about all the possible ways N microservices will behave when one or more microservices crash.

liampulles|1 year ago

What you are describing, where 1 function = 1 service, is serverless architectures. The "ideal" with any service (micro or macro) is to get it so that it maximises richness of functionality over scale of API.

But I agree one should do monolith by default.

dropofwill|1 year ago

The concepts here apply to any client-server networking setup. Monoliths could still have web clients, native apps, IOT sensors, third party APIs, databases, etc.

lmm|1 year ago

The real reason is that it's impossible to safely upgrade a dependency in Python. And by the time you realise this you're probably already committed to building your system in Python (for mostly good reasons). So the only way to get access to new functionality is to break off parts of your system into new deployables that can have new versions of your dependencies, and you keep doing this forever.

jeffbee|1 year ago

> but nothing would help you if you have 500 micro services.

Have you pondered the likelihood that your IDE sucks?

hinkley|1 year ago

Meanwhile if you use an Erlang language you can horizontally scale later.