redirect - Nginx Load Balancing -


i want load balance website nginx.

the load balancing in nginx wiki proxy, actual file being downloaded frontend server. (http://wiki.nginx.org/loadbalanceexample)

this how need balancing:

user request file:

  • http:// site.com/image1.jpg

nginx redirect user 1 of servers (with location header):

  • http:// s1.site.com/image1.jpg
  • http:// s1.site.com/image1.jpg
  • http:// s3.site.com/image1.jpg

is possible nginx?

http {   split_clients "${remote_addr}" $server_id {     33.3% 1;     33.3% 2;     33.4% 3;   }    server {     location ~* \.(gif|jpg|jpeg)$ {       return 301 "${scheme}://s${server_id}.site.com${request_uri}";     }   } 

Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -