load balancing
IP Hashing
Hash client IP to deterministically route to the same server — session affinity without shared state
Total Requests0
Unique IPs0
Last Hash—
Server A
hash % 4 = 0
Server B
hash % 4 = 1
Server C
hash % 4 = 2
Server D
hash % 4 = 3
// event log
No events yet.
// how it works
- hash(clientIP) % numServers = target index
- Same IP always maps to same server
- Provides session affinity without cookies/state
- Try "Demo Stickiness" to see same IPs repeat
// trade-offs
- Simple session persistence mechanism
- No shared state needed between LBs
- Uneven distribution if IPs are clustered
- Adding/removing servers reshuffles all mappings