Application Load Balancer loosing requests

0

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

  • Hi.

    1. Will it succeed if I access the ALB directly without going through the CDN?
    2. Are you using SSL communication between the CDN-ALB-ECS?
    3. What are the CloudFront cache policy and origin request policy set?
1 Answer
0

Hello Ivasa, thank you for your attention!

Answering your questions:

  1. 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.
  2. 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.
  3. 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.
answered 2 years ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions