What does upstream value mean in nginx?

upstream app_front_static { server 192.168.206.105:80; } 

Never seen this before, does anyone know what that means?

+65
nginx configuration
May 4 '11 at 2:47
source share
2 answers

It is used to proxy requests to other servers .

Example from http://wiki.nginx.org/LoadBalanceExample :

 http { upstream myproject { server 127.0.0.1:8000 weight=3; server 127.0.0.1:8001; server 127.0.0.1:8002; server 127.0.0.1:8003; } server { listen 80; server_name www.domain.com; location / { proxy_pass http://myproject; } } } 

This means that all requests for / go to any of the servers listed in section XXX, with a preference for port 8000.

+79
May 4 '11 at 2:56
source share

upstream defines a cluster to which you can proxy requests . It is commonly used to define a cluster of web servers for load balancing or a cluster of application servers for routing / load balancing.

+16
May 4 '11 at 2:49
source share



All Articles