# Socket.io Cluster with Nginx as Reverse Proxy

> Using Node.js cluster module with websockets and nginx as a reverse proxy.

- Canonical URL: https://webofmike.com/socket-io-cluster-with-nginx/
- Author: Mike Moore (https://webofmike.com/about/)
- Published: 2015-01-08
- Last modified: 2026-10-28
- Tags: Code, Tutorials
- Cite as: Mike Moore, "Socket.io Cluster with Nginx as Reverse Proxy", Web of Mike (webofmike.com), 2015-01-08. https://webofmike.com/socket-io-cluster-with-nginx/


Node.js by default runs on a single process and at max utilizes one CPU. To take the full advantage of a multi core system, multiple node processes can be run with a frontend proxy interfacing with the client.

This article discusses using Node.js's cluster module with websockets and nginx as a reverse proxy to achieve better performance and scalability for real-time applications.

The nginx side of a more ordinary stack is in [Setting Up a Web Server](/wordpress-optimization-setting-web-server/). A shorter package list is in [Deploying WordPress over nginx and PHP-FPM](/deploying-wordpress-over-nginx-and-php-fpm/).

**Read next.**

[Setting up a web server](/wordpress-optimization-setting-web-server/). If the problem is spam referrers rather than sockets, [redirecting bad referers with Varnish](/redirecting-bad-referers-with-varnish/).

