| From | Sent On | Attachments |
|---|---|---|
| PatRoy | May 28, 2010 1:41 pm | |
| Joshua Jonah | May 30, 2010 9:29 pm | |
| Weibin Yao | May 30, 2010 10:45 pm | |
| Ryan Malayter | May 31, 2010 9:42 am | |
| rovar | May 31, 2010 7:43 pm | |
| Jérôme Loyet | Jun 6, 2010 3:44 pm | |
| Igor Sysoev | Jun 7, 2010 9:01 am |
| Subject: | Re: upstream using header value | |
|---|---|---|
| From: | Igor Sysoev (ig...@sysoev.ru) | |
| Date: | Jun 7, 2010 9:01:03 am | |
| List: | ru.sysoev.nginx | |
On Fri, May 28, 2010 at 01:41:48PM -0700, PatRoy wrote:
Hi,
Can someone tell me if it's possible to proxy the requests to different servers by using an http header value. So for example we have 2 web servers and if the request has the http header "group_id" between 0 and 100 then those go to server #1, and between 100 and 200, they go to server #2?
Can you do this with a module like upstream_hash ??
http { map $http_group_id $backend { default 1; 0 1; 1 1;
...
100 1; 101 2;
...
200 2; }
upstream backend1 { server server1; }
upstream backend2 { server server1; }
server { location / { proxy_pass http://backend$backend; }
-- Игорь Сысоев http://sysoev.ru
_______________________________________________ nginx mailing list ngi...@nginx.org http://nginx.org/mailman/listinfo/nginx





