interactivated blog

magento & ecommerce

OpenLiteSpeed vs NGINX

Although NGINX has a lot to brag about, one of the most popular web servers on the market was bound to get some competition somewhere down the line. It finally happened, with the introduction of OpenLiteSpeed.

It is a hot new web server on the block that claims to offer much better performance than the typical, popular options. So, how does the new OpenLiteSpeed compare to the good old NGINX? Read on to find out.

Web server basics

Before moving on to learning more about these two web servers, we should first cover the web server basics. You probably already have a rough idea of what they are, but here’s the gist of it. A web server is a piece of software that is installed onto your existing server. It is responsible for handling all HTTP requests – receiving them, processing them, and sending the responses.

The story of NGINX

Released all the way back in 2004, NGINX is a web server that boasts excellent performance and reliability. It is very popular world-wide and it still used on millions of sites. The free, open-source version of the web server is called NGINX and it is the most common choice among its target crowd. There is also an enterprise version named NGINX Plus that boasts many more features. It is, of course, the paid version of the web server.

The story of LiteSpeed

To learn more about OpenLiteSpeed, let’s go back to 2003, a year before NGINX was released. Yes, LiteSpeed is an even older web server than its main competitor, NGINX. It is, however, important to note that LiteSpeed can replace Apache, another extremely popular web server.  It can also read and load .htaccess files.

So, what made NGINX more popular than LiteSpeed? Well, simply put, LiteSpeed isn’t free. The fact that it has existed as paid software for years has put it into 4th place on the market, which is decent but far from the top spot.

Recently, however, OpenLiteSpeed was released. It is a free, open-source version of LiteSpeed. Are its features limited compared to the paid version? Yes, they are. How does it compare to its open-source competitors, NGINX? Let’s find out.

The test

The best way to find out which server is a better choice is to run burst tests on both. The general idea behind this is simulating 10,000 requests with 100 concurrent users. This test comprises three “phases”. Each web server is put against a small static file. Then, it is tested against a basic PHP script. Finally, their WordPress performance is evaluated. Naturally, caching is very important with WordPress, so both servers need a fitting caching solution.

Small static file (around 4KB)

Small static files are great for measuring the response time of a server because they don’t require any processing. So, how did the web servers measure up? Well, compared to Apache, NGINX scored approximately 26,000 while Apache reached 12,400 requests per second.

That being said, OpenLiteSpeed managed to reach almost 40,000, ensuring an absolute victory in this part of the test. This tells us that OpenLiteSpeed has a much better response time than NGINX.

Basic PHP script

The best way to successfully isolate PHP-server communication from PHP processing is benchmarking a PHP app. In other words, this test shows how efficient the server is at communication with the PHP engine.

The app, “Hello World” which was used in this test, however, is by no means similar to the real-life conditions. Again, OpenLiteSpeed is unquestionably victorious here, with more than twice as many requests per second than NGINX and Apache.

WordPress and cache

Testing OpenLiteSpeed against WordPress is perhaps the most accurate test of how a web server performs in a real-world environment. Of course, WordPress is quite a weighty PHP app, meaning that a server needs good caching abilities.

It is important to note that each of the web servers was paired with a matching caching option. For instance, FastCGI Cache was used with NGINX, whereas OpenLiteSpeed was paired with LSCache. Apache was put against W3 Total cache, but it severely underperformed.

In this test, as the case was with the previous two, OpenLiteSpeed achieved an outright victory. It beat NGINX by more than 10,000 requests per second. It is easy to conclude that OpenLiteSpeed does a better job with heavy PHP apps, as well.

Test summary

Clearly, OpenLiteSpeed performs far better than NGINX and Apache. One thing to keep in mind, however, is that NGINX has been around since 2004. Although LiteSpeed was released a year earlier, it has remained a paid service for quite some time. This means that people have already gotten used to NGINX and that OpenLiteSpeed will have to go a long way to claim the throne of the free web server class.

Other features

Although benchmarking plays an essential role in comparing web servers, there are other features that you should pay attention before you decide. While it is true that OpenLiteSpeed outperforms NGINX when it comes to requests per second, it may or may not fall short in security and cost-effectiveness departments. Here’s more on that.

Security

Security is one of the most important factors to take into account when it comes to using anything on the internet. Malware, adware, and even ransomware threats are absolutely real and can ruin your website in the making, and even lose you some serious money.

This is why both NGINX and Apache support ModSecurity rules. Don’t worry because OpenLiteSpeed supports them too, but without a drop in performance. This is mainly owing to OpenLiteSpeed’s efficient implementation.

Additionally, OpenLiteSpeed comes with features that protect WordPress from brute force attacks and has reCAPTCHA support, as well as numerous anti-DDoS measures. So, how does OpenLiteSpeed compare to NGINX when it comes to security? It remains the best web server around in this department, as well.

Cost-effectiveness

NGINX is a free, open-source web server that has pretty much been at the top of its category for more than a decade. While LiteSpeed has been around for even longer, it was frequently avoided on account of not being free. However, with OpenLiteSpeed, it is easy to make your choice. First of all, it too is a free, open-source web server. Secondly, it outperforms its competition by a longshot. Finally, it makes for an easy upgrade.

The enterprise version of LiteSpeed is convenient and pricing levels are scaled according to the server size. This brings competitive prices, feature flexibility, and many other benefits to the table. The NGINX Plus version does exist, but it definitely doesn’t perform as well as LiteSpeed.

Final verdict

It seems pretty clear that OpenLiteSpeed is superior to NGINX at the moment. The former benchmarks much higher than the latter, outperforming it in small static file, basic PHP, and heavy PHP app tests. This alone would make picking OpenLiteSpeed a no-brainer for most people.

They, however, would be very wrong not to also consider security and cost-effectiveness. Unfortunately for NGINX, OpenLiteSpeed is a much better choice in these departments, as well. This web server uses ModSecurity rules, but without compromising the overall performance, which can’t be said for NGINX. Additionally, OpenLiteSpeed offers reCAPTCHA and many other security measures.

Finally, when it comes to cost-effectiveness, there really isn’t a better choice than OpenLiteSpeed. It is definitely the best around and its paid version, LiteSpeed, is the best in its own category. Also, you can easily switch from OpenLiteSpeed to LiteSpeed, in case you want to upgrade.

Web server showdown

OpenLiteSpeed and NGINX still remain at the top of the web server food chain. They both perform brilliantly and, although OpenLiteSpeed is more advanced, many still choose to stick with NGINX. In its own respect it, too, is a great web server option. That being said, it wouldn’t come as a surprise if NGINX introduced a new, advanced version in the near future. This is, in truth, the only thing that OpenLiteSpeed needs to worry about at the moment.

By interactivated • on April 14, 2019

Contact Us
Get in touch with a specialist
THE NETHERLANDS (HQ)
Herestraat 106, 9711LM,
Groningen (Netherlands)
+31 (0)50 711 9940
VAT: NL 852998521B01
Chamber of Commerce: 58348646
UKRAINE
Kostomarivs'ka 13,
61002, Kharkiv
SPAIN
Calle Jabea 18, 29631,
Benalmádena Costa (Malaga)

* Required Fields