When a new node connects do I have to change my code and run some of my processes to the new node?

Hi,

When a new node connects, do I have to change my code and run some of my processes to the new node?

Or the schedulers of the nodes “talk to” each other and deside where to give cpu cycles.

Is there a way to write your code, so when you add new nodes (to have more cpu power) you will not have to change your code?

Thanks for your time.

You do need to implement your own load balancer to distribute calculations between nodes in a cluster. One simple way to achieve this would be through using pg. Worker processes start in your nodes, join specific process groups, and client can implement load balancing strategy by fetching processes of a group and sending requests to the selected process.

1 Like