Does this configuration have impact in performance?
nfn
nginx-forum at nginx.us
Fri Dec 2 10:24:47 UTC 2011
Hello,
I have two small bits in my configuration that I'm worried about.
One it to redirect users based in their country to a specific page.
The other is to choose the upstream based in a cookie.
'm am worried about performance and would like to know if this small
bits are evil to my site.
================================
### Map Member ID Cookie
map $cookie_memberid $prxy {
default upstream-1;
~^[1-9]\d*$ upstream-2;
}
### / Map Member ID Cookie
### Map Country Code
map "$geoip_country_code.$arg_section" $registo {
default 0;
AAA.register 1;
BBB.register 1;
}
map "$geoip_country_code.$arg_serviceClick" $registo {
default 0;
AAA.facebook 1;
BBB.facebook 1;
}
### / Map Country Code
server {
# Main location
location / {
# GeoIP
if ($registo) {
return 301 /pages/registo;
}
proxy_pass http://$prxy;
}
==============================
Thanks
Posted at Nginx Forum: http://forum.nginx.org/read.php?2,219466,219466#msg-219466
More information about the nginx
mailing list