Home > Software design >  Can an API Gateway point to multiple Application Load Balancers?
Can an API Gateway point to multiple Application Load Balancers?

Time:03-12

Having a hard time figuring out a microservices architecture.

Right now I have an ECS Cluster with two services (TodoService, CategoriesService) running in containers. Both of the services have their own Load Balancer. I'm trying to build an API Gateway where /todos would route to the Todo-app-load-balancer and /categories would route to the Categories-app-load-balancer.

First, is this a good approach to microservices? And second, question from the title.

CodePudding user response:

First, is this a good approach to microservices?

Yes, there is nothing wrong with this approach.

Can an API Gateway point to multiple Application Load Balancers?

Yes, you can point each method from the API gateway to an entirely different backend resource.

In case of an Application Load Balancer, there are multiple ways of doing this. Probably the easiest is to have a public Application Load Balancer and to create HTTP integration for it. You have to specify the DNS name for the application load balancer as the endpoint. For more information, see this enter image description here

Other option would be to use enter image description here

Direct integration is not allowed on ALB, but you can use the DNS name manually.

enter image description here

  • Related