Gixy: Nginx Configuration Static Analyzer
github.com
github.com
There is no resolver running on 127.0.0.1 ... except on a couple of systems. If I have to make an educated guess, the guy who wrote that is running on Ubuntu.
And a lot longer to ensure people know to do this.
Is the dnsmasq solution here[1] sufficient? Or, should I edit dhclient.conf to add the desired name servers[2]
[1] https://unix.stackexchange.com/questions/128220/how-do-i-set...
[2] https://unix.stackexchange.com/questions/128220/how-do-i-set...
If you use a specific IP, resolver is not needed.
For many of these tools there's objectively wrong configurations, where you'd only use certain settings for legacy reasons. But it's not always clear for newcomers.
Edit: the add_header config option is quite confusing and I had absolutely no idea it behaved like that, I highly suggest trying this tool on your configs and seeing what it reports.
1. https://github.com/yandex/gixy/blob/master/docs/en/plugins/a...
Run Gixy:
image: python:3
stage: code_check
cache:
paths:
- .pip-cache
script:
- pip install gixy --cache-dir=.pip-cache
- gixy nginx.confI've been doing some testing, and I see an increase of about 40-60ms, just for initial connection server compute. Is that normal? How does one reduce the initial SSL/TLS connection compute time?
My web app responds in 1-2ms. Adding another 40-60ms on top of for https that wrecks latency.
b) with session tickets configured, do you see this increase consistently for the same client?
c) would your users find it acceptable to have the occasional 50ms hit on a full handshake in order to get authentication & encryption? would they even notice (see 'a')
b) Session tickets cuts it from 60ms down to about .5ms extra delay (when loadtesting with a keepalive https connections) so this is really only an initial handshake problem.
c) The localhost full handshake latency problem is really a proxy to the real problem: the CPU load. TLS/SSL is adding a lot of compute requirement to each initial connection. This becomes important as I have to deal with celebrity content, where a single Twitter link can lead to hundreds of thousands of incoming connections within a few minutes.
TLS/SSL handshake compute requirements really need to be sped up somehow..
A quick test with ab (-n 1 -c 1) against a nginx instance shows about 5ms for me, on an Intel E3-1245 V2 @ 3.40GHz. This is with a P-384 key, so it would be even less with P-256 or RSA-2048 (which, IIRC, have fast assembler implementations in openssl).
Things like TLS False Start, TLS Resumption, TCP Fast Open, and more can really help reduce that pretty well.
Also, take a look at the book linked at the bottom of that page which includes a pretty comprehensive section on improving RTT and TLS speeds in general. (https://hpbn.co/transport-layer-security-tls/)
I work on NGINX Amplify and we have been playing with config analysis for a little while as a cloud-based reporting tool.
This hit my radar originally when they wrote their blog: https://habrahabr.ru/company/yandex/blog/327590/ (they referenced Amplify)
the line in question: map $cookie_MULTI_SITE_3:$cookie_client_ms:$cookie_counselor_ms $magic_root {
there's a simpler map directive above this one that it doesn't seem to have a problem with
[nginx_parser] WARNING Skip unparseable block: "http"
Which presumably means it's broken there too? :)