Clustering
Run multiple instances to distribute workloads
Cluster can be used to run multiple instances that can distribute workloads among their application threads. When process isolation is not needed, use Worker
instead, which allows running multiple application threads within a single instance.
Install the cluster module by:
Here's an example of serving a web server with 4 threads.
Last updated