Here's how i do it... connecting to php-fpm backends.
upstream backend {
ip_hash;
server unix:/var/run/php5-fpm.sock;
server 192.168.101.1:9000;
server 192.168.101.2:9000 down;
keepalive 8;
}
The addition of the down keyword ensures that sessions that can be honoured will still go to the valid servers.
I expect there will be something similar for proxy servers... don't use apache any more unless I can help it.