ALB causing an additional +150ms latency

0

Hi AWS community šŸ‘‹

I've set up an Application Load Balancer - ECS stack and noticed the ALB is causing latency issues. Direct requests to the Fargate instance have a latency of ~15ms consistently, but requests to the ALB's DNS or public IP have a latency of ~170ms.

Strangely, measuring the latency with Desktop Safari and all the mobile browsers gives ~15ms, but not with Desktop Chrome, curl or postman (all ~170ms).

Another odd behavior I have observed is that the ALB exhibits a warm-up effect, where the latency even increases to over 2s after some idle time and converges to 170ms after 1~3 requests, but there is no such behavior with the Fargate instance.

Can you help me identify the cause of the latency issue and suggest potential solutions?

Edit: It appears that ALB may not be the cause of the issue, as the ALB log shows that request_processing_time, target_processing_time and response_processing_time are all less than 1ms. What could be the source of the problem? I have no idea. ĀÆ\(Ā°_o)/ĀÆ

Chrome (to ALB) >> Chrome

Chrome (to Fargate) >> Chrome

Safari >> Safari

Curl >> Curl

1 Answer
0

The ALB is slower that NLB, because the check's of ALB in OSI layer 7. Example: https://blog.cloudcraft.co/alb-vs-nlb-which-aws-load-balancer-fits-your-needs/

profile picture
answered a year ago
  • Nlb can help

  • Hi! I've tried NLB, but the results are almost identical. As I said, when I make a request using Desktop Safari, it's super fast. Additionally, when making a request using mobile browsers, including Safari, Chrome, and Firefox, it's also super fast. The problem only occurs when using Desktop Chrome, Firefox, and with tools such as curl or wget. So, I suspect a network problem, but I'm not sure what the variables are.

  • If problem is not in ALB, maybe disable cache can help. Your print Chrome (to ALB), have a DNS Lookup can affect your performance.

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