proxy_pass behavior
Maxim Dounin
mdounin at mdounin.ru
Thu Mar 27 17:27:33 UTC 2014
Hello!
On Thu, Mar 27, 2014 at 01:12:18PM -0400, Jim Popovitch wrote:
> On Thu, Mar 27, 2014 at 12:59 PM, Maxim Dounin <mdounin at mdounin.ru> wrote:
> > Hello!
> >
> > On Thu, Mar 27, 2014 at 12:29:03PM -0400, Jim Popovitch wrote:
> >
> >> Should proxy_pass retry ipv4 if ipv6 fails? Currently (1.5.12), it
> >> does not, and there is no way to force proxy_pass to always use ipv4.
> >
> > In no particular order:
> >
> > - The proxy_next_upstream is expected to retry by default.
>
> Yes, that works if the host name has 2 or more A OR 2 or more AAAA
> records. proxy_next_upstream does not appear to transition to the
> next protocol (i.e. from ipv4 to ipv6)
It doesn't care about address family. As long as connect() to
one address fails, it will try next one.
> > - There _is_ a way to force proxy_pass to always use ipv4 - you
> > should configure your system accordingly, and
> > getaddrinfo(AI_ADDRCONFIG) as used by nginx will do the right
> > thing. E.g., on Linux net.ipv6.conf.all.disable_ipv6 can be set
> > to disable use of ipv6.
>
> :-) That's unacceptable!! :-) I don't want people to disable ipv6,
> I want proxy_pass to use ipv6 and upon failure use ipv4. ;-)
It was you who claimed that "there is no way to force proxy_pass
to always use ipv4". There is.
--
Maxim Dounin
http://nginx.org/
More information about the nginx-devel
mailing list