Node.js · Middle · Question 59 of 75

What should a Node.js server do when it receives SIGTERM?

Explanation

Orchestrators like Kubernetes send SIGTERM before killing a pod. server.close() stops new connections; add a timeout in case something hangs.

Further reading

Problem with a question

Node.js · Middle · question 59

Test yourself

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

Take this quiz