Application Load Balancer loosing requests
My application allows uploading files with several simultaneous requests. Requests arrive at the CDN, go to the load balancer, and the load balancer passes them on to the API docker container, which is on the Elastic Container Service (ECS). Some requests complete successfully, others give 504 and 502 errors, intermittently.
When I change the CDN origin to go straight to the container, all requests work with fast response. So I think the problem is in the Application Load Balancer. I already increased the idle timeout in the ALB, but the problem remains the same. I also tried increasing the Origin Connection Timeout in CloudFront, but it didn't work either.
I have only 1 Docker container in the service.
Can someone help me on this issue? Best regards! Fernando
Hello Ivasa, thank you for your attention!
Answering your questions:
- Will it succeed if I access the ALB directly without going through the CDN? When I connect API URL directly to ALB, removing CDN from the context, I have the same problem.
- Are you using SSL communication between the CDN-ALB-ECS? I tried communication between CDN - ALB both ways: with and without SSL and the problem remains the same. ALB - ECS communication does not have SSL.
- What are the CloudFront cache policy and origin request policy set? When I remove the ALB from the schema, ie CDN - ECS, all requests are answered, without loss. So I don't think it's about Cloudfront configuration. Unfortunately I can't do without the ALB, as the direct CDN - ECS connection allows only 1 container per host.
Relevant questions
Unidirectional TCP keep-alive for Classic Load Balancer and Network Load Balancer
Accepted Answerasked 2 years agoAWS Load Balancer Controller deployment to force creation of application Load Balancer?
asked 19 days agoLoad balancer page in AWS console doesn't load
Accepted Answerasked 2 months agoCognito (with google) + Application Load Balancer = 414 Request-URI Too Large
asked 13 days agohow to create multiple ingress port on Amazon EKS using single Application Load Balancer
asked 2 months agoOptions for WAF with a Classic Load Balancer
asked 3 years agoApplication Load Balancer loosing requests
asked a month agoCognito with Load Balancer
asked 2 months agoLoad Balancer HTTP 413 Error
asked a month agoPrivate IP requirements in VPC for Application Load Balancer
Accepted Answerasked 2 years ago
Hi.