By using AWS re:Post, you agree to the Terms of Use

HTTP API GW + API VPC Link + Cloudmap + Fargate - How does it load balance

0

I am using an infrastructure setup as described in the title. This setup is also somewhat shown in this picture: https://d2908q01vomqb2.cloudfront.net/1b6453892473a467d07372d45eb05abc2031647a/2021/02/04/5-CloudMap-example.png

In the official AWS blog here: https://aws.amazon.com/blogs/compute/configuring-private-integrations-with-amazon-api-gateway-http-apis/ the following is stated about using such setup:

As AWS Cloud Map provides client-side service discovery, you can replace the load balancer with a service registry. Now, connections are routed directly to backend resources, instead of being proxied. This involves fewer components, making deployments safer and with less management, and reducing complexity.

My question is simple: What load balancing algorithm does HTTP API GW use when distributing traffic to resources (the Fargate tasks) registered in a service registry? Is it round-robin just as it is with ALB?

Only thing I was able to find is this:

For integrations with AWS Cloud Map, API Gateway uses DiscoverInstances to identify resources. You can use query parameters to target specific resources. The registered resources' attributes must include IP addresses and ports. API Gateway distributes requests across healthy resources that are returned from DiscoverInstances.

https://docs.aws.amazon.com/apigateway/latest/developerguide/http-api-develop-integrations-private.html#http-api-develop-integrations-private-Cloud-Map

2 Answers
0
Accepted Answer

Ok, So I got official answer from Support team:

For HTTP API -> CloudMap integration, API Gateway service calls "DiscoverInstances" API call. This call returns healthy instances. API Gateway then selects any one of the instances randomly to route the actual request to.


Hence we can understand that traffic distribution differs in HTTP API -> CloudMap integration from that of HTTP API -> Application Load Balancer. Because ALB uses round robin to distribute the traffic, where in the traffic is distributed randomly in case of integration with CloudMap.

answered 7 months ago
0

Hello,

Tim here with the Premium Support Team and I’ve been reading through your notes and checked out the blog post you linked.

If you can could you open a AWS support case with us to further explore this topic? We’d like to understand the use case you have a bit more in depth and possibly gather some ARNs which you can privately share with us then.

Thanks!

SUPPORT ENGINEER
answered 7 months ago
  • Yes, I have reached out to support already.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions