ECS Fargate + Service Discovery + ALB
A customer wants to use ECS Fargate to run tasks with AWS Service Discovery front-ended by an ALB (to manage scaling and TLS). In testing, Service Discovery bypasses the ALB and just sends requests to the tasks.
Is the Service Discovery -> ALB pattern just not supported? They're trying to avoid deploying something else to manage (Consul for example).
Service Discovery is an alternative to ALB, and makes use of Route 53 hosted zones. As new tasks are started, they are automatically registered into the Route 53 hosted zone under the 'friendly' service name, and other services can then use this name when contacting their dependencies.
ALB can be used either simple to balance incoming traffic from customers to your first tier of services, or as an alternative to Service Discovery by providing your applications with a DNS endpoint to use when they need to contact their dependencies.
Relevant questions
Scaling ECS Fargate - graceful session draining
Accepted Answerasked a year agoHow to register IP address for ECS task at startup so that other resources can find it
Accepted Answerasked 2 years agoMaxInstanceLifetime value for ECS Fargate
Accepted Answerasked 3 months agoShared account App Mesh and Cloudmap - What's the service discovery behaviour?
Accepted Answerasked 2 years agoFailed to expose AWS ECS Fargate Service via ALB
asked 14 days agoWhy do deployments with CodeDeploy to ECS (fargate) without tasks succeed?
asked 14 days agoecs service was unable to place a task because your account is currently blocked
asked a month agoECS Fargate + Service Discovery + ALB
Accepted Answerasked 4 years agoUse AWS FARGATE_SPOT as fallback
Accepted Answerasked 2 years agoAre there any best practices for sending logs from ECS on EC2, ECS on Fargate and other AWS services such as API GW, load balancers (and more AWS services) to Splunk?
asked 2 months ago