Configuring a subnet in an upstream server
Aleksandar Lazic
al-nginx at none.at
Fri Apr 7 23:42:05 UTC 2017
Am 03-04-2017 18:09, schrieb Dynastic Space:
> I used a poor example.
> The functionality I was interested in was adding a range of application
> servers, all part of the same domain.
I think you have the following options.
.) or list every app server in the upstream block
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#upstream
.) DNS rr with resolver
http://nginx.org/en/docs/http/ngx_http_core_module.html#resolver
.) in the commercial version is also a service=name and resolve possible
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#server
You can also use a script which creates from 192.168.0.0/16 a server
line for the upstream and include it into the nginx.conf
You can add in the log format the upstream address to see to which app
server the request was forwarded.
http://nginx.org/en/docs/http/ngx_http_upstream_module.html#variables
Regards
Aleks
> D
>
> On Mon, Apr 3, 2017 at 11:04 AM, B.R. via nginx <nginx at nginx.org>
> wrote:
>
> What would be the meaning of that?
>
> How do you route traffic to 192.168.0.0? Do you really want to send
> requests to 192.168.255.255?
> How would you handle requests sent to some servers (but not all) if
> some are not responsive?
>
> I suspect what you want to use is dynamic IP addresses for your
> backends. Good news: you can use domain names.
>
> ---
> B. R.
>
> On Sun, Apr 2, 2017 at 8:42 AM, Dynastic Space
> <dynasticspace at gmail.com> wrote:
>
> Is it possible to configure a collection of servers using subnet
> notation in the upstream server knob? e.g. server 192.168.0.0/16.
>
> Thanks,
>
> Dynastic _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
_______________________________________________
nginx mailing list
nginx at nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
More information about the nginx
mailing list