Welcome! Log In Create A New Profile


number of upstream definitions, and a suggestion

Gary Wilson Jr.
October 02, 2011 06:14PM
I currently have maybe a couple hundred upstream definitions but am
likely to grow to thousands. Are there any practical or theoretical
limits to the number of upstream definitions that can exist in one
nginx instance? Anyone out there making use of this many upstream

On a side note, I think it would be cool if upstream identifiers could
be combined with port numbers so that a single upstream definition
that defined servers could be combined with multiple proxy_pass
definitions that only differ by port. For example, a configuration
like this:

upstream app1 {
server server1:port1;
server server2:port1;
server server3:port1;

upstream app2 {
server server1:port2;
server server2:port2;
server server3:port2;

location /app1 { proxy_pass http://app1; }
location /app2 { proxy_pass http://app2; }

Could be replaced by a setup like this:

upstream cluster1 {
server server1;
server server2;
server server3;

location /app1 { proxy_pass http://cluster1:port1; }
location /app2 { proxy_pass http://cluster1:port2; }

The latter would require 1 upstream definition and N proxy_pass
definitions instead of N upstream definitions (where the list of
servers doesn't change, only the port numbers) and N proxy_pass



nginx mailing list
Subject Author Posted

number of upstream definitions, and a suggestion

Gary Wilson Jr. October 02, 2011 06:14PM

Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 121
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready