Ambassador Labs

Code, ship, and run apps for Kubernetes faster and easier than ever — powered by Ambassador’s…

Follow publication

API Gateway vs Service Mesh

People ask a common question “should I use Ambassador Edge Stack API Gateway if I’m using a service mesh (usually Istio)?” After all, both Ambassador and Istio are built on the Envoy Proxy. Moreover, Istio recently added support for explicitly managing ingress with the Gateway abstraction. So, do you need an API Gateway if you’re using a service mesh?

Ambassador (and API Gateways in general) focus on north/south traffic, i.e., traffic into your data center. Istio (and other service meshes) handle east/west traffic, i.e., traffic between services in your data center. If your service mesh already manages L7 traffic, can you use it for managing north/south traffic?

TL; DR

Our current perspective on service mesh and API Gateways is:

At the edge, you don’t control the client

The fundamental difference between edge routing (north/south) and internal (east/west) routing is that with the edge, you don’t control the client. In the east/west scenario, you do have control of the client and therefore are able to make simplifying assumptions around your deployment architecture.

At the edge, though, you can’t explicitly control the client. The client can make requests with arbitrary formats and types, and you need to handle all of these permutations. Some examples of edge-related issues we’ve had to support in Ambassador include:

Will API Gateways and service meshes converge?

When we started the Ambassador project, service meshes were in their infancy (in fact, Istio had not yet been announced). We thought that, over time, service mesh functionality would subsume API Gateway functionality. After all, a service mesh provides rich controls and observability over Layer 7. We expose many of those same controls in Ambassador, with integrated monitoring, canary releases, shadow traffic, and distributed tracing.

A year later, we’re not sure that convergence is inevitable. At the very least, if it happens, it’s a long way off. Thousands of Ambassador users have given us feedback on the different ways they’re deploying Ambassador at the edge. For us, we seem to learn about more edge-specific use cases every week.

API Gateway and service mesh integration

Service meshes do address use cases that API Gateways don’t cover. Particularly as more services are added to your application, observability, control over L7, and resilience become more critical. Ensuring that an API Gateway can integrate with popular service meshes is an area that we continue to invest in. Thanks to our community, we’ve successfully integrated Ambassador’s distributed tracing and monitoring with Istio. We also have users who have integrated Ambassador with Istio’s mTLS to gain end-to-end encryption throughout the cluster.

Final thoughts

Building a general purpose control plane that manages north/south as well as east/west traffic is a huge task. Moreover, how do you build a control plane that works for developers and operators? With Ambassador, we’re focusing on the edge use case, and discovering hidden complexity with just this use case. We’re as curious as anyone else to see how control planes evolve over the next few years. Stay tuned!

Learn more about Ambassador Labs or join the Ambassador Slack channel to discuss these concepts with the community!

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

Published in Ambassador Labs

Code, ship, and run apps for Kubernetes faster and easier than ever — powered by Ambassador’s industry-leading developer experience.

Written by Richard Li

CEO, Amorphous Data. Formerly: Ambassador Labs, Duo Security, Rapid7, Red Hat.

Responses (3)

Write a response

Thank you very much Richard, for this brilliant narrative.
Do you have a frefreshed perspective written somewhere?
Thanks a ton.

Very simple and sleek service for Kubernetes. Thanks for providing the software. I’m amazed at the support the team provides as well.