How do you ensure high availability of a Node.js application?

Instruction: Discuss strategies to ensure a Node.js application remains available and performant under high load.

Context: This question evaluates the candidate's understanding of scalability and availability concepts, and their ability to apply them in Node.js applications.

Updated

Official answer available

Read the opening below, then unlock the full answer and practical guidance.

Define an availability objective for important user operations and identify which dependencies can prevent them from succeeding. High availability requires surviving relevant failures; high throughput alone is not sufficient.

Run redundant application instances behind a load balancer with meaningful readiness and liveness behavior. Spread them across the failure domains required by the objective. Multiple workers on one host can survive some process failures but not loss of that host...

Related Questions