Load Balancing & Failover Across Nodes
Distribute work evenly across Erlang nodes and keep services available through automatic failover in a distributed cluster.
Why Load Balancing?
In a cluster, spreading work across nodes prevents any one node from becoming a bottleneck and lets you scale by adding machines. Failover keeps the system available when a node dies.
Listing Cluster Nodes
A node sees its connected peers with nodes/0. This list is the pool you balance work over.
nodes().
% => ['worker1@host', 'worker2@host']All lessons in this course
- Handling Network Partitions
- Distributed Data with ETS & Mnesia
- Scalability & Resilience Design
- Load Balancing & Failover Across Nodes