Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Ingress controller vs api gateway

I would like to know what is/are differences between an api gateway and Ingress controller. People tend to use these terms interchangeably due to similar functionality they offer. When I say, 'Ingress controller'; don't confuse it with Ingress objects provided by kubernetes. Also, it would be nice if you can explain the scenario where one will be more useful than other.

Is api gateway a generic term used for traffic routers in cloud-native world and 'Ingress controller' is implementation of api-gateway in kubernetes world?

like image 812
Prateek Jain Avatar asked Nov 27 '19 13:11

Prateek Jain


People also ask

Is ingress controller an API gateway?

It's not. Rather, “API gateway” describes a set of use cases that can be implemented via different types of proxies – most commonly an ADC or load balancer and reverse proxy, and increasingly an Ingress controller or service mesh.

Is Kubernetes Ingress a gateway?

Gloo is a Kubernetes Ingress that is also an API gateway. It is capable of providing rate limiting, circuit breaking, retries, caching, external authentication and authorisation, transformation, service-mesh integration and security.

What is difference between ingress and ingress controller?

The Ingress itself has no power. It is a configuration request for the ingress controller that allows the user to define how external clients are routed to a cluster's internal Services. The ingress controller hears this request and adjusts its configuration to do what the user asks.

Is API gateway needed for Kubernetes?

A team with real-time streaming requirements may expose their microservice over WebSocket APIs. Any API gateway deployed within Kubernetes must support all of these protocols.


2 Answers

Ingress controller allows single ip-port to access all services running in k8s through ingress rules. The ingress controller service is set to load balancer so it is accessible from public internet.

An api gateway is used for application routing, rate limiting, security, request and response handling and other application related tasks. Say, you have a microservice based application in which the request needs an information to be collected from multiple micro services. You need a way to distribute the user requests to different services and gather the responses from all micro services and prepare the final response to be sent to the user. API Gateway is the one which does this kind of work for you.

like image 101
P Ekambaram Avatar answered Nov 16 '22 03:11

P Ekambaram


Indeed both have a set of features that intersect, path mapping, path conversion, load balancing, etc.

However, they do differ. I may be wrong, but you create an Ingress 1) to run it in Kubernetes 2) to be more of like a reverse proxy "kubernetes native".

API Gateway could be installed anywhere (although there are now many that run in Kubernetes natively like Ambassador, Gloo, Kong), and they do have more functionality available like developer portal, rate limiting, etc.

Personally I use an ingress as a reverse proxy for a website. And API Gateway for APIs. This does not mean you can't use ingress for apis. However, you are not taking full advantage of them.

like image 20
Kat Lim Ruiz Avatar answered Nov 16 '22 01:11

Kat Lim Ruiz