News for hackers. Stuff that matters.
Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Monday February 13, 2017 @09:22AM (#13635352)
1/ The article doesn't claim to support one million concurrent users. Top level directives are Ubuntu/RHEL defaults, but if you have a preferred scalability config please file an issue!

2a/ buffering is well known to break SSE. As the article notes, if you're not using SSE you should disable that include.

2b/ I thought the config parser would have caught this but didn't. Filed https://github.com/certsimple/nginx-http2-load-balancing-con... and fixed.

3/ If you think your own DNS server is going to be better maintained than Google's, sure. But not everyone else would.

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by thresh on Monday February 13, 2017 @09:38AM (#13635488)
2a/ ok, I misread what was the intention, maybe it's a good idea then

3/ it's not about "better maintained", it's about trusting the internet on sensitive data, which you should never do, because dns is easily spoofed and nginx resolver was not written to operate in a hostile environment. if you don't have a local caching resolver on your machine (which you should), even trusting your cloud provider dns is better than trusting goog one. nginx documentation even says " To prevent DNS spoofing, it is recommended configuring DNS servers in a properly secured trusted local network. " on http://nginx.org/r/resolver

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Monday February 13, 2017 @10:17AM (#13635836)
You're right: checking this out further, the nginx resolver seems to have a bunch of issues [1] which is concerning.

I've modified the config accordingly.

[1] http://blog.zorinaq.com/nginx-resolver-vulns/

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by thresh on Monday February 13, 2017 @10:44AM (#13636069)
Yep - the warning clause in the documentation is there because of those issues.

thanks!

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by thresh on Monday February 13, 2017 @09:44AM (#13635552)
There is a problem with this change: https://github.com/certsimple/nginx-http2-load-balancing-con...

proxy_set_header in html5-sse.conf will discard all other proxy_set_header included in proxy.conf a level above: "These directives are inherited from the previous level if and only if there are no proxy_set_header directives defined on the current level", http://nginx.org/r/proxy_set_header

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Monday February 13, 2017 @09:59AM (#13635676)
Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by tsewlliw on Tuesday February 14, 2017 @08:55AM (#13643482)
> 3/ If you think your own DNS server is going to be better maintained than Google's, sure. But not everyone else would.

Be careful here, Google will rate limit you very severely and waiting 10s for DNS responses inside Nginx is no fun. Most cloud providers will give you a good resolver via DHCP that is much more forgiving when you accidentally abuse it.

Re:An nginx.conf for 2017: HTTP/2, IPV6, HTML5 SSE, load bal... by nailer on Tuesday February 14, 2017 @11:11AM (#13644504)
Have already modified the file accordingly after Thresh's suggestion, see below. Thanks though!