Live data from Hacker News

The Service Mesh: What Engineers Need to Know

servicemesh.io

11–20 of 66 posts

Re: The Service Mesh: What Engineers Need to Know

#11
post #6
post #5

As someone who's familiar with the API gateway pattern, is it fair to say this is just another API gateway for internal services? Seems like it is but its also described in an extremely convoluted way with 'control planes' and such.

Not really. API gateways are typically single-point-deployment proxies, designed to create a coherent public interface out of a disparate group of services. An API gateway change is almost always going to be a PR for the application team. Service meshes are proxies deployed alongside all the services, and used as much by devops (and potentially security) as by the application developers.

So a goal of the service mesh is to keep it an api agnostic appliance. I'm not sure that concept requires all this nomenclature.

It seems like a very thin API Gateway that forwards calls directly to the microservice API without enforcing much would be much easier to manage and have all the same benefits.

Whats the purpose of deploying the reverse proxy alongside the microservice?

Re: The Service Mesh: What Engineers Need to Know

#12
post #5

As someone who's familiar with the API gateway pattern, is it fair to say this is just another API gateway for internal services? Seems like it is but its also described in an extremely convoluted way with 'control planes' and such.

The service mesh is a bit different from an API gateway -- in it's current most popular implementations (linkerd[0] & Istio[1]), there are basically small programs that run next to each individual instance of the programs you want to run. Linkerd has been around for a while and IMO there weren't that many companies that were at a scale where they needed it (I didn't see it deployed that often), but it's basically tha…

Hmm, is the assumption that, because you're deploying an instance of the mesh as close to the application as possible, you don't need robust logic between the application and the service mesh? I can buy that I suppose.

Re: The Service Mesh: What Engineers Need to Know

#13

I'm evaluating using AWS App Mesh at the moment. We're a really small team so we're choosing Fargate vs Kubernetes- mainly because we don't have need of nodes nor want to deal with them. The appeal of App Mesh for us was initially around using it to facilitate canary deployments. AWS Code Deploy does a nice job with Blue / Green deployments and that may suffice for us, but it doesn't support canary for Fargate. Is th…

> The appeal of App Mesh for us was initially around using it to facilitate canary deployments. AWS Code Deploy does a nice job with Blue / Green deployments and that may suffice for us, but it doesn't support canary for Fargate. Is that enough reason to add the additional complexity in our stack? Not sure, looking for input.

Maybe you should write a script for this? It sounds like you're about to take on a lot of complexity for just the ability to do canary deployments when you could probably hack up a script in a day or two.

> We want to implement OIDC on the edge for some services, but App Mesh doesn't support that yet as other meshes like Ambassador, Gloo, and Istio seem to. Since App Mesh doesn't really act as a front-proxy on AWS, we'll still be using ALB to handle auth which is fine, I think. I get mixed messages about the need for JWT validation, but if so, that would need to be implemented in the app level with ALB fronting it.

JWTs are only required for client-side identity tokens (you can use opaque ids and other kinds of stuff for backends) -- it seems like you're also at the same time looking for something to take authentication off your hands? App Mesh doesn't do that AFAIK, it's only the serviceservice communication that it's trying to solve.

I think it might be a good idea to make a concise need of what you're trying to accomplish here, it seems kind of over the place. From what I can tell it's:

- Ability to do Canary deployments

- The ability to shape traffic to services (?)

- Observability, with access logging

- AuthN via OIDC at the edge

A lot of meshes do the above list of things, but the question of whether it's worth adopting one just to get the pieces you don't have already (which is only #2 really, assuming you scripted up #1), is a harder question.

Re: The Service Mesh: What Engineers Need to Know

#14
post #5

As someone who's familiar with the API gateway pattern, is it fair to say this is just another API gateway for internal services? Seems like it is but its also described in an extremely convoluted way with 'control planes' and such.

Service Mesh really is about connectivity among all the service you are deploying in your architecture. Some of these services are going to be databases, some of them will be APIs, some of them will be caches and so on.

Once you have this underlying grid of services all connecting via a service mesh - in a reliable, secure and observable way - for some of these services you want to define governance and on-boarding rules, or you want to expose them externally as products that developer can consume and you then use an API GW to do those things.

In this regards, an API GW is just a service among the services you are running inside the service mesh.

Re: The Service Mesh: What Engineers Need to Know

#15
post #12

Earlier quoted context omitted.

The service mesh is a bit different from an API gateway -- in it's current most popular implementations (linkerd[0] & Istio[1]), there are basically small programs that run next to each individual instance of the programs you want to run. Linkerd has been around for a while and IMO there weren't that many companies that were at a scale where they needed it (I didn't see it deployed that often), but it's basically tha…

Hmm, is the assumption that, because you're deploying an instance of the mesh as close to the application as possible, you don't need robust logic between the application and the service mesh? I can buy that I suppose.

Yes kind of -- except not in between the application and the service mesh, it's between application and application.

Imagine that for every application there is one small binary that runs and serves all it's traffic, like a chauffeur. Your application stops talking to the outside world completely and sends all messages to the small chauffeur binary -- which then talks to other chauffeurs, over the network.

Keeping with the chauffeur analogy, there is a "head office" which calls the chauffeurs on CB radio at regular intervals that lets them know which cars go where and how to start them/etc.

"head office" => "control plane"

"chauffeur" => "side-car proxy"/"data plane"

In the end what this means for your application is that you just make calls to external services (whether your own or others) and since all your communication goes through this other binary, you get monitoring, traffic shaping, enhanced security, and robustness for free.

Another interesting feature is that if the side-car proxy can actually understand your traffic, it can do even more advanced things. For example you can prevent `DELETE`s from being sent to Postgres instances at the network level.

Re: The Service Mesh: What Engineers Need to Know

#16
I'm going to sound like an old man but...

What amuses me about this is back in the day everyone thought the Mach guys were crazy for thinking things like network routing and IPC services be implemented in user space... and others mocked the OSI model's 7 layers as overly complex (e.g. RFC3439's "layering considered harmful").

Now we've moved all our network services onto a layer 7 protocol (HTTP), and we've discovered we need to reinvent layers we skipped over on top of it. We're doing it all in user space with comparatively new and untested application logic, somehow forgetting that this can be done far more efficiently and scalably with established and far more sophisticated networking tools... if only we'd give up on this silly notion that everything must go over HTTP.

Re: The Service Mesh: What Engineers Need to Know

#17
It’s a pity “fat clients” are dismissed so quickly. I think that when your tech stack is uniform enough to use them, they can provide much more that service meshes, and do it faster as well. After all, why does “service is down” and “service is sending nonsense” have to be handled via completely different paths?

Re: The Service Mesh: What Engineers Need to Know

#18
post #11
post #6

Earlier quoted context omitted.

Not really. API gateways are typically single-point-deployment proxies, designed to create a coherent public interface out of a disparate group of services. An API gateway change is almost always going to be a PR for the application team. Service meshes are proxies deployed alongside all the services, and used as much by devops (and potentially security) as by the application developers.

So a goal of the service mesh is to keep it an api agnostic appliance. I'm not sure that concept requires all this nomenclature. It seems like a very thin API Gateway that forwards calls directly to the microservice API without enforcing much would be much easier to manage and have all the same benefits. Whats the purpose of deploying the reverse proxy alongside the microservice?

Yeah, you haven't grokked the concept yet.

The idea behind a service mesh is that no matter how you design and implement a microservice architecture, you still have all these little services talking to each other somehow. By "default", they're communicating using native sockets and HTTP or gRPC.

There's lots that can go wrong any time you have a bunch of things talking to each other on a network (see Tanenbaum's "Critique of RPCs" for a classic explanation).

If everything was written in the same language, what you'd probably do is come up with a common networking/RPC library for all your services to use. That library would give you a common interface, so everything used the network the same way, and some measure of observability (maybe just by doing a standard log format), and maybe some security controls like a standard HTTPS connection and a standard token format.

But if you've got multiple languages, that option isn't very attractive anymore, because even if it's feasible to build that library once for each platform, now you're keeping an additional component (the library) in sync between the platforms, and that's a drag.

The insight behind a service mesh is that containers make it cheap and easy to just stack a tiny out-of-process proxy alongside your services. So you can just move all the logic you would have had in that common service library into the proxy. The proxy will give you the same features no matter whether your service is a Rust binary, Clojure running on the JVM, or a shell script.

And, because it's an out-of-process standalone component, it can be built and maintained by a third party, which means the features it provides can be a lot more ambitious than you'd build in your own library. So now instead of just hoping to get some TLS and maybe a standard token, everything can be mTLS with client certificates, a standard dashboard for managing certificates, rule systems for what client certs will allow you to talk to which systems, graphical maps of who's communicating with who and trace collection for specific pairs of services, etc.

This is all very un- like what an API gateway does, and the whole concept sort of revolves around having little reverse proxies running alongside the services.

Re: The Service Mesh: What Engineers Need to Know

#19
post #16

I'm going to sound like an old man but... What amuses me about this is back in the day everyone thought the Mach guys were crazy for thinking things like network routing and IPC services be implemented in user space... and others mocked the OSI model's 7 layers as overly complex (e.g. RFC3439's "layering considered harmful"). Now we've moved all our network services onto a layer 7 protocol (HTTP), and we've discovere…

You aren't wrong about the trend of solving the same problems over and over at higher points in the stack. But you missed the mark on responding to this article and the Service Mesh pattern, which usually operates at a lower network layer. In fact, if anything, the trend in microservices architecture is away from HTTP and back towards binary protocols over TCP (but, in this case, proxied via authenticated mTLS connections managed by an external service, but which also operate over TCP).

Re: The Service Mesh: What Engineers Need to Know

#20
post #5

As someone who's familiar with the API gateway pattern, is it fair to say this is just another API gateway for internal services? Seems like it is but its also described in an extremely convoluted way with 'control planes' and such.

These get mixed up a lot but wrongly, I think. They can be related, but not necessarily. API Gateway pattern is at the application layer, and builds on top of the Service Mesh, which is at the transport layer. Think of API Gateway as HTTP and Service Mesh as TCP/IP. Just with more flexible hooks for authentication, observability, and reliability.
Post reply on HN