Is running Fargate and API Gateway without a load balancer in the production environment a bad idea?

0

I'm looking at a few articles where the author describes how to route traffic from an AWS API Gateway to Fargate tasks without any load balancing.

The solution appear to rely on AWS Service Discovery which, from what I can tell, creates private DNS records.

If my ECS services starts 3 Fargate tasks, is API Gateway smart enough to spread the traffic across all the 3 tasks or not?

  • Hi, I'm thinking about the same choice - leave ALB between API Gateway and ECS Fargate tasks, or try AWS Service Discovery. I'm curious if you have some insights here.

2 個答案
0

No, AWS API Gateway does not automatically spread traffic across multiple Fargate tasks. It only routes traffic to one target. To distribute traffic across multiple tasks, you need to use a load balancer, such as an Application Load Balancer or a Network Load Balancer, in front of the tasks.

profile picture
已回答 1 年前
0

Running Fargate and API Gateway without a load balancer in a production environment can have potential drawbacks and risks. Without a load balancer, your service may not have automatic failover, scaling, or management of incoming traffic. It can also increase the risk of downtime and decreased performance during traffic spikes. It is recommended to use a load balancer in a production environment to ensure high availability, scalability, and to offload the management of incoming traffic.

profile picture
已回答 1 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南