I have read many of the Reddit discussions and also seen a lot of passion arguments in Facebook groups about this during past few years so I want to share some research......
First, the list of popular server OS--
- Ubuntu Linux
- Debian Linux (parent of Ubuntu distro)
- CentOS Linux
- RedHat Linux
- Microsoft / Windows
w3techs.com/technologies/details/os-linux
tecmint.com/10-best-linux-server-distributions/
And, this will change soon cuz CentOS future is dim... probably will combine to RedHat. But talking about Linux then Ubuntu/Debian is so far ahead of the others, cuz they have so much trust with the community about package maintenance and support for many repos/apps. Some other distro like SUSE and Arch Linux are growing more popular for web servers lately.
Next I am listing most popular web servers--
- Apache (Apache2)
- Nginx
- Microsoft IIS
- Litespeed / Openlitespeed
- Lighttpd
- Caddy
[Microsoft IIS is mostly for some corporate purpose, like using ASPX and not PHP, that is because something like banks etc will want more private codebase.]
[Caddy is like copycat of Nginx but less features... only for low-traffic servers really. It seems useful if you want automatic Certbot and easy config.]
There are many rumors around that never stop. For example that Apache has no cache option which is not true (it has mod_cache and other options too... also Varnish is popular). I think many people believe Litespeed (inspired by Apache) is better cuz of caching, but seems a lot of bloggers don't even know that Apache has caching already. In my opinion and research the worst part about Apache and Litespeed both is the htaccess feature which causes so many problems. And what Litespeed tried to do was improve PHP handler with LSAPI and yes indeed that is good evolution, and also have a default cache option LSCACHE that is very similar to Varnish cache. But after HTTPS became common however than Varnish is bit frustrating to manage... for these reasons and because of aggressive marketing then Litespeed is getting much more popular in recent years.
httpd.apache.org/docs/2.4/caching.html
nystudio107.com/blog/stop-using-htaccess-files-no-really
danielmorell.com/guides/htaccess-seo/basics/dont-use-htaccess-unless-you-must
But, here is the problem. Because many fans of Litespeed don't understand backend dev and because Litespeed company is releasing some benchmarks claiming they are the fastest server (even more faster than Nginx and Litghttpd) then some people were getting annoyed by this because a lot of fans went around Reddit and Facebook to say Litespeed is the fastest no matter what.
reddit.com/r/selfhosted/comments/f06vse/litespeed_servers_seem_like_a_marketing_scam_are/
community.centminmod.com/threads/is-lsapi-litespeed-faster-than-php-fpm-nginx-etc-or-not.19153/
I mean I don't know who is starting this rumor but certainly if you setup your server badly it will be worse than Litespeed. But nearly every high traffic website on the internet is using Nginx for a reason, that is cuz it is very fast and reliable and has no htaccess vulnerability. Despite many discussion about this still I never found any benchmark that proves Litespeed is faster than Nginx... the only benchmarks saying that seems "anonymous" or contain no details about tests. Or the worst part is they disabled Nginx cache (FastCGI cache) but enabled LSCACHE... that is very unfair.
In fact seems the Wordpress community is the main community that is fans of Litespeed cuz of their partnerships with cPanel and shared hosting companies. I think that is great if they want to support the community but sharing dishonest benchmarks is hurting trust a lot.
w3techs.com/diagram/market_technology/ws-nginx
Moving to Nginx, we can see (link above) it is the clear winner for high traffic website who need scaling, and yes that includes Wordpress websites like New York Post that is using WordPress.com VIP hosting based on the Nginx web server proxy (and many others).
Also relevant.... WordPress.org officially recommends Apache and Nginx only.
[Also btw I think Lighttpd is the most underrated web server... before some massive sites like Mininova were using them for many years but their config is more confusing than Nginx so now their popularity has gotten less over the years even though it is still great software.]
Next we must talk about PHP handler--
- PHP-FPM
- LSAPI (LSPHP)
- HHVM (now dead...)
stackscale.com/blog/php-fpm-high-traffic-websites/
Now it becomes clear why Litespeed deserves some appreciation because both Nginx and Apache are using PHP-FPM as the favorite for many years already (FPM = FastCGI). At this point really LSPHP is the only true competitor these days with PHP-FPM when talking about PHP handling. But now cPanel and Apache still default mostly to PHP-FPM so who knows if LSPHP will remain Litespeed-only in the future or not... the truth is that working with FastCGI is now standard in the server industry and it is now better maintained than years ago, so probably PHP-FPM will be the king for a long time. (I'm glad we stopped Facebook from taking over the PHP handler market with HHVM.)
But I hope the community contributions for PHP-FPM gets bigger because it is still too small. The benefit to Litespeed users is they have server+handler sponsored by a big company, but that is also a weakness because they are seen as self-serving community.
Last and not least is the SQL database--
- MySQL
- MariaDB
- SQLite
- PostgreSQL
- Percona
logz.io/blog/relational-database-comparison/
news.ycombinator.com/item?id=26816954
The thing about databases is they are so political. MariaDB was started cuz they're scared Oracle will destroy MySQL, but that never happened. But MariaDB is more popular with the open source community because of transparency. SQLite is getting more popular lately, but database are something you want to ensure never have installation, duplication or compatibility issues. This is one reason why MySQL continues to lead the market, and MySQL even has sqlite module too these days. Everyone has a special situation that might change database preference, but the good news is that Ubuntu OS now supports MariaDB better in the repos than before... and others too, soon. And if we are talking about WordPress then really you don't need so many crazy SQL features.
So what is the best stack for WordPress lol
IF you ask me I will say:
Cloudflare (at least for DNS if you don't want other features... see dnsperf.com for why)
- Ubuntu LTS
- Nginx + FastCGI cache
- PHP-FPM + OPcache
- MySQL/MariaDB
- Redis (for object caching only... helps non-cached queries like cart/checkout)
- UFW firewall (included w/ Ubuntu)
- OpenSSL or Certbot (if you use Cloudflare you can use OpenSSL... amazing time saver)
- WP-CLI
- Git (if you need it)
- Composer (if you need it)
And remember, none of this matters if you don't choose good settings for each software or if you choose a bad quality datacenter (always use KVM servers these days). And esp. it will not matter if you do not optimize your Linux kernel for high traffic! And often it comes down to this......
wordpress.org/support/topic/fastest-wordpress-stack/
"the better software stack is the one you have most experienced with."
(took from another thread)
Open source software means millions of developers have a job, instead of just a few companies getting rich so always remember to contribute some time or donation if you can.
[–]BONEE[S] 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - (1 child)
[–]fschmidt 1 insightful - 1 fun1 insightful - 0 fun2 insightful - 0 fun2 insightful - 1 fun - (0 children)