I have Nginx configured as a simple sticky LB. One of the key parts of config is matching cookie value to server address. This works fine:
map $cookie_sessionServer $http_sticky_backend {
default 0;
Server_A 192.168.73.210:1337;
Server_B 192.168.73.210:1338;
}
Now I have to add dots to cookie values (why is another story). But when I change the config, it stops working.
map $cookie_sessionServer $http_sticky_backend {
default 0;
.Server_A 192.168.73.210:1337;
.Server_B 192.168.73.210:1338;
}
No errors, nothing useful in debug log, this map just "returns" the default value (0) and stickiness logic is skipped.
I tried also
\.Server_A 192.168.73.210:1337;
and
".Server_A" 192.168.73.210:1337;
and
~^\.Server_A$ 192.168.73.210:1337;
and
~\.Server_A$ 192.168.73.210:1337;
but none of this worked for me =(