Load Balancer Strategies
Source-Hash Strategy Details
Whereas Round Robin works for most use cases, Source-Hash is generally better for stateful applications. Source hashes ensure that the same client always goes to the same backend based on their IP address. This could be useful, for example, to create session stickyness.
However, it is important to notice that the entire hash distribution is recalculated when the state of the backend nodes changes. This recalculation happens:
- When an Instance Pool member instance is added (scaling up).
- When an Instance Pool member instance is deleted (scaling down).
NOTE
The source hash is NOT recalculated in case of a health check failure.
Maglev-Hash Strategy Details
Maglev-hash offers a sophisticated approach with minimal disruption during server changes and optimal load distribution, making it suitable for large-scale, dynamic environments. It minimizes changes in load distribution when servers are added or removed, ensuring high availability and reliability; provides near-optimal load distribution and quick recovery.