Live data from Hacker News

Is Nginx obsolete now that we have Amazon CloudFront?

peterbe.com

21–30 of 64 posts

Re: Is Nginx obsolete now that we have Amazon CloudFront?

#21
post #3

More 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…

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…

The point was that; what difference does it make if Apache/Nginx is better when it's only doing it once. Or, more specifically, once per revision of the code.

Re: Is Nginx obsolete now that we have Amazon CloudFront?

#22
post #3

More 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?

#23

I think not. Requirements change, and locking myself in to a front-end cache is not appealing. I may also have things which I can't or won't let others cache for me, so I want my local stack to be optimized anyway. You won't see me serving everything out of WEBrick anytime soon just because I have a cloud cache. It's nice to be able to defer decisions, especially optimizations, but making performance someone else's p…

On several of my modern projects, there's not a single piece of static data that can't be cached forever in a CDN. That's because server-side code is not getting really good at managing the initial build of static assets and the delivery of their URL.

Re: Is Nginx obsolete now that we have Amazon CloudFront?

#25
post #5

Sure 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.

Is this just an odd joke? Of course you need a database.

If you need to build a toaster, you don't need to build an iron smelting plant. Certain things other folks are better at taking care of.

Re: Is Nginx obsolete now that we have Amazon CloudFront?

#26

nginx still buys you SSI (which allows you to, for example, cache the same page for all users and have nginx swap out the username with a value stored in memcache), complex rewrite rules, fancy memcache stuff with the memc module (ex: view counters), proxying to more than ten upstream servers, fastcgi, and lots of other fancy stuff. Cloudfront is a replacement for varnish, not nginx.

Isn't that better to do in a programming environment you're more familiar with? LIke python/rails/ASP Then you have much better tools for building unit tests and stuff too.

Re: Is Nginx obsolete now that we have Amazon CloudFront?

#27
post #8

I 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.

Betteridge's Law of Headlines[1] [1]: http://en.wikipedia.org/wiki/Betteridges_Law_of_Headlines

haha!

Re: Is Nginx obsolete now that we have Amazon CloudFront?

#28

CloudFront is pretty good, just make sure you are able to config your asset source in one line. Otherwise you have to use a tool to invalidate the cloudfront cache frequently during dev and it's not instant.

Invalidation is for suckers. A fresh new URL is much safer.

Re: Is Nginx obsolete now that we have Amazon CloudFront?

#30
post #11

I 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?)

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.
Post reply on HN