Slashdot Mirror


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.

39 of 209 comments (clear)

  1. Re:Apache Never Again by TheCRAIGGERS · · Score: 4, Insightful

    So, your claim is that software can never improve?

  2. Re:Apache Never Again by Simon+Brooke · · Score: 5, Insightful

    I struggled with Apache 2 for at least 4 years before switching to NginX. It was the best thing I ever did.

    Quick translation into English: 'I am too clueless to run a webserver, but wish to get First Post'.

    --
    I'm old enough to remember when discussions on Slashdot were well informed.
  3. Noticeable improvement by Kohenkatz · · Score: 4, Interesting

    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.

  4. Defaults still insane? by Guspaz · · Score: 4, Informative

    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.

    1. Re:Defaults still insane? by PhrstBrn · · Score: 2

      The defaults are fine if all you do is serve up static files, which is all Apache can really do out of the box. It's when you start adding modules like mod_php that you need to start cranking MaxClients and the like down.

    2. Re:Defaults still insane? by Guspaz · · Score: 2

      Unless I'm way off the mark, the vast majority of Apache out there (particularly in the environments I mentioned earlier) are running some sort of dynamic module like mod_php.

    3. Re:Defaults still insane? by Guspaz · · Score: 3, Informative

      There are a handful of workloads that can justify that sort of concurrency, but they're few and far between. Web applications with persistent connections (which you're obviously not doing with that amount of RAM), or serving up large files for download, that sort of thing. The typical case of a LAMP stack almost never requires it, and enormous loads can be handled with levels of concurrency orders of magnitude smaller than what you've got.

      People normally thing they want to handle tons of people at the same time, but handling 10x more client requests simultaneously typically means each one takes 10x longer to process; there's no performance advantage, and all you've managed to do is burn RAM.

      I won't say that your workload doesn't justify that sort of concurrency, because I don't know what your workload is, but 150 is not a reasonable default for the vast majority of applications. Certainly not for most LAMP installations, where 512MB of RAM is typical, and more than a gig or two is rare.

    4. Re:Defaults still insane? by PhrstBrn · · Score: 2

      How is that the responsibility of Apache? If the problem is mod_php, then the installation docs/installer for mod_php should be telling you to crank the MaxClients down.

    5. Re:Defaults still insane? by silas_moeckel · · Score: 2

      By insane you mean low? 16GB of server ram in a hundred and some bucks. 150 is pitiful try adding at least one zero. Stop buying cheap virtual or low end desktops somebody calls a server and you will not have any issue with the default settings. These numbers were low a decade ago and have not changed since.

      --
      No sir I dont like it.
    6. Re:Defaults still insane? by Guspaz · · Score: 2, Interesting

      Yes, I do actually. Most Apache installations are going to be at dedicated and VPS server hosts, due to the sheer number of customers in that market, and they're typically going to have tens of thousands of servers with far far less than 10GB of RAM.

      150 max clients is enormously too high for a LAMP stack, or serving static content (unless you're dealing mostly in very large files). Most cases where I see people running that sort of concurrency with enough RAM to back it up are caused by people misconfiguring their server and throwing more RAM at the problem. They see that they're running out of RAM because Apache is sucking it all up, so they throw more RAM and concurrency at the problem. Meanwhile, for dynamic load, you probably don't want more than 8 to 12 concurrent users on a quad-core server for a typical PHP web application, since beyond that and you're just throwing RAM at the problem without improving performance.

    7. Re:Defaults still insane? by Pionar · · Score: 2, Insightful

      From reading your post, it seems that the biggest cause is people trying to run web servers who don't know how to and probably shouldn't be.

    8. Re:Defaults still insane? by Guspaz · · Score: 2

      I wasn't aware that the world's largest server providers were "my mom's basement". If so, perhaps I should move back home, because that sounds like a fucking awesome basement.

      For every enterprise customer like you with big iron, there are many more smaller servers. It's like the graphics card industry. Enthusiasts drive the high-end cards, but the vast majority of the market (and profit) is made off the average customer and their iGPU or other low-end part.

    9. Re:Defaults still insane? by Guspaz · · Score: 2

      Actually, you might argue also that it's the distro's fault, since they typically determine the defaults deployed applications will use.

    10. Re:Defaults still insane? by DuckDodgers · · Score: 3, Insightful

      If you're running your own machines, maxing out the RAM makes sense. It's a one time cost and the ongoing cost to power and cool the added memory is negligible next to the rest of your budget.

      But if you're renting capacity from a virtual hosting provider, adding more RAM sends your monthly costs through the roof. Since tens of thousands of little websites run in that type of environment, it's a serious problem for a lot of low and lower-middle tier companies. I'm starting to think cloud hosting for small companies only makes sense financially if they write all their server code in C and C++. (Scary)

      I don't think it really matters what Apache makes the defaults, as long as there's plentiful, clear documentation on what the configuration parameters mean and how to make an educated guess as to what values you should set for your own deployment.

    11. Re:Defaults still insane? by spacey · · Score: 2

      My point is that those "bunch of tiny servers" vastly outnumber the "real enterprise applications".

      Shouldn't your hosting provider be doing this for you, or shouldn't you be doing this on install? This thread has been going on and on over a handful of config options. So you need configuration management. The apache config is flexible enough and unlike sendmail completely readable and comprehensible.

      --
      == Just my opinion(s)
  5. A bit bitter are we? by PhrostyMcByte · · Score: 4, Informative

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

    1. Re:A bit bitter are we? by phantomfive · · Score: 2

      They probably feel like Nginx got its reputation as fast from tests and benchmarks that aren't relevant in the real world. That kind of thing does happen a lot in the benchmarking world, but coming up with something better can be hard. Notice also his emphasis on 'true performance' and 'real world performance.'

      --
      "First they came for the slanderers and i said nothing."
    2. Re:A bit bitter are we? by VGPowerlord · · Score: 2

      no, it isn't right to use these quotes when Apache 2.2 (which is what is currently available for production) gets destroyed by nginx / lighty in specific tasks by upto 800%.

      Apache 2.4.1 is the version currently available for production, but don't let pesky things like facts stop you.

      --
      GLaDOS for President 2016! "Well here we are again. It's always such a pleasure." -- GLaDOS, 2011
  6. Re:First post by Anonymous Coward · · Score: 5, Funny

    You must be nginx with such a fast response.

  7. Re:Apache Never Again by 0100010001010011 · · Score: 2, Insightful

    Quick translation into English: "I like my sendmail-esque configuration just fine. It's job security."

  8. What we need by Anonymous Coward · · Score: 4, Interesting

    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.

  9. Re:Apache by Lucky75 · · Score: 2, Funny

    What about easy?

    --
    DNA -- National Dyslexic Association
  10. Re:Apache Never Again by OliWarner · · Score: 5, Interesting

    I think this is a fairly common sentiment towards Apache from developers who have to deploy their own stuff. I've certainly been in that camp more than a few times in the past. We're talking about:
      - RAM usage
      - Just being slow to push out simple files
      - mod_php being the worst thing ever written
      - mod_python disproving the last statement and taking the crown
      - Various FastCGI/WSGI toolchains just not being up to scratch either.

    I moved to nginx and Cherokee and suddenly configuration was both compact and modular and the settings seemed to make a real difference. RAM usage is completely minimal and performance is scorchingly hot. In more than one case I took an Apache box, switched Apache out and we were using half the RAM for the same jobs, and getting better performing websites, with less configuration.

    I'm certain Apache could have been tuned but I don't think it's unreasonable for a developer to blame the software if you have to do a three year BSc in Apache Administration just to get something equivalent to 30 minutes playing in nginx.

    I truly do hope that things are improving (competition is key in this environment!) but now I've left Apache on multiple servers, they're going to need to do more than just say "If you tune it, it can now match nginx speed", because my time is valuable too. I'm not going to jump back in until for most deployments it "just works".

  11. Re:Apache by Anonymous Coward · · Score: 5, Funny

    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.

    Well, I like my http servers like I like my women: fast!

    I too like my webservers like I like my women: Insecure and full of holes waiting to be exploited. That's what I run Microsoft's IIS.

  12. Re:Wishfull thinking by cababunga · · Score: 2

    There, in fact, is a very good reason for that. The very fundamental architectural decision (although very common in those ancient times) of spawning one thread/process per client connection has to be changed first, before Apache can take on Nginx. That means complete rewrite; and result will not be Apache anymore.

  13. Fixes I'd rather have by Skapare · · Score: 3, Interesting

    I'd rather have better control features, such as completely redoing the vhost matching method.

    --
    now we need to go OSS in diesel cars
  14. Re:Apache Never Again by hcs_$reboot · · Score: 3, Interesting

    Nginx is not only the performance, it's also the configuration syntax ; everything looks much more professional, concise, and logically designed.
    The code also deserves a special mention: it's like when you look under the hood of your car/computer for the first time, where everything is clean, all cables are numbered and arranged meticulously. This is a good old C code that doesn't need extra comments to be understood.
    Apache improved? Show me the comparison charts between Apache and Nginx, in a many-users multi-cores-cpus and loaded configuration. To be honest, even if Apache would be a bit faster using a bit less memory than Nginx (while I have some doubts about that), I'd still be reluctant to go back to Apache and its setup.

    --
    Slashdot, fix the reply notifications... You won't get away with it...
  15. Re:Wishfull thinking by Skapare · · Score: 2

    And how would you do it w/o one thread or process per client? Multiplexing?

    We actually need multiple web server models. Processes are needed for multi-user environments for security reasons. But that impacts performance for single-user environments. OTOH, Apache does process based stuff all wrong, too (they do execve() for CGI and that is where the performance dies).

    --
    now we need to go OSS in diesel cars
  16. Ubuntu vs Gentoo by inhuman_4 · · Score: 5, Insightful

    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.

  17. Re:Apache Never Again by C_Kode · · Score: 2, Interesting

    I struggled with Apache 2 for at least 4 years before switching to NginX. It was the best thing I ever did.

    You struggled to use Apache?

    I appreciate you telling me this. You've enlightened me to add something to my hiring practices. Now I know to ask a simple Apache configuration question when I Interview someone. I definitely don't want to hire someone that has trouble using something as simple as Apache.

  18. Re:Apache Never Again by X.25 · · Score: 2

    I'm certain Apache could have been tuned but I don't think it's unreasonable for a developer to blame the software if you have to do a three year BSc in Apache Administration just to get something equivalent to 30 minutes playing in nginx.

    I truly do hope that things are improving (competition is key in this environment!) but now I've left Apache on multiple servers, they're going to need to do more than just say "If you tune it, it can now match nginx speed", because my time is valuable too. I'm not going to jump back in until for most deployments it "just works".

    What makes you think that extremely complex piece of software is supposed to be easy to setup, by just about everyone?

    Developers can do their development on default setup, I don't see a problem with that.

    If you need to use it on production setup (or replication of production setup), then get people who know what they're doing to configure it.

  19. Performance? RAM usage? by GioMac · · Score: 2

    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)
  20. Re:Apache Never Again by Anonymous Coward · · Score: 5, Insightful

    +1. Really, it's not even about performance or that Apache guys are bad at software. Far from it. The real crux is that Apache has become the Kitchen Sink of webservers. It can do *anything*, and there's always a complexity cost for that. Nginx can't do everything, but it's a really efficient and minimalist implementation of what 97% of modern deployments actually need, and none of the things they don't.

    In some meta-sense, all software goes through this cycle: You're the best, everyone uses you, everyone files niche feature requests, you actually implement all of the niche features, and next thing you know 10 years later you're the Kitchen Sink implementation of domain X, and someone comes along and throws out all the irrelevant bullshit and makes a leaner implementation of just what matters *today*.

    IMHO, the answer is that dropping features needs to be as easy as adding them. Too many software projects/architects have an easy-in, hard-out policy on features. "We can't drop feature X, it's been there for years and some crazy people in siberia still use it". It's ok to drop features on major-cycle releases. Perhaps even necessary for long-term project health.

  21. Re:Apache Never Again by TheNinjaroach · · Score: 3, Insightful

    I definitely don't want to hire someone that has trouble using something as simple as Apache.

    Holy crap, do you even use Apache? At my job, I get to roll my own from source and I own every line of httpd.conf and each of our vhosts.

    Simple is not the word I would use to describe it. "Specialized" is much more like it.

    --
    I went to eat some animal crackers and the box said, "Do not eat if seal is broken." I opened the box and sure enough..
  22. Re:Apache Never Again by Anonymous Coward · · Score: 2, Insightful

    I think another problem is that every apache install I've seen (that I didn't set up myself) was basically the default config with every module enabled and stuff tossed in or commented out in a spaghetti clusterfuck.

    I think that may speak more about the sort of jobs you get hired for and the people you work with, rather than Apache itself.

    The Apache configuration layout that Debian uses combined with Puppet or Chef is goodness.

  23. Re:Apache Never Again by Just+Some+Guy · · Score: 2

    Apache is "simple" in the same way that PHP is: it has excellent documentation because it has to or else no one would ever be able to use it. I've been using it professionally since the late 90s and am reasonably happy and comfortable with it, but I still have to RTFM every time I want to do something non-trivial.

    --
    Dewey, what part of this looks like authorities should be involved?
  24. Re:Apache Never Again by hawguy · · Score: 3, Insightful

    What makes you think that extremely complex piece of software is supposed to be easy to setup, by just about everyone?

    What makes you think everyone needs an extremely complex piece of software when their needs are often quite simple?

    Apache is big and complex, nginx is small and simpler. Often one works better than the other for a particular person's needs. If someone finds Apache difficult to set up and finds nginx to be easier, then telling him to get someone to set up Apache is not the answer since he already already has the answer he is looking for. If Apache wants to be that answer too, then they need to find a way to simplify configuration.

  25. Re:Apache Never Again by SausageOfDoom · · Score: 2

    I don't think the op was saying that, just that switching to nginx was a significant improvement over Apache.

    At one place I worked, I increased our server capacity by 3 times, simply putting nginx in front of apache as a reverse proxy. Another place I replaced apache with nginx and cut memory requirements by over half. There are some things nginx doesn't do well, but nginx is so good at what it does it's still worth using the two together.

    From my reasonably extensive experiences with both, Apache comes across as a slow lumbering juggernaut designed to do everything, no matter the cost, whereas nginx was designed with nothing but speed and efficiency in mind.

    I'm sure Apache can improve, but short of a total rewrite reflecting a change in their approach, I'd be doubtful it can overtake nginx.

  26. Apache MPM Worker + FastCGI with fcgid by kbahey · · Score: 2

    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.