Skip to content

Instantly share code, notes, and snippets.

View sherman's full-sized avatar
🏠
Working from home

Denis M. Gabaydulin sherman

🏠
Working from home
View GitHub Profile
@perusio
perusio / sharded-balancing-nginx.txt
Created March 21, 2012 23:58 — forked from zzzcpan/sharded-balancing-nginx.txt
Sharded load balancing with nginx and perl
# Balancing over 4 nodes by hashing URI (consistently with md5)
# onto 16 shards.
upstream x0 { server 192.168.0.2; server 192.168.0.3 backup; }
upstream x1 { server 192.168.0.2; server 192.168.0.4 backup; }
upstream x2 { server 192.168.0.2; server 192.168.0.5 backup; }
upstream x3 { server 192.168.0.2; server 192.168.0.3 backup; }
upstream x4 { server 192.168.0.3; server 192.168.0.4 backup; }