Enable horizontal scaling graphql-server on machine using pm2 process manager in cluster mode.
The updated script to start graphql-server will only start a single node cluster. Once the graphql-server is running we can manage the cluster with pm2:
Its important to note that the processor send status updates to the graphql-server. As more instances are added, these udpates are balanced across the cluster, so they will appear less frequent from the point of view of applications that are subscribing through the graphql-server to these updates.
Enable horizontal scaling graphql-server on machine using pm2 process manager in cluster mode.
The updated script to start graphql-server will only start a single node cluster. Once the graphql-server is running we can manage the cluster with pm2:
Get status:
Add one more instance to the cluster
Monitor the cluster:
Its important to note that the processor send status updates to the graphql-server. As more instances are added, these udpates are balanced across the cluster, so they will appear less frequent from the point of view of applications that are subscribing through the graphql-server to these updates.