Live data from Hacker News

Is Nginx obsolete now that we have Amazon CloudFront?

peterbe.com

41–50 of 64 posts

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

#41

Earlier quoted context omitted.

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.

Recursive-super-ultra-meta-induction: Whenever someone refers to a level of meta-ness, someone else will refer to level n+1.

Transparently false: this thread's length is measurably finite.

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

#43
How does this shit make it to the front page?

First and foremost, everyone needs caching. It's what makes computers fast. That RAM you have? Cache. The memory in your CPU? Cache. The memory in your hard drive? Cache.

Your filesystem has a cache. Your browser has a cache. Your DNS resolver has a cache. Your web server's reverse proxy [should] have a cache. Your database [should] have a cache. Every place that you can conceivably shove in another cache, it can't hurt. Say it with me now: Cache Rules Everything Around Me.

First you should learn how web servers work, why we use them, and how to configure them. The reason your Apache instance was running slow is probably because you never tuned it. Granted, five years ago its asynchronous capabilities were probably haggard and rustic. It's gotten a lot more robust in recent years, but that's beside the article's point. Nginx is an apple, CloudFront is an orange.

Next you should learn what CDNs are for. Mainly it's to handle lots of traffic reliably and provide a global presence for your resources, as well as shielding your infrastructure from potential problems. Lower network latency is just a happy side effect.

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

#44
post #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.

I am going to make a codecademy course on detecting sarcasm just for you :)

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

#45

How does this shit make it to the front page? First and foremost, everyone needs caching. It's what makes computers fast. That RAM you have? Cache. The memory in your CPU? Cache. The memory in your hard drive? Cache. Your filesystem has a cache. Your browser has a cache. Your DNS resolver has a cache. Your web server's reverse proxy [should] have a cache. Your database [should] have a cache. Every place that you can…

But if the CDN is serving your static assets, your origin webserver only has to generate them once[1] to populate the CDN. It almost doesn't matter how long this takes. And this works well enough that you don't need to bother setting up an Nginx or Apache instance at all. And furthermore, you don't have to copy your static files anywhere -- just use your framework's built-in webserver for everything!

This greatly simplifies your production deployments and in my books that's a huge win.

[1] well... that fudges it a bit, since each POP needs to make its own fetch, and the assets can theoretically drop out of the CDN's cache; so the truth is actually "a handful of times" instead of "once".

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

#46

How does this shit make it to the front page? First and foremost, everyone needs caching. It's what makes computers fast. That RAM you have? Cache. The memory in your CPU? Cache. The memory in your hard drive? Cache. Your filesystem has a cache. Your browser has a cache. Your DNS resolver has a cache. Your web server's reverse proxy [should] have a cache. Your database [should] have a cache. Every place that you can…

> How does this shit make it to the front page?

Obviously the title was a little ridiculous, but I up-voted it, because it's a novel idea. If you're planning to have almost all of your static assets hosted from the CDN (which is pretty reasonable for almost everyone) then why bother with a super high-throughput low-latency web server if the only purpose is to occasionally refill the CDN? If you end up thrashing the CDN and constantly going back to refill it, you're going to have bigger problems.

From what I can tell, the rest of your comment is just super aggressive and doesn't really go anywhere. I will tell you that I have extensive experience with every piece you've mentioned here, and none of that really has any effect on the author's thesis (again, no need to optimize serving static content from your host if a CDN is going to do the legwork).

In general though, when someone works at Mozilla, I tend to give them the benefit of the doubt regarding their knowledge of elementary computing principles.

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

#47
post #31

Earlier quoted context omitted.

It's great in tandem with Redis. http://mikeferrier.com/2011/05/14/my-beautiful-dark-twisted-...

Hmm, that looks very interesting, but I've had Varnish serve 100k requests on a small (512 MB RAM) VPS without me actually noticing (I only found out when Google Analytics had a spike the size of a mountain). 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...

Nginx can handle much higher loads than Varnish in many situations.

Check this out for a look at Nginx's architecture: http://www.aosabook.org/en/nginx.html

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

#48
post #11

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

It will always stop, at least for the most part. It will take a long time, though, and by then it will only be a dim memory, so you probably won't notice.

(Netcraft confirms: BSD is dying!)

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

#50
If you want to serve static files cheaply and are moving less than 10TB/mo you will find that CloudFront is a magnitude more expensive than bunch of VPSes with lots of monthly bandwidth.

Viability of this depends heavily on the use but if you're moving funny pictures of cats then you won't be generating lots of income and want to optimize the bandwidth costs.

Post reply on HN