A quick showdown between LiteSpeed and NGINX…two of the greatest high-performance web servers.
What’s the history behind LiteSpeed and NGINX? Which one is faster? Which one handles more traffic? Which one is better for you?!
Read on and find out…
Which one is faster? (OpenLiteSpeed or NGINX?)
I really intended for this guide to be comprehensive. I really did. I put together testing servers and everything. Signed up for different NGINX stacks and compared them against OLS. I’m just like you and everyone else. I wanted to know what their real-world performance was. How fast they were out of the box. I didn’t care about all the micro-improvements made to get there. I pit them side-by-side in the most unbiased controlled testing environment possible. I’m no expert but did my best to provide what I thought was fair testing. I also made benchmark charts and what not.
- Stacks compared – OLS running off CyberPanel vs 3 variants of NGINX (RunCloud, GridPane, SpinupWP)
- Datacenter – all were using Linode except for SpinupWP (using Digital Ocean) because setup was clunky with any provider other than DO. Sure, I could have figured it out but with the time I spent I can assure you most newbies won’t have been able to. So too bad!
- Stack configurations – all running the latest version of PHP 7.3, mariaDB, blah blah blah. RunCloud had a months-older PHP 7.3.4 (instead of latest PHP 7.3.8). I used out of the box configurations without trying to tweak or tune anything to their best settings. Whatever they came out of the box with is what they get.
- Caching configurations compared – OLS, I tested with LS cache on and off. NGINX, I compared with FastCGI caching on and off. GridPane only allowed REDIS object caching for the cheap plan so that’s what I tested. RunCloud, I couldn’t enable FastCGI caching after trying configurations for 30 minutes so too bad, I will assume most users won’t be able to either and I tested it without FCGI.
- Load test used – loader.io, I put 10,000 clients over 1 minute on GET method through HTTPS variant of the target site. Also re-ran things a couple times to make sure there were no outlier results.
Results & Final thoughts
“What?! Results already? Where the charts?”
I’m not even going to waste your time or anymore of mine. The benchmark charts don’t show anything useful.
- OpenLiteSpeed and NGINX are just about equal in performance with caching on.
1st place was GridPane (NGINX with Redis object caching)
- averaged 67ms out of 10k requests
- trying it with FastCGI caching was a hair slower (interesting since they say their FCGI caching is faster than Redis)
2nd place was OpenLiteSpeed on CyberPanel (with LiteSpeed cache enabled)
- averaged 68ms out of 10k requests
- so like 1ms slower than GP. It’s unnoticeable!
3rd place was SpinupWP (NGINX with FastCGI caching)
- averaged 70ms
4th place was RunCloud (NGINX without FastCGI caching)
- failed and could not handle after about 35 requests
- EDIT: Apr 2020 – RunCloud now uses their RunCache (I assume it’s FastCGI) and can now hold its own with all the rest.
I also tried all of them without caching on and all of them failed. Sure you can try in the browser on your own time to see which one is faster without cache but I lost interest at this point. NGINX and OLS are close enough in performance that it shouldn’t be the deciding factor between which one you use. Use the one the one that’s cheaper for you, more compatible with your applications/panels, offers you more features or more webhosting convenience.
So what does this test mean? That NGINX is marginally faster than OLS? Sure. That could be true. Or it could be that the NGINX stack was better configured. I’ll always have a massive preference for LS & OLS because of their LiteSpeed caching plugin. Tons of features, super stable, and integrates at the server level. NGINX has yet to have one and that sets it apart for me. Then factor in LS crawler features, htaccess compatibility, and it pulls ahead even further. Yes, NGINX is free but so is OLS (free version of LS).
Ha…looks like it’s time for you to play with them on your own. By all means, run your own tests and see what you like best. Anybody claiming one is incredibly superior than the other is either biased or hasn’t tested them side-by-side.
Want to read more on LiteSpeed vs NGINX?
- Learn the history of web servers