Live data from Hacker News

You want microservices, but do you need them?

docker.com

121–130 of 151 posts

Re: You want microservices, but do you need them?

#121

I'm helping a company get out of legacy hell right now. And instead of saying we need microservices, let's start with just a service oriented architecture. That would be a huge step forward. Most companies should be perfectly fine with a service oriented architecture. When you need microservices, you have made it. That's a sign of a very high level of activity from your users, it's a sign that your product has been s…

What characteristics define "legacy hell"? I'm curious, and the specific list of problems and pain points (if--big if!--everyone there agrees what they are) can help more clearly guide the decisions as to what the next architecture should look like--SoA, monolithic, and so on.

Try 20+ year of git history. (yes they migrated to git from svn).

The biggest obstacle is changing people's mindsets from legacy programming to modern DevOps workflow. Making them believe it's worth the effort.

Re: You want microservices, but do you need them?

#122

While not a complete rebuttal, allow me the following. I manage a team of 4 scrum masters each with 5-6 engineers. We provide services via a user interface we'll call the console, as would be fairly familiar to any B2B or B2C service provider. The backends of this portal are split up by functional area, so we have a compute management service providing CRUD apis for dealing with our compute offerings, a storage servi…

> we have 4 teams frequently working on the same code and needing to rebase and pull in change, rather than driving simple atomic changes.

You have to pull in changes either way. Either there are contract changes between teams or there aren't. If there aren't, you don't need to rebase just do squash and merge. If there are, then you're going to either find out about the changes now or you're going to find out about them in production when your container starts throwing errors.

Re: You want microservices, but do you need them?

#123
I’m always shocked when engineers smitten with the microservices bug try to insist that converting a simple, reliable, in-process function call to a network hop plus serialization plus retry and back off and circuit breaker logic is going to be faster. I’m sure that there are situations where microservices are appropriate, but I’ve never seen one. Mostly I see engineers playing in a sandbox of complexity and then shipping buggy code late. It reminds me of Billy Bean’s question in the movie Money Ball: "If he's a good hitter, why doesn't he hit good?"

Re: You want microservices, but do you need them?

#125
I am a big fan of 'do one thing and one thing well' -- that UNIX philosophy.

Whether it's a program that does something well... or simply a function/procedure --- it all depends on the problem I/we are trying to solve.

I never liked using the word "Microservices" but my aim has always to build SIMPLE solutions. I learn new words in this world. For the most part I am building "Miniservices" but there are a few that are considered "Microservices" but again are not complicated!

I just like to refer it as "Distributed Computing" because the solution can be anywhere between Monolithic or Microservices. Truth is you are building a combination of them that communicate in one form or another.

I will always remember a Till system (past job) that was sending data to the server poorly and slowly with a Monolithic solution and a Database. Was it becoming a pain to handle with new shops being added in Europe? Yes. However, this is NOT the fault of Monolithic. It's just the solution that was used for "good" originally but is struggling now.

The solution I replaced it with allowed data being sent to the server using ZeroMQ. It worked out well.. was fast and reliable. Each section was broken down on the server. Again - is it is perfect solution or does it prove that "Monolithic is worse that Micrsoservices" (or Distributed Computing) -- NO! Truth is our software is a mix of them all!

Re: You want microservices, but do you need them?

#126
post #84

It is not so black and white. The BEAM ecosystem (Erlang, Elixir, Gleam, etc) can do distributed microservices within a monolith. A single monolith can be deployed in different ways to handle different scalability requirements. For example, a distinct set of pods responding to endpoints for reports, another set for just websocket connections, and the remaining ones for the rest of the endpoints. Those can be independ…

> The BEAM ecosystem (Erlang, Elixir, Gleam, etc) can do distributed microservices within a monolith. This ain't new. Any language supporting loading modules can give you the organization benefit of microservices (if you consider it a benefit that is - very few orgs actually benefit from the separation) while operating like a monolith. Java could do it 20+ years ago, just upload your .WAR files to an application serv…

What BEAM offers isn’t modularity, but concurrency. Every genserver is operating concurrently, all within the runtime. Up until actor models came to Java, and more recent Java with lightweight threads, Java was incapable of this. Java is still missing things that BEAM and OTP provides.

Besides: Erlang predates Java.

Re: You want microservices, but do you need them?

#127

Earlier quoted context omitted.

Erlang seems like a joy to use. I feel a slight pang of regret that I haven't (yet) gotten to use it in my career. (I don't quite have the time or energy to play with it during my off hours, but it is on my list for someday.)

This is kind of why I've never bothered to look at it - everyone /says/ it's a wonderful thing, but... nobody uses it in production, or hobbies (apart from the diehard fans) It might see the light of day at some point in the future, but if the past is anything to go by...

I have worked in production Elixir. (Learning platform supporting realtime student-teacher classroom experience).

Whatsapp is implemented with Erlang.

It is a more robust platform for agentic AI, and I’d certainly start with a BEAM language for agentic AI.

Re: You want microservices, but do you need them?

#128
post #87
post #84

It is not so black and white. The BEAM ecosystem (Erlang, Elixir, Gleam, etc) can do distributed microservices within a monolith. A single monolith can be deployed in different ways to handle different scalability requirements. For example, a distinct set of pods responding to endpoints for reports, another set for just websocket connections, and the remaining ones for the rest of the endpoints. Those can be independ…

Yup, good point on the BEAM. The joke we used when microservices were hot was that the BEAM is already ahead with nano-services: a gen_server is a nice lightweight, isolated process. You can define a callback API wrapper for it and deploy millions of them on a cluster.

Yeah, the isolation provides a fault tolerance not seen in wide use until Kubernetes.

Although it would be neat to implement some of the benefits of a service mesh for BEAM — for example, consistently applying network retry/circuit breaker policies, or dynamically scalable genservers.

Re: You want microservices, but do you need them?

#129

Earlier quoted context omitted.

The definitional size I've read and heard is that you team could (with the benefit of hindsight) be able to reimplement a microservice in 2 weeks. That sounds fairly extreme but a month seems within reason to me. The other key difference between microservices and other architectures is that each microservice should do its primary function (temporarily) without hard dependencies, which basically means having a copy of…

That's a pretty extreme definition in my opinion. Google played a role in popularizing the microservice approach. When I was at Google, a microservice would often be worked on with teams of 10-30 people and take a few years to implement. A small team of 4-5 people could get a service started, but it would often take additional headcount to productionize the service and go to market. I have a feeling people overestima…

Kubernetes is a good example of a microservice architecture. It was designed in a way where each microservice work with other microservices in a way where the dependencies are not so coupled together.

For example, the API server only reads and writes resources to etcd. A separate microservice called the scheduler does the actual assignment of pods to nodes by watching for changes in the resource store against available nodes. And yet a different microservice that lives on each node accepts the assignment and boots up (or shuts down) pods assigned to its node. It is called the kublet. The API server does none of that.

You can run the kublet all on its own, or even replace it to change part of the architecture. Someone was building a kublet that uses systemd instead of docker, and Fly.io (who seems to hate kubernetes) wrote a kublet that could stand things up using their edge infrastructure.

The API server also does some validations, but it also allows for other microservices to insert itself into the validation chain through pod admission webhooks.

Other examples: deployment controllers, replicaset controllers, horizontal pod autoscalers, and cluster autoscalers to work independently of each other yet coordinated together to respond to changing circumstances. Operators are microservices that manage a specific application component, such as redis, rabbitmq, Postgresql, tailscale, etc.

One of the big benefits of this is that Kubernetes become very extensible. Third-party vendors can write custom microservices to work with their platform (for example, storage interfaces for GCP, AWS, Azure, or Ceph, etc). An organization implementing Kubernetes can tailor it to fit their needs, whether it is something minimal or something operating in highly regulated markets.

Ironically, Kubernetes is typically seen and understood by many to be a monolith. Kubernetes, and the domain it was designed to solve is complex, but incorrectly understanding Kubernetes as a monolith creates a lot of confusion for people working with it.

Re: You want microservices, but do you need them?

#130

I am a big fan of 'do one thing and one thing well' -- that UNIX philosophy. Whether it's a program that does something well... or simply a function/procedure --- it all depends on the problem I/we are trying to solve. I never liked using the word "Microservices" but my aim has always to build SIMPLE solutions. I learn new words in this world. For the most part I am building "Miniservices" but there are a few that ar…

I personally think ZeroMQ is severely underutilized. Fixes so many problems.

But it can be hard to encourage adoption. It’s not HTTP, or a conventional queue system.

Requires lots of explanations, thinking, and eventually meetings.

Post reply on HN