I figured out the IPv6 oddness. Using 'localhost' as the destination in the NGINX configuration, coupled with a "::1 localhost" alias in /etc/hosts, resulted in requests being made to both 127.0.0.0 and ::1, intermittently. Configuring NGINX to proxy to 127.0.0.1 instead of localhost fixes it. This also affects bug #1691473.
So in addition to the above config changes, I propose we change the default NGINX config to proxy to 127.0.0.1 instead of localhost.
I figured out the IPv6 oddness. Using 'localhost' as the destination in the NGINX configuration, coupled with a "::1 localhost" alias in /etc/hosts, resulted in requests being made to both 127.0.0.0 and ::1, intermittently. Configuring NGINX to proxy to 127.0.0.1 instead of localhost fixes it. This also affects bug #1691473.
So in addition to the above config changes, I propose we change the default NGINX config to proxy to 127.0.0.1 instead of localhost.
Unknown if this affects HAProxy.