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 Antworten
0
Akzeptierte Antwort

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
beantwortet vor 2 Jahren
profile picture
EXPERTE
überprüft vor 15 Tagen
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
SUPPORT-TECHNIKER
Tim_P
beantwortet vor 2 Jahren
  • 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

beantwortet vor einem Jahr

Du bist nicht angemeldet. Anmelden um eine Antwort zu veröffentlichen.

Eine gute Antwort beantwortet die Frage klar, gibt konstruktives Feedback und fördert die berufliche Weiterentwicklung des Fragenstellers.

Richtlinien für die Beantwortung von Fragen