Does anyone have experience with using nginx as a caching proxy? I've used Varnish and swear by it, it's just an amazing piece of software. How well can nginx replace Varnish?
Is Nginx obsolete now that we have Amazon CloudFront?
31–40 of 64 posts
Re: Is Nginx obsolete now that we have Amazon CloudFront?
#32Earlier quoted context omitted.
Tools like Apache and nginx are not ONLY faster at serving files with less load on the system than a script. They are also more thoroughly audited and battle-tested. And their declarative configs won't go wrong just because the person writing them missed an unbelievably subtle corner case introduced by using a Turing-complete language. It's important because there are so many opportunities for error in serving arbitr…
Here's the thing: Django makes the standard staticfiles app available. It's a great convenience, eliminating extra steps (collecting/moving static assets) and processes (another nginx/etc). And many projects' 'dev'/prototype incarnations are already open to the world, in one way or another. So if this is a security sin, they've already encouraged its widespread commission. A bit of "don't do this" or "don't do this i…
Interestingly, we extended the collectstatic command in many ways to perform minification, combination of assets, generation of sass and javascript variables (based on settings in python), etc. It's part of our deployment and if we were serving static files through django, we would still have to run a similar command.
I'm also happy that nginx is handling file uploads, aliasing, redirection, virtual hosting on different IPs and Ports with different access control, real ip extraction (when behind a load balancer), etc.
I'll be following more closely this trend of moving static asset hosting from a regular web server to the application container, but I believe that web servers like nginx and apache can do a lot more than just serving static files (at least, in complex deployment scenarios).
Re: Is Nginx obsolete now that we have Amazon CloudFront?
#33I was once told by somebody wise that if a post asks a question, then the answer is usually no. e.g.: Is Mountain Lion going to kill Windows 8? .. etc.
A meta-corollary: whenever a headline with a question mark appears on Hacker News, there will be at least one comment referring to Betteridge. (Please, can this stop?)
Re: Is Nginx obsolete now that we have Amazon CloudFront?
#34Sure it's obsolete, who needs databases and live, chancing data. All we need is a static pages. Besides who needs to build his own infrastructure, it's 2012 right ? Let's buy it.
I think for the average use case the answer is no, nginx doesn't buy you much. However nginx is a lot more flexible than cloudfront, so if you have more complicated caching rules and such nginx is a perfect fit.
Re: Is Nginx obsolete now that we have Amazon CloudFront?
#35Does anyone have experience with using nginx as a caching proxy? I've used Varnish and swear by it, it's just an amazing piece of software. How well can nginx replace Varnish?
It's great in tandem with Redis. http://mikeferrier.com/2011/05/14/my-beautiful-dark-twisted-...
Can nginx do that? It sounds like this solution wouldn't really be able to, having to go through Lua and all, but nginx is an all-around very solid piece of software too, so I wonder...
Re: Is Nginx obsolete now that we have Amazon CloudFront?
#36Earlier quoted context omitted.
A meta-corollary: whenever a headline with a question mark appears on Hacker News, there will be at least one comment referring to Betteridge. (Please, can this stop?)
Ultra-meta: Whenever a repeating meme occurs on the internet, there will be someone asking for it to stop. And the answer to whether it will stop will be no.
Re: Is Nginx obsolete now that we have Amazon CloudFront?
#37Re: Is Nginx obsolete now that we have Amazon CloudFront?
#38More generally: once you adopt any of the various schemes for having a inbound proxy/front-end cache (Fastly, CloudFlare, CloudFront, or an in-house varnish/squid/etc), are all the optimizing habits of moving static assets to a dedicated server now superfluous? I think those optimizing habits are now obsolete: best practice is to have a front-end cache. A corollary is that we usually needn't worry about a dynamic fra…
Regarding Django and staticfiles; Rightly so, because they're not ready for production and being taken over my the CDN. You need to sprinkle some django_compressor on it first but still that doesn't get the cache headers perfectly right. Or the gzipping.
Re: Is Nginx obsolete now that we have Amazon CloudFront?
#39Earlier quoted context omitted.
Here's the thing: Django makes the standard staticfiles app available. It's a great convenience, eliminating extra steps (collecting/moving static assets) and processes (another nginx/etc). And many projects' 'dev'/prototype incarnations are already open to the world, in one way or another. So if this is a security sin, they've already encouraged its widespread commission. A bit of "don't do this" or "don't do this i…
"eliminating extra steps (collecting/moving static assets)" Interestingly, we extended the collectstatic command in many ways to perform minification, combination of assets, generation of sass and javascript variables (based on settings in python), etc. It's part of our deployment and if we were serving static files through django, we would still have to run a similar command. I'm also happy that nginx is handling fi…
Not also, though, that a service like CloudFlare now puts some of these optimizations (minification, asset-combination, obfuscation, etc) into the cache layer, as optional cloud 'app' services to be enabled/disabled/paid-for as desired.
Not saying that way is better for all, but it has potential as a convenience for some, getting those same expert-level optimization benefits while retaining a simple project/deployment structure.
Re: Is Nginx obsolete now that we have Amazon CloudFront?
#40...and yeah, I think I should bloody use this server as a backend to serve my in production.
http://tech.blog.aknin.name/2011/12/28/i-wish-someone-wrote-...