Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

API gateway in front of application load balancer?

I need to design a web app and need me suggestion on infra part. I have decided to use application load balancer, but not sure should I have an API gateway as the entry point to the app or the application load balancer will be used as the entry point?

Also, I'm not sure if the entry point is an application load balancer as it is in private vpc how can I connect the clients of the app in public internet to it?

Please throw some light on the advantages and necessity of using API gateway in front of application load balancer if so.

like image 662
iAviator Avatar asked Oct 17 '18 12:10

iAviator


1 Answers

I need to design a web app and need me suggestion on infra part. I have decided to use application load balancer, but not sure should I have an API gateway as the entry point to the app or the application load balancer will be used as the entry point?

If you just need to route incoming requests to your backend based on path ALB will be sufficient for you. ALB is cheaper than APIGateway in general. If you need some of the service features ( authentication , throttling , caching etc..) you need to support it your backend if you dont use ApiGateway.

Also, I'm not sure if the entry point is an application load balancer as it is in private vpc how can I connect the clients of the app in public internet to it?

Do you mean your backend service hosts are running in private VPC ? If that is the case ALB can not directly forward requests to hosts inside private VPC. You can choose to either 1) Front your hosts with Apigateway 2) Have a set of proxy servers fronted by ALB which will forward requests to NLB inside private VPC. Your actual service hosts will be behind NLB.

like image 195
Vishal Avatar answered Oct 20 '22 12:10

Vishal