Load-Balancing Node.js in Production
summary
Starts with running Node as a system process via systemd @ template so crashes auto-restart, then moves to the built-in cluster module built into Node to fork one worker per CPU core, showing CPU utilization evens out. Replacing cluster with use nginx as proxy and load balancer removes code changes and also serves static files. For large scale, Docker containers + Kubernetes deployments with replica counts and an ingress/load‑balancer work; verdict: cluster for small, nginx next, Kubernetes only for truly huge workloads.
AI-written summary · about
chapters (11)
- 0:00Introduction and goals
- 1:22Speaker background
- 3:20Agenda and story setup
- 4:42Deploying with systemd
- 7:29Scaling up Node.js
- 9:35Using the cluster module
- 11:52Nginx as a load balancer
- 13:43Scaling out with Kubernetes
- 15:54Kubernetes implementation
- 17:47Summary and verdict
- 20:11Q&A session
related talks
42mFrom Localhost to Production
21mScaling Node.js applications with Kubernetes and Docker
18mDeveloping a Custom Load Balancer to serve traffic at scale
28mScaling Node.js Applications with Kubernetes and Docker
33mNodeJS in a HighLoad Project
22mScaling Node.js and unblocking the Event Loop
40mGood, Bad, and Ugly - the Art of Load Balancing at Scale
24mWhy Node.js Needs an Application Server
