there's a sticky-module (3rd-party), maybe this works out of the box for you. https://code.google.com/p/nginx-sticky-module/wiki/Documentation Posted at Nginx Forum: http://forum.nginx.org/read.php?2,238694,238700#msg-238700