0

I have setup an ALB Ingress that points to single Nodeport service. Everything works fine and traffic is routed from the ALB to my backend service as expected.

But sometimes I see Http 504 Gateway timeout error, I validated the cloud watch metrics and no latencies are observed. So it seems that backend instances or services may have closed the connection before the default idle time out (60s) of the ALB

Now my backend is a Spring Boot API deployed in EKS as a nodeport service. Can you please suggest if changing the "server.connection-timeout" to 75s is going to help?

dvlpr
  • 311
  • 3
  • 17

1 Answers1

0

According to the ELB documentation on 504s, yes increasing the app's timeout greater than the ALB's timeout is recommended.

[+] https://aws.amazon.com/premiumsupport/knowledge-center/eks-http-504-errors/

This post is suggesting ditching the ALB all together.

[+] AWS/EKS: Getting frequent 504 gateway timeout errors from ALB

As a matter of fact, I dealing with random 504s for my ALB ingress as well. Certainly not an issue I have had with NLBs. However, the additional functionality (WAF) provided by the ALB is very much driving me to get the ALB setup to work. In my case, everything was smooth sailing for weeks then out of the blue 504s. Good luck! I'll post back here if I find a silver bullet.

EDIT: turned out I was actually dealing with connection timeout more than 504s. The issue was rooted in the ALB subnets being misconfigured. Ultimately caused from my subnets not being tagged appropriately. Once I switch the subnets I was using for my public facing ALB to the public subnets, things were back to being a-ok.

rsmets
  • 789
  • 1
  • 13
  • 23