Apache 2.4 Takes Direct Aim At Nginx
darthcamaro writes "The world's most popular web server is out with a major new release today that has one key goal — deliver more performance than ever before. Improved caching, proxy modules as well as new session control are also key highlights of the release. 'We also show that as far as true performance is based — real-world performance as seen by the end-user- 2.4 is as fast, and even faster than some of the servers who may be "better" known as being "fast", like nginx,' Jim Jagielski, ASF President and Apache HTTP Server Project Management Committee, told InternetNews.com." Here's list of new features in 2.4.
First!
That mix of XML and a config file is a mess, please do something modern ...
Apache foundation sucks, it's full of Java Losers who of course are the worst programmers EVER
I struggled with Apache 2 for at least 4 years before switching to NginX. It was the best thing I ever did.
That's all i could say.
Get off the rant, you were too stupid to figure out Apaches awesomeness so it spit you out, NginX took you in as it takes everyone in.
I have been running Release Candidiates of Apache 2.4 for a few months, on an underpowered and overloaded old laptop. The performance improvements over 2.2 on that same computer are really quite noticeable.
Does this release fix one of Apache's biggest problems, that the default Apache config file assumes that you've got 10 gigabytes of RAM in your server? Stuff like setting maxclients to a default of 150 has got to be the single biggest cause of Apache servers blowing up at dedicated and virtual private server hosts.
"We also show that as far as true performance is based - real-world performance as seen by the end-user- 2.4 is as fast, and even faster than some of the servers who may be "better" known as being "fast", like nginx," Jagielski said.
What's with the quotes? Other servers have proven to be faster, lighter weight, and more scalable than Apache for a long time. Don't be bitter because you fell behind. Be happy that you're finally catching up.
The truth is, nginx IS lightningly fast. It has its place, just like Apache.
But dear Apache foundation, please spend your money in making the things instead of making people believe you make things.
We need a fully async web server, like nginx, but with *full* support for fastcgi/http1.1 and connection pooling to the backend servers.
In case some people don't know, nginx uses http1 to connect to the servers, which means a new connection for reach request. Same thing for FastCGI. nginx opens a new FastCGI connection for each request, then tears it down once done, even though FastCGI supports persistent connections and true multiplexing.
nginx is awesome and I love competition, especially between opensource.
The number one webserver is now going after the #2 webserver.
Interesting trend.
I'd rather have better control features, such as completely redoing the vhost matching method.
now we need to go OSS in diesel cars
Looks like there's much hand-wringing all over the net about what the MaxClients should be but the only place I've seen someone actually propose a method for computing it for a given load (in terms of throughput and service time) is here . Nice to see someone actually rolling up there sleeves and actually applying some theory to the problem.
IANA web admin, but from what I have learned from playing around with both Apache and Nginx is that they serve different markets.
Nginx is a small, fast, reliable web server that is great for virtual machines, home users, newbies (like me), etc. It is simple and "just works" because it make sense. Nginx is the Ubuntu/Mint of the web server world.
Apache is a massive, feature rich, highly tunable, beast that can inter-operate with everything. This is an enterprise class (or at least very serious workload) web server. Designed by people who know what they are doing for people who know what they are doing. Apache is the Slackware/Gentoo of the web server world.
If you need a web server to get a job done, use Nginx. If the web server is your job then Apache. The key is how much time you have to spend figuring out how to customize Apache just right vs. how much those customizations are worth.
Oh come on guys!
Every software has it's place to run. httpd, IIS (sorry for mentioning this one), lighttpd, tux, nginx,
Still comparing? Go buy 1 GB more RAM. Or say "sorry, It's easier for me to work with nginx, because apache is too heavy for my brains".
How much more RAM does it take for high loads than nginx?
[root@node3 ~]# ps_mem.py |grep -E "RAM|httpd|php"
Private + Shared = RAM used Program
202.6 MiB + 50.1 MiB = 252.7 MiB httpd (190)
940.2 MiB + 831.4 MiB = 1.7 GiB php-cgi (189)
Private + Shared = RAM used Program
This is what I've got with > 250 req/sec @1.6GHz dual cores, 8GB RAM. what more can nginx give and for what?
Average: all 2.35 0.00 2.08 3.24 0.00 92.33
If you are running it as a balancer - you're wrong! Take LVS.
If you are running it as a filter - you're wrong! Take mod_security or appliances (most of them are based on httpd+mod_security+mod_proxy) - nginx can't do this.
For anything else - it doesn't matter - you're wrong, again.
1 GB RAM vs delay + reading books, code and googling.
Maybe default manner of apache configurations and default MPM's are too heavy for you with default modules and features?
If you are running it for performance and response delays - Yes, it will be slower than nginx with single dumb empty virtual host with 0 add ons. You just CAN'T do analysis of traffic, filtering without buffering it. So, good servers will always have delays. It's OK for internet, not critical. Using it not for internet? For backend? Then OK.
I'm happy with 2.2 too.
Yes, I do like some nginx tricks and I wish it to be in apache too, but I'll never say that apache cannot handle something or do something or eat more RAM. It depends how do you configure it with your CPU and RAM resources, optimize.
"It feels like I'm at the Zoo when reading this thread - I'm frightened, but it's interesting" (c)
We run MOD_PHP with Apache 2.2, should we expect to have MUCH lower memory usage - currently the servers have 8GB of memory and are limited by huge memory per apache connection.
Nginx has an AJP module, but it is third party.
That seems like link spam to me. Lots of useless posts with little substance.
Throughput and service time has little to do with MaxClients, other than if you set MaxClients too high your server will swap to death or run out of memory in high concurrency situations- and then throughput and service time drop rock bottom.
Figuring out MaxClients isn't that difficult. Set MaxClients to something high first, then use ab2 (apachebench) or similar to do X concurrent requests of your most bloated page (serving static pages won't use much memory, it's stuff like php and modperl that use more memory).
Now increase X till apache (and other associated stuff[1]) is using the maximum memory[2] you want on that server. X is now the upperbound of what your MaxClients value should be. You may wish to set MaxClients lower than that as a safety measure, in case a popular web page one day uses more memory, or your other services on that server use more memory.
Now your server won't fall over. There's nothing you can do to make a small server handle 1 million requests within 1 second, but the correct MaxClients setting means your server won't fall over when that happens (unless you have crap hardware or drivers).
[1] Your apache webapp might be using other services/servers on that server and that stuff might also use more memory as the concurrent connections increase.
[2] Calculating memory usage can be a bit tricky, but you can count shared memory in an apache process once, the rest is nonshared.
The sure way is to increase concurrency till it swaps, to detect whether the server is starting to "swap" you can use the "page out" statistics (you can get it for Linux and Windows). If you have lots of page-outs the server is "swapping".
My biggest problem with Apache is configuring it. The configuration file is simply a mess. You have overrides that can be included from other files, etc. Even using Webmin doesn't make the configuration that much easier.
If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.
What's missing in this debate is the fact that Node.js Is Bad Ass Rock Star Tech.
Faith is a willingness to accept something w/o complete proof and to act on it. Reason allows you to correct that faith.
Congratulations, you posted in this thread without calling some other poster names! Oh, wait, you're first post. D'Oh!
I just wish they'd fix the syntax for the AuthLDAPUrl Directive so that you could specify unencrypted binds on a local socket and failover to encrypted binds over the network. It's the basic use case for well-structured large networks, which will have a local LDAP slave for speed and a central node somewhere else on the LAN.
I do love apache, though, warts and all. Great software.
Frankly unless you are doing something very specialised with your app, Apache is probably what you are looking for and even if you are doing something very specialised it can probably take a creditable stab at it.
Deleted
The new kid on the block is way faster.. G-WAN has more bang for zero bucks.. Don't believe me..go benchmark the latest build against nginx or apache.. johnny!!!
I didn't switch to lighttpd, and then nginx just because of performance.
It was, in part, because of configuration. As some Anonymous Coward trolled earlier on, the configuration syntax is pretty pretty complicated, and there are some multisite configurations which are imposible to achieve. It's really a mess, and not-too-well documented.
I have very few servers, each with several sites, with TLS and SNI, and some need to be redirected to others, some are matched with a regex to get some resources from one place, and other resources from some other application on a socket.
This took a few hours the first time with nginx, a few days with lighttpd, but I could *never* achieve this with apache's httpd!
Yaws is a webserver written in Erlang that does 80,000 concurrent connections.
Apache and Nginx only see the dust trail...
I wish I could mod the Kitchen Sink comment up more as it hits the nail on the head. Another example is when someone used to say, "I'm going to make a small fast text editor not like those bloated things," and you could cue forward a few years to the editor which changes description from "fast and light," to , "full featured." It seems to be natural to pretend that there aren't tradeoffs.
This is all just my personal opinion.
The mistake is trying to use mod_php with a heavy PHP application, such as a a complex Drupal site, without a reverse proxy such as Varnish or nginx.
One trick I have been using for a few years is using Apache as a threaded server, with MPM Worker, and FastCGI but with fcgid, not mod_fastcgi. Works exceptionally well. For static files, Apache is now lightweight and does not use much RAM.
For details, see my article on Apache MPM Worker with fcgid.
2bits.com, Inc: Drupal, WordPress, and LAMP performance tuning.