Live data from Hacker News

Microservices are hard

code-held.com

291–300 of 356 posts

Re: Microservices are hard

#291
post #216

Earlier quoted context omitted.

An important part of programming as a discipline is coming up with things that work regardless of context.

Could you give some non trivial examples of architectures or techniques in software engineering that work regardless of the context?

Binary search works on git commits and on shelves with differently sized T-shirts equally well.

Re: Microservices are hard

#292
post #244
post #208

Earlier quoted context omitted.

TBH, his definition of "module" brings it awfully close to microservice.

I thought he was referring to typical in-process encapsulation. If you do that well, you can run those separately “for free” optionally, but I think his definition of module is nothing unique.

From the article: "Modules which can be easily be deployed independently - when the need arises."

I read this to mean that they would always be deployed independently, but now I think I misread it.

He actually meant that they should be really easy to split. In practice, I think people with this view underestimate the difficulty in splitting even seemingly unrelated services from a monolith. Its never completely trivial.

Its better not to start that way if it is foreseeable as an undesirable end state.

Re: Microservices are hard

#293
post #36

Earlier quoted context omitted.

What the author or many people miss is that this is still an unsolved problem. We still don’t know how to do this right. Doing it either way results in unmanageable complexity. The same still goes for the front-end. It’s too complex that someone decides to start another JS framework to fix the status quo. What many people miss is that these attempts are the solution to the problem. People will keep trying different w…

We are closer than that. Services are just aggregation layers for functions. The functions are the things of interest, and the aggregation/abstraction is meaningless from a runtime perspective. By creating a function-first architecture (ala Lambda) using a runtime with a common compilation target (e.g. WASM), you can have a single code-base with hints/IDE navigation while also allowing for polyglot execution.

I think many (including me) would still consider an application written in Lambda functions a monolith.

It's how databases are used etc. that matters for service boundaries.

There really isn't that much difference between a stateless monolith deployed in k8s, a Lambda function, and a microservices with one function in each service ... it's all just stateless code anyway.

Re: Microservices are hard

#294
post #68

Don’t you find it weird that everybody else is either over or underengineering, but you , you engineer things exactly the right amount? I bet when you’re driving, you also tend to notice that everyone else is either an idiot driving way too slow in the middle lane or a maniac speeding past you. Nobody else drives as well as you do. It must be exhausting for these people to live in a world surrounded by strawmen, whil…

Don't you find it strange that YOU live in a world where everyone else but YOU thinks that everyone else around them is over engineering or under engineering things? You're not the guy who thinks everyone else is a maniac and is driving too fast or too slow. You're the guy who thinks everyone but you is under this delusion of thinking that everyone else is a maniac and you think you are an exception to the delusion b…

> The tragedy of the design of computer programs is that we have no theory of efficiency, no theory of what is most optimal

Yeah, that's just fundamental law we have to accept. I believe the reason we don't have a theory of efficiency is not because it's hard to measure. Efficiency is inherently a human concept, not a mathematical one. We will simply never agree on it's definition, so we'll never have a theory.

The good thing, however, is while we can't agree on how to measure efficiency, we can agree how to measure the outcomes of it. Efficiency leads to success, and our definitions of success are way more aligned (and more mathematical).

If we accept that theory is impossible, empirical evidence is as good as it gets.

For example, I'm not a fan of Ruby, but it contributes (or at least used to) to more than 50% of YC startups value, while not being a very popular language overall. Whether I personally like it or not, this is hard evidence that there's something about Ruby that correlates with success. Something I probably don't understand. Something even Ruby developers probably don't understand. Unless I have a plausible theory explaining why there's absolutely no causation, it's undeniably there.

Of course, we don't have empirical evidence on bleeding edge tech. And that's why "choose boring technology" is a thing.

Re: Microservices are hard

#295
post #158

I really do not understand the debate on monoliths and microservice anymore. Context matters so much. Should you have absolutely everything in 1 system. No. And I think no one thinks that anymore. Should you spilt your system into as many pieces as possible? No, of course not. You are prop. storing files one place and have a data in a database another place. And most likely none are on the webserver receiving request…

When discussing turning our monolith into microservices at a previous job: My Boss: "I'm convinced this is the right architecture." Also my boss: "Now how do we break this app up?" He was certain we needed to shatter our monolith into lots of little pieces, but had no clear vision as to what those pieces would be. From my point of view, the "architecture" he was certain of wasn't an architecture at all. It was just a…

Sounds like an org chart problem.

The first piece to focus on is the piece that your team is responsible for.

Less of a shattering of the monolith and more of a spore ejection.

Re: Microservices are hard

#296

Microservices - let’s replace as many interfaces as possible with the slowest, flakiest, most complex mechanism - the network layer. Why call a function when you can wrap that function in an entire application and call it via API? Why have a single database when we can silo our data across 200 mini databases? Why have a single repo when we can have 200 tiny repos?

The move to microservices is often more about scaling change management when an organization grows from tens to hundreds of engineers. Change management becomes the bottleneck when organizations exceed Dunbar's Number, and a "reverse Conway maneuver" is needed to counter excessive cost of coordination. https://cloud.google.com/architecture/devops/devops-tech-arc...

When going from tens to hundreds, do the hundreds manage to produce anywhere near a many-fold increase in performance though?

My impression is that microservices is a solution to keep a hundred people HAPPY (solving auxiliary problems you create for yourself) while producing about the output for the company that the "tens" would provide.

If management INSISTS on scaling from tens to hundreds, you can't very well keep the tens occupied on irrelevant side project. So instead you can do microservices. Either way you get the speed for the company of "tens" though.

Re: Microservices are hard

#297
post #220

Earlier quoted context omitted.

An important part of programming as a discipline is coming up with things that work regardless of context.

This sounds interesting, how do you mean? To me it seems like context is perhaps the key element that we should concern ourselves with to further the engineering or scientific aspect of programming. Let's say we're deciding between floating point arithmetics, fixed decimal numbers, or rational numbers. All three of which are very well-established and useful solutions to the problem of subdividing integers. We have so…

Before context, we would need to know the problem we're trying to solve. All three are equally good if there are no requirements.

Re: Microservices are hard

#298

Start with a monolith, that will take you VERY far. When the organization gets big enough (AND ONLY THEN), add an additional domain oriented service. FULLY implement deployment and infra. Only once you do that can you think about adding another (using the pattern you just built out). Micro-monoliths. Organizations explode the number of services, half ass the infrastructure (the hard part of microservices), and then c…

My org did this, and it ended in disaster because that monolith was shoving everything in the world into a single database the whole time. This created horrible APIs: one team writing into tables that another team is expected to read. They tried to split this later on and created an even bigger mess. There are reasonable places before then to stop and say, we need to keep X new features in a separate service.

That’s still not a microservices vs monolith problem. That’s a bad data stewardship problem.

If your data is a mess before you decided to break out functionality, then it’s gonna be hard regardless. You should have good schemas and db organization always.

Re: Microservices are hard

#299

Earlier quoted context omitted.

Monoliths can also scale horizontally and be restarted automatically when they fail. No need for microservices for that.

> Monoliths can also scale horizontally At a (potentially much) bigger cost.

You mean the few extra megabytes of RAM for some extra compiled code on each node?

If you refer to databases: Splitting one service into two services can at most give you a 2x scale-up potential (usually a lot less), and the effect diminishes for 3th, 4th service. Mathematically and logically. Splitting services = vertical scaling.

If you want 100x, 1000x scaling you need to invest in true horizontal scaling anyway, and that works pretty much the same way for monoliths as microservices.

Re: Microservices are hard

#300

Having run k8s and _classical_ microservices before, I am now in a much happier place just using the AWS serverless suite (lambda, API GW, CF, SNS, SQS, eventbridge, dynamodb, etc). Is my setup "microservices"? Well, maybe, depending on your definition, but, in truth I don't really care - it works pretty well. We also do "DDD" with it and have multiple AWS accounts with these marking the domain borders. Comms between…

We were really happy with Google App Engine for the same reason. It's a product that feels like it was "10 years too early".

Like you I feel the whole microservice debate turns into a "depending on definition" kind of thing and feels odd. Write stateless code that can infinitely scale -- is it 1 or 100 services? Just depends on the perspective really...

Post reply on HN