Load-Balancing Node.js in Production
System processes, Systemd, PM2, Nginx, Docker...? How should you run Node.js in production? Here's a performance guide to minimize downtime.
There are many ways to run Node.js applications. Some of them good, some not so much. This talk will walk you through three optimal configurations for production-ready Node.js applications.
The first is by using the built-in cluster
module to create worker processes and distribute traffic between the forks. A similar approach can be used with Nginx acting as a load balancer, distributing traffic to multiple Node.js instances. The last configuration is by using Docker and orchestrating containers with Kubernetes to handle load balancing.
Each approach will showcase how to load-balance traffic and make the most of your server's performance. The goal of this talk is to explain the benefits of each setup and the overhead that follows. I want to show what you can use, and why, so you can choose the configuration that fits your use-case.
Saturday, 2019-10-12 @ 17:25
>
Skill level: intermediate
>
Duration: 25 min
Adnan Rahic
A bit of this, a bit of that, JavaScript developer at heart. Adnan Rahić is a startup founder, author, and teacher with a passion for DevOps and Serverless. As of late focusing on observability, product growth and developer advocacy at Sematext.
He teaches courses and workshops on topics such as JavaScript and DevOps, but is also an active speaker, host, and organizer at Meetups. An online course he authored called "Serverless JavaScript by Example" was published by PacktPub.
Apart from talking at events and teaching in person, Adnan also writes programming tutorials and articles for some of the largest tech publications on Medium, including freeCodeCamp and Hackernoon.