On Wed, 2008-05-21 at 11:55 -0400, Ross Vandegrift wrote: > On Tue, May 20, 2008 at 02:01:26PM -0700, Cliff Wells wrote: > > According to Netcraft, Nginx is now deployed in front of over 1 million > > domains. Not nearly as much as Apache, but clearly not all of those are > > "highly isolated environments". In fact, many sites with heavy traffic > > are moving to Nginx due to it's vastly superior scalability. > > > > Some notables that use Nginx: > > > > wordpress.com > > youtube.com > > hulu.com > > rambler.ru > > torrentreactor.net > > kongregate.com > > > > Where did you get your research from? (Actually, don't answer that, I > > can guess). > > Sites that are amongst the largest on the internet fall into a corner > case in my mind. As Mike pointed out, sites have an unrealistic > expectation of traffic. I've been involved in the average cases.
As have I. But I'm going to disassemble this argument below. > My claims come from years in the service provider industry, > watching various deployments. I've been an Apache fan for a long > time, and have seen and deployed hundreds of servers, serving > thousands of sites on Apache. I think this is true for all of us. The difference is that the world has changed in the last couple of years and now there's more options to choose from. And by "options" I don't mean "a smaller, less capable Apache clone", I mean a paradigm shift in how to handle high loads. It's well known that threaded/process based servers cannot scale beyond a reasonable point. Nginx and Lighttpd are async and are specifically written to address the C10K problem. As you point out, not all sites need this sort of scalability (certainly none that I've written or hosted), however there's a fallout benefit to this work: these servers can scale specifically because they don't use threads which means they also use *considerably* less memory and also tend to use much less CPU. I challenge you to name any system that won't benefit from reduced RAM and CPU utilization. To give you a concrete example: last week a colleague of mine converted a server running Apache and mod_php to Nginx and FastCGI. Prior to the conversion the server was using almost 1.2GB of RAM. After the conversion he was using 200MB. Is it probable that Apache was misconfigured? Hard to know unless you have spent years tuning Apache, but I'll concede it's possible. Is Nginx misconfigured? Well, frankly it doesn't seem to matter ;-) > None are youtube.com - and I agree that > this is an important point. > > Comparing my Apache deployments with deployments of other servers, > year after year, Apache won hands down: > > 1) Users of other HTTP servers are always fiddling with them, > restarting after crashes. This may be due to misuse, non-optimal > config - I'm not sure. But I've never had stability issues like this > with Apache. I had many issues with Lighttpd, but I've had none with Nginx. I'd also have to question your use of "always" in the above sentence. I strongly suspect aren't speaking from experience here, rather just hearsay. > 2) Apache is well-understood by many more folks. There's an army of > support reps downstairs that are compentent, if not experts, at > maintaining and troubleshooting it. The other servers come across as > mysteries (despite often being highly trivial), and end up escalated > instead of fixed. And it's poorly understood by just as many, if not more. I first switched from Apache not due to scalability concerns (like you, I've not encountered them), but because I find Apache's configuration to be overwhelming and convoluted. When I first started using Nginx, all the documentation was in Russian and yet I managed to convert an entire shared hosting box from a mix of Apache, Pound, and Lighttpd to Nginx in two days by simply reading the examples. I'd challenge any newcomer to Apache to do the same. The fact that you need an army of support reps isn't really advancing your argument ;-) > 3) Documentation for Apache is through, searchable, and > understandable. It's full of examples, is available for multiple > versions of httpd. I have seen the Apache documentation turn > motivated people from competent levels to expert just by googling for > it. I'm not saying that other servers don't have decent docs - but > Apache's are amongst the best docs for any software I have ever read, > and I have seen them function in production for years. I'd never argue it doesn't. In fact, Apache's documentation is clearly far more extensive than Nginx's. I'd expect no less after being the workhorse of LAMP for the last decade. I'll happily admit (well, not too happily) that Apache's documentation is far better than Nginx's. Unfortunately superior documentation doesn't make for superior software. Documentation is fixable, but Apache's process model isn't. > > I'd qualify this paragraph as "some of Apache's strengths are", rather > > than a blanket "it's better". For some people, in some settings, it is > > better. For others it isn't. If you need high scalability, it isn't > > the best. If you need a small memory footprint it's not the best. If > > you prefer a sane configuration syntax it isn't the best. If you need > > all three then it's arguably amongst the worst. > > Yea, you're right - I'm tacitly assuming that we're talking about the > average cases. Other http servers definitely excel at things, especially > for workloads they have been specially designed. But for every youtube > there's tens of thousands of websites with more average traffic and control > needs. Well, here's where I find that most Apache proponent's arguments fall apart: either they claim that Nginx is best for small-scale websites or they claim that it's only needed for large-scale websites. They are both wrong. It's best for both. Nginx scales both up *and* down. It can run youtube.com or you can embed it in a cellphone. The challenges of running Apache in a 96MB VPS have been documented on this very list. The challenges of getting Apache to deal with C10K aren't often discussed because it isn't possible without getting into very high-end hardware. This makes Apache best for... medium-sized sites that don't care about resource utilization? This is a ridiculous claim, so I'll assert instead that Apache is best if you need a *specialized* service, such as mod_svn or mod_jakarta. Apache proponents will point out the wealth of modules as evidence that Apache is the best for general purpose web serving. But being best at fronting *particular* applications doesn't make it best *in general*. So it's not Nginx that's specialized for a particular workload, it's Apache that's specialized. Nginx is like a finely-balanced chef's knife: suitable for a variety of tasks, large and small, as long as they all involve slicing. Apache, on the other hand, is the swiss-army knife of webservers: bulky, full of odd specialty tools, and on occasion, marginally useful as a knife. In either case, apparently they both make for a funny lump in some people's pockets ;-) Anyway, I think we've gone way OT for long enough. We can continue offlist if you like. Regards, Cliff --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons-discuss@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en -~----------~----~----~----~------~----~------~--~---