Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Why do people still use apache instead of fast and lightweight nginx? - Page 3
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Why do people still use apache instead of fast and lightweight nginx?

13»

Comments

  • jsgjsg Member, Resident Benchmarker
    edited May 2020

    @Abdussamad @TimboJones

    Feel free to call it anyway you like but apache config files do have a branch [branches] leaf structure where the branches are expressed in an XML notation like

    <branchA>
       <sub-branchX>
       </sub-branchX>
       <sub-branchY>
       </sub-branchY>
    </branchA>
    
    <branchB>
    </branchB>
    

    But the leafs are not XML like - which actually makes the whole thing ugly and more complex to parse.

    nginx on the other hand has a cleaner config syntax similar to curly braces languages with {} basically indicating line (rather than comma) separated lists of elements and each element being structures like 'id arg [args];'. Note that this also holds true for lists ("sections") just that the args are elements themselves.
    May look similar but internally are quite different things.

    Plus nginx adheres to the "do one thing, one thing only, and do it well!" rule while apache links in whole language processing mechanisms.

    Thanked by 1Shahbaazboom
  • tdwuktdwuk Member

    I have always had apache hosting. I recently signed up to runcloud and opted for nginx with apache for .htaccess.
    All my sites are starter WP sites, I am a bit familiar with .htaccess so I just went for the easy option.
    Is there really a massive performance increase in favour of Nginx?

  • @tdwuk said:
    Is there really a massive performance increase in favour of Nginx?

    Not anything you will notice especially with WordPress sites. Your bottleneck will be PHP, plugins, themes, etc.

  • Isn't it true that NGINX is almost twice as fast as Apache? And its overall speed and efficiency is better when it comes to static content? So if speed and efficiency is a credible parameter taken into account, why not a preference for NGINX in the market over APACHE? Is apache the 'legit' server for developers? Does it get experience or 'loyalty' credibility?

  • nemnem Member, Host Rep

    Shahbaazboom said: Isn't it true that NGINX is almost twice as fast as Apache?

    And its overall speed and efficiency is better when it comes to static content?

    Therein lies the nuance.

    Yes, it is faster for static content, but when dynamic content takes 300x as long to load, it levels the playing field. The static benefits get marginalized and it comes down to familiarity and accessibility. You're best off configuring a server you know how to use.

  • Since Nginx does not have an equivalent to the .htaccess file (i.e. no directory level configuration files), you need to update the main configuration and reload nginx for any changes to take effect.

    I don't need some developers bugging me all the time to update the nginx config.

    And, ofcourse the php-fpm configuration is pain in the a**.

  • rcy026rcy026 Member

    @Shahbaazboom said:
    Isn't it true that NGINX is almost twice as fast as Apache? And its overall speed and efficiency is better when it comes to static content? So if speed and efficiency is a credible parameter taken into account, why not a preference for NGINX in the market over APACHE? Is apache the 'legit' server for developers? Does it get experience or 'loyalty' credibility?

    Speed and efficiency with static content is rarely a problem, so nobody really cares.

    It's like comparing two cars, one with 1000 hp and the other with 1100 hp.
    I really couldn't care less because I need maybe 150 hp to get to work so everything above that is just...meh. Instead you look at other factors such as how comfortable and safe the car is.
    The Apache vs nginx is exactly like that. The nginx advocates keep screaming about performance and efficiency, while most people still running Apache really doesn't give a shit about it because it has never been a problem. Apache is fast enough, and its more comfortable then nginx because they are already familiar with it.

    I run lots of websites, both nginx and Apache, and to be honest performance is rarely an issue, and webserver performance never is. If there is a bottleneck, its usually database backends or php/python/perl or whatever. I will not switch a working Apache environment to nginx to save maybe 1/1000 of a second on each request, when the request still takes 1-2 seconds to perform due to backend issues. With that being said, I would not switch a working nginx environment to Apache either, since it would most likely gain me nothing.
    Use whatever gets the job done and makes you feel comfortable.

    Thanked by 4pbx NanoG6 nem fpmagic
  • spareksparek Member

    @rcy026 said:
    Speed and efficiency with static content is rarely a problem, so nobody really cares.

    It's like comparing two cars, one with 1000 hp and the other with 1100 hp.
    I really couldn't care less because I need maybe 150 hp to get to work so everything above that is just...meh.

    But, but, but... all the blogs say speed is important and nginx is better. You dare defy the blogs with common sense?

  • RedSoxRedSox Member
    edited May 2020

    @rcy026 said:

    @Shahbaazboom said:
    Isn't it true that NGINX is almost twice as fast as Apache? And its overall speed and efficiency is better when it comes to static content? So if speed and efficiency is a credible parameter taken into account, why not a preference for NGINX in the market over APACHE? Is apache the 'legit' server for developers? Does it get experience or 'loyalty' credibility?

    Speed and efficiency with static content is rarely a problem, so nobody really cares.

    It's like comparing two cars, one with 1000 hp and the other with 1100 hp.
    I really couldn't care less because I need maybe 150 hp to get to work so everything above that is just...meh. Instead you look at other factors such as how comfortable and safe the car is.
    The Apache vs nginx is exactly like that. The nginx advocates keep screaming about performance and efficiency, while most people still running Apache really doesn't give a shit about it because it has never been a problem. Apache is fast enough, and its more comfortable then nginx because they are already familiar with it.

    I run lots of websites, both nginx and Apache, and to be honest performance is rarely an issue, and webserver performance never is. If there is a bottleneck, its usually database backends or php/python/perl or whatever. I will not switch a working Apache environment to nginx to save maybe 1/1000 of a second on each request, when the request still takes 1-2 seconds to perform due to backend issues. With that being said, I would not switch a working nginx environment to Apache either, since it would most likely gain me nothing.
    Use whatever gets the job done and makes you feel comfortable.

    Apache is an old nag that is comparable to a car that goes 40 km per hour, it is good and comfortable because you've known it for a long time and learned from cover to cover. While Nginx is a modern machine that can transport you from point A to point B at a speed of 60 to 120 km per hour and yes it is also comfortable and nice. Apache has been dominating for years, but as you can see, its domination's over

    Use whatever gets the job done and makes you feel comfortable.

    That's where I totaly agree with you.

  • fpmagicfpmagic Member
    edited May 2020

    Most developers and hosting consumers and companies just don't have any empathy with computers so this whole nginx vs apache vs caddy vs litespeed continues. It's like comparing cars based on tires installed out the factory, unless you're in that niche of vertical scaling and performance demands means you have a devops teams in double digits then you're definitely focusing on the wrong area. Your GET / does 20+ sql queries and you're getting into debates on the webserver performance (essentially a proxy) of static assets in terms of req/sec, shitty apache 2.4 can only do 8k req per sec? and nginx can do 30k? doesn't really matter when you serve only 100k page views a day on every hit is sql query mania via phpbb, joomla, wordpress, or whatever.

    Directly on this old snakeoil ~"buy my wordpress hosting we use nginx//lightspeed" in 99.9% cases it is not the 50 requests for static assets per request that is causing problems, or slowaris attacks, but the primary request that takes 200ms of compute time distributed across php and mysql combined with io in there pushing ttfb to over a second, your hand off to php or php pooling technique weather its php-fpm or lightspeed own just doesn't really matter with the top 10 php apps. Any gains people have my moving from apache to nginx are generally attributed to change in other conditions (a new host with different loads, different versions etc...). Threads aren't are evil as they once were, and you ain't hitting those scaling issues yet because you wouldn't be discussing them here, and whilst I have no qualms with the benchmarks showing nginx as more performant in 10k+ challenges and so forth it's doesn't apply to 99.999% of LEB users and hosts.

    tl;dr - nginx and lightspeed won't save your arse. and they havent before. but it sells - anyway to repackage shitty cpanel hosting for more than a dollar month has to be worth it.

    psst. I use nginx to proxy pass to a number of backends but I could of easily used apache without any loss of sleep.

    Thanked by 2pbx webcraft
Sign In or Register to comment.