---
title: "Choose Load Balancer Strategies"
description: "Optimize load balancing with Source-Hash and Maglev-Hash for sticky sessions, high availability, and low disruption in dynamic, stateful environments."
url: https://community.exoscale.com/product/networking/nlb/how-to/loadbalancer-strategies/
product: "NLB"
section: product
last_updated: 2026-06-03
---
> For AI agents: the documentation index is at https://community.exoscale.com/llms.txt. Every page is available as markdown at `<page URL>index.md` or with `Accept: text/markdown`.

# Choose 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.
