Node.js · Senior · Question 17 of 75

Behind a load balancer (e.g., AWS ALB with a 60 s idle timeout), clients sometimes get 502 errors. What's a common cause?

Explanation

Set keepAliveTimeout above the balancer's idle timeout (and headersTimeout above that) so the balancer always closes idle connections first.

Further reading

Problem with a question

Node.js · Senior · question 17

Test yourself

Take the Node.js · Senior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz