API Gateway and a Service Mesh working?together
Spring time in my backyard

API Gateway and a Service Mesh working?together

In a recent presentation about API Gateways, I got a question about service mesh and I did not understand the question or have a good answer. So here is an attempt to understand these concepts and see how they fit together in the context of a typical container based microservice deployment. At the end of the day it is about routing and shaping traffic.

API Gateways have been around for a while and are an essential component of the “Full Lifecycle API Management” products as Gartner puts it. In this full lifecycle, the API Gateway is typically a L7 reverse proxy and the HTTP protocol (with REST, GraphQL etc) being the most popular. This could be north-south or east-west communication. Most important capabilities include authentication, authorization, rate-limiting, throttling, quotas, request/response transformation, load balancing and observability. Some examples Kong, Apigee and Spring Cloud Gateway.

Service Mesh is a relatively new pattern to optimize L4 to L7 communication typically between microservices and deployed as a sidecar reverse proxy. Most important capabilities include discovery, mutual TLS (mTLS), rate-limiting, throttling, quotas, load balancing and observability. This generally implies east-west but could be north-south if the ingress happens to be in the same cluster. Note that mTLS requires all participants to have the same certificate authority. Istio and Linkerd are couple examples.

Clearly there is some overlap of capabilities and the title suggests they work together so where does each fit? Let us understand the flow of traffic for a HTTP request. Typically requests come into your app (one of the service mesh as shown below) via a CDN/Firewall/Load Balancer (not shown) and end up at an External API Gateway (ingress+API gateway or the new gateway-api ingress). This then routes it as configured. Further there maybe Internal API gateways between isolated applications. The overlap is therefore not in the same traffic path. Each component serves a different layer in the routing and has a specific purpose.

Service Mesh and API Gateway working together.

Finally, there is no free lunch so we must consider trade-offs. Every new component introduced adds complexity and new emergent failures to consider. A new component to understand and explain, implement, keep up with security patches, upgrade, collect logs from, monitor etc. As with any topic, the answer is always “it depends” on your use cases and requirements!

If these topics interest you then reach out to me and I will appreciate any feedback. If you would like to work on such problems, you will generally find open roles as well! Please refer to LinkedIn.

Originally published on Medium

要查看或添加评论,请登录

Rahul Agarwal的更多文章

  • Recommendation systems in Python

    Recommendation systems in Python

    As a machine learning learner one important topic to learn is producing recommendations. The Netflix prize is cited…

    1 条评论
  • Time series forecasting with Greykite

    Time series forecasting with Greykite

    I have been learning about time series and recently looked into Facebook Prophet and SARIMA. There is now a new…

  • Time series forecasting with Facebook Prophet

    Time series forecasting with Facebook Prophet

    If you are monitoring your web services with Wavefront, Prometheus, Grafana etc. then you are aware of time series.

    3 条评论
  • NLU classification and auto?ML

    NLU classification and auto?ML

    Getting started from an excellent intro from Charlie Flanagan and his Machine Learning for Business class here is some…

  • Understanding Microservice Failures

    Understanding Microservice Failures

    “Software does not fail” is a provocative statement and your initial reaction maybe to dismiss it. But if we look…

  • Opinionated Backend Cloud Service Delivery

    Opinionated Backend Cloud Service Delivery

    In this post I am expanding on an original question I asked recently where I am looking for an opinionated build/deploy…

    2 条评论
  • Ethereum and Gas

    Ethereum and Gas

    Getting into the world of Ethereum one of the learning curve has been about gas. Gas is essentially how you track and…

  • *Pay

    *Pay

    I have been involved in online payments for many years in large and small companies. As a backend services engineer it…

    2 条评论

社区洞察

其他会员也浏览了