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

3개 답변
0
수락된 답변

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.

simon
답변함 2년 전
profile picture
전문가
검토됨 15일 전
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!

AWS
지원 엔지니어
Tim_P
답변함 2년 전
  • Yes, I have reached out to support already.

0

I've found this re:invent 2020 slide which says the traffic gets routed to available services in a round-robin pattern, hope that will be helpful. https://d1.awsstatic.com/events/reinvent/2020/Amazon_API_Gateway_HTTP_APIs_beyond_the_proxy_SVS401.pdf#page=23

답변함 일 년 전

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠