Hi,
Lets say I have 1 x nginx front end servers which load balances to 2 x app server and requires session persistence.
I can set up an upstream group like this.
upstream backend {
hash $request_uri consistent;
server backend1;
server backend2;
}
If the requests always have a HTTP header called say "x-user-name", I was hoping that I could do this:
hash $http_x_user_name consistent;
but it doesn't seem to work for me..
Does anyone know if this should work? or what variables are available in the upstream context?
I've tried $sent_http_x_user_name and also $upstream_http_x_user_name also.
Would appreciate any help!
Sam
Lets say I have 1 x nginx front end servers which load balances to 2 x app server and requires session persistence.
I can set up an upstream group like this.
upstream backend {
hash $request_uri consistent;
server backend1;
server backend2;
}
If the requests always have a HTTP header called say "x-user-name", I was hoping that I could do this:
hash $http_x_user_name consistent;
but it doesn't seem to work for me..
Does anyone know if this should work? or what variables are available in the upstream context?
I've tried $sent_http_x_user_name and also $upstream_http_x_user_name also.
Would appreciate any help!
Sam