4 ms·
This x1000. So many of those are terrible default behavior. They admit as much when they say things like "doesn't work how you'd expect". I get that NGINX is p
by pseudosavant 5y ago
This x1000. So many of those are terrible default behavior. They admit as much when they say things like "doesn't work how you'd expect".
I get that NGINX is powerful. But I hate dealing with it. Every. Single. Time.
- geden 5y agoNginx rose out of the cesspit that was Apache config files. For me it was night and day better and I love the fact Nginx is just set and forget. That's not to say it can't improve...
- three14 5y ago"Doesn't work how you'd expect" reminds me of the time that we had users receiving responses from other people's requests. Why? Our API is idempotent, but we needed to use POST instead of GET to let the browser send a request body. Our API is very slow, so we put NGINX in front of our API to cache responses. We used something like proxy_cache_key "$request_uri|$request_body"; I don't think I was completely remiss in thinking that $request_body means "request body". Testing showed that it worked just fine. In production, some users made requests that were larger than our tests - and then $request_body is empty, and users will get each others' responses. This behavior is helpfully documented as follows: "The variable’s value is made available in locations processed by the proxy_pass, fastcgi_pass, uwsgi_pass, and scgi_pass directives when the request body was read to a memory buffer." Stackoverflow is more helpful: https://stackoverflow.com/questions/18795701/nginx-proxy-cache-key-request-body-is-ignored-for-large-request-body https://stackoverflow.com/questions/18795701/nginx-proxy-cac...
- cosmotic 5y agoThe worst part is that these problems only manifest under high load. Unless a team does performance testing (for long periods of time? in a highly-production-like environment), they might never know of many of these issues.
- martijnvds 5y agoCynical view: a great way to sell consultancy services / their Plus product?
- remus 5y agoLess cynical view: the defaults are designed to work for a majority of use cases and the majority of nginx users aren't running high traffic servers.
- cosmotic 5y agoIt doesn't seem the high traffic settings would adversely affect low traffic instances, which is why these defaults smell so bad.