Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Has anyone got an opinion on what makes a service mesh better than using a message broker for most distributed systems? Is it performance? Is it that http has become the lowest common denominator and people just don't want to use any other communication protocol?


If you see an airplane that flies you might conclude airplanes are a good transportation pattern. But if you see there's a boat, that promises to fly, and you see that people taped a lot of helicopters onto it to make it fly, then probably you would conclude that boats are bad at flying.

Message Brokers are the airplanes. Even if you can't understand how they work you will see that many companies use them who really rely on distributed systems working, eg telephone companies, banks, trading companies.

Service Meshes try to solve a problem that K8s was meant to solve in the first place. So K8s is the boat and Service Mesh is the attached helicopter. By itself it might be a good idea to use it, but the way things are taped together right now it's just an anti-pattern.

If you don't have a pointy-haired boss forcing you to use it, then it's probably better to avoid the whole thing.

I'd rather see how far the development around k8s-less pods with podman will go and take care of the distributed architecture of my systems myself.


These layers of abstraction are nice but they seem to ignore the fact you still have to manage the systems underneath and the networking around it.

At some point folks need to realize they arent google and they really dont need to abstract the development layer because they dont have a team of google SRE to manage what their pods / containers / mesh runs on


This is a strange answer. A message broker is not in the same category as Istio. Istio is for effecting policy changes (regarding security, traffic routing, monitoring, etc) without updating your code. Which is especially useful if your code is a bunch of diverse microservices.

Message brokers are... not that.

These are apples and elephants you're comparing.


Kubernetes is a platform, it lets you do whatever the f you want to. Service meshes are one thing to build on top of the platform.


You can do what you want even without k8s.

The reason to use a tool is to make a task simpler or take a task out of your hands in most cases but the rare edge case. For instance grep makes it easier to go to a file to find a certain line.

If you need to know networking, storage, microservice architecture yourself you don't need any tools.

In k8s you need to know all this, and on top you need to know k8s to achieve the same thing. And then you either need to write k8s plugins or also additionally know all the k8s plugins and wether any of them will actually solve the problem you have.


this isn't a good analogy. message brokers by design are asynchronous and dont have a typical request/response flow of http.


Message brokers only work for "fire-and-forget" kind of async operations. As in, when you make a request you are not waiting for a response.

I don't think it is service mesh OR brokers. Both cater to different use cases.



While its certainly possible to use in this mode from what I've experienced most people who deploy applications at scale use an async message bus/queue rather than a request/response. At that point is there even much of a benefit vs. simply using a synchronous request/response oriented service?


I may be off but asynchronously queuing two messages and implementing a synchronous block in business logic does not sound the same to me as a TCP request response cycle.


TCP doesn't have a request/response cycle - its a stream of bytes between applications


Correct but TCP provides a reliable data stream between two hosts, the (particular) messaging protocol over it wasn't part of what I was trying to point out.


This is true but I would think that if you had to pick one then it is much easier to make a message broker do reliable request-reply/pull than service mesh do reliable events/push.



Good article, thanks:

"A protocol is the rules and expectations of participants in a system, and how they are beholden to each other. A protocol defines who takes responsibility for failure.

The problem with message brokers, and queues, is that no-one does.

Using a message broker is not the end of the world, nor a sign of poor engineering. Using a message broker is a tradeoff. Use them freely knowing they work well on the edges of your system as buffers. Use them wisely knowing that the buck has to stop somewhere else. Use them cheekily to get something working.

I say don’t rely on a message broker, but I can’t point to easy off-the-shelf answers. HTTP and DNS are remarkable protocols, but I still have no good answers for service discovery."

I would not disagree with any of this but I don't know enough about service meshes to know if they mean that you don't need a protocol (meaning the edges still need to deal with failures after the mesh or broker has retried etc).

One thing a broker gives you is that if the problem is that the other service is busy or down then it will eventually get the message. So it avoids one specific kind of failure in the case where eventual consistency is acceptable.


My take. Might be clueless though, but in my experience:

The protocol has less to do with it, see grpc for example.

Having run an operationally critical microservice infrastructure with consul for service discovery I realized that a mesh makes sense.

When you start hitting a few hundreds of services you’ll want:

1. The observability. Scenario: Why is the application slow? The application depends on two different services each with individual sets of downstream dependencies.

2. Making the services discovery process more resilient. An outage of consul without other means of discovery sucks!

Message brokering as well as event sourcing seems to this layman like awesome patterns where eventual consistency is perfectly ok.

In most scenarios it probably is, but for some it is not.

Whatever works!


I don't really see how the service mesh solves eventual consistency. You might call a service which handles all the tasks asynchronously similarly to a message in a message broker system.

Service discovery is also inherent in the routing rules itself when you use something like AMQP for example.

Observability might be something that the broker system lacks of I agree.


Oh no, it doesn’t and it wasn’t what I wanted to imply.

But you might have scenarios where you want or require synchronous or continous direct service to service communication is what I meant.


It's only better when you have a MASSIVE system and the chances of the message broker infrastructure not being capable enough is a problem.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: