Are you wondering how OpenLiteSpeed stacks up against NGINX and Apache? In this article, we’ll be tackling a question our team gets asked frequently: How does OpenLiteSpeed compare to NGINX and Apache? 

With our recent launch of OpenLiteSpeed support for everyone using RunCloud to manage their cloud infrastructure, deploying WordPress on OpenLiteSpeed is now just as easy as deploying on NGINX servers. But, how do you choose the best option for your specific needs?

Don’t worry, we’ve got you covered. In this in-depth discussion, we’ll be taking a closer look at each server stack, including benchmark and testing data, and sharing our thoughts on their performance and resource usage. And while all of these server stacks have established themselves as reliable options in terms of support and security, the real deciding factor comes down to speed and performance at scale. So, let’s get started and see which server comes out on top!

TL;DR – OpenLiteSpeed vs. NGINX vs. Apache 

When it comes to performance & scalability – NGINX and OpenLitespeed are both considerably better than Apache as has already been proven by countless performance tests. 

So stay tuned, in this detailed breakdown – we’ll be focusing on comparing the OpenLiteSpeed and NGINX stacks running two identical versions of a website on a virtual private server on Google Cloud Platform in the exact same location with identical configuration.

What is a Web Server? 

A web server is a software that receives HTTP requests from clients (such as web browsers) and sends back the corresponding HTML pages or other resources. It is responsible for hosting and serving web pages and files to users over the internet or intranet. 

Just like a computer, a web server has both software and hardware components working together. Fortunately, thanks to companies like UpCloud, Hetzner, Vultr, Linode & more – the hardware is taken care of for us – while still having the flexibility and freedom to customize your server to suit your needs if you’re deploying with a platform like RunCloud

What Are The Most Widely-Used Server Stacks? 

Apache HTTP Server

Since its introduction in 1995, Apache has cemented itself as the most reliable open-source web server. In fact, nearly 33% of websites around the world run on Apache because of the advantages it offers, which include stability and flexibility. Most developers still use Apache servers up to this day in implementing older applications.

NGINX

As the number of web users continuously increased over the years, various web servers also emerged. Among them was NGINX, which was introduced in 2004. NGINX’s high performance has led many developers to ditch Apache in favor of it. At present, 34% percent of websites around the world use NGINX.

Compared to Apache, NGINX is lighter and better at handling concurrent connections. Furthermore, it allows websites to run faster, which helps them achieve higher rankings on Google.

OpenLiteSpeed Web Server

Another web server that was introduced in 2003 is LiteSpeed. A free version called OpenLiteSpeed was just recently made available to the public for both personal and commercial use. What makes this web server popular is its implementation of a powerful cache engine that optimizes websites at a remarkable rate.

OpenLiteSpeed has some similarities with Apache in terms of its usability. It also uses many of the features that Apache users are already familiar with, such as .htaccess. As for the performance, OpenLiteSpeed resembles the asynchronous event-driven approach of NGINX, so it’s also fast.

Although OpenLiteSpeed is new to the market, it is quickly catching up to Apache and giving Nginx a run for their money. 

Our Testing Environment

All of our tests were run using the standard, VPS server on Google Cloud that features:

  • Ubuntu 22.4 LTS
  • 2 CPU Core
  • 25 GB of Storage
  • 4 GB of RAM
  • US Central Location

Before we get into the test, it’s already worth mentioning that – when running, on average – OpenLiteSpeed had lower memory usage and slightly lower disk usage for the same web application compared to NGINX. 

OpenLiteSpeed Environment

The OpenLiteSpeed test site was running LiteSpeed’s official caching plugin for WordPress and was an otherwise standard, regularly deployed site with no further optimizations.

OpenLiteSpeed Environment

NGINX Environment

The NGINX test site was running RunCloud Hub with FastCGI Caching enabled. 

configuring runcloud hub with nginx

NGINX vs. OpenLiteSpeed – Core Web Vitals

In case you’ve missed the news, Core Web Vitals are Google’s new performance metrics aiming to truly evaluate the user experience of websites beyond technical metrics. GTmetrix now uses some of the new Core Web Vitals metrics (as well as non-core web vital). 

This distills down to the three primary performance metrics: 

  1. Largest Contentful Paint (LCP) which measures loading performance. In order to provide what is considered a good user experience, LCP should occur within 2.5 seconds of when the page first starts loading. 
  2. Total Blocking Time (TBT) which is a non-Core Web Vital that measures the total time in milliseconds between the First Contentful Paint (FCP) and Time to Interactive (TTI) where the main thread is blocked long enough to make it unresponsive to user input. 

Cumulative Layout Shift (CLS) which measures visual stability. To provide a good user experience pages should maintain a CLS of 0.1 or less.

three primary performance metrics openlitespeed vs nginx vs apache

As you might have guessed & is only reasonable for performance metrics aiming to evaluate true performance for users, these are heavily dependent on the sites themselves as opposed to just the technical responses from a server. This also forms a part of why these tests were performed with the help of one of our customers so that we wouldn’t be using some demo site that isn’t truly indicative of a real business’s website hosted on a server managed by RunCloud.

NGINX & OpenLiteSpeed – GTmetrix Performance Test

In the GTmetrix performance tests, NGINX and OpenLiteSpeed had relatively similar performance. With both performing well, having the same total blocking time, and negligible difference in cumulative layout shift score – the key difference being the largest contentful paint being significantly lower/better (-75ms+) for OpenLiteSpeed.

NGINX & OpenLiteSpeed – GTmetrix Performance Test

In other web vitals like First Contentful Paint, Speed Index, Connection Duration, etc. OpenLiteSpeed generally performed better than NGINX across the board. NGINX comes on top in only two metrics – Connection Duration and Fully Loaded Time.

gtmetrics results nginx vs openlitespeed

NGINX vs. OpenLiteSpeed – Load Testing

For this next test, we ran a website load test. The purpose of which is to evaluate website performance at scale – i.e. what happens to performance as the number of requests scales. 

Learn more about website load testing & how to perform your own tests here. 

For these website load tests, we really pushed the limits of the servers. We launched 40 bots from north-america-7 location, playing a testing script, ramping up naturally for 1 minute, then continuing at peak load for 3 minutes, then ramping down naturally for 1 minute with no iteration limit per bot and no iteration limit total.

We also ran a load test using K6 to see if there was a difference in performance when requests come from the local network instead of the internet.

Results For OpenLiteSpeed

OpenLiteSpeed had the mean response time of 0.154s and the 90th percentile time of 0.180s – achieving an average throughput of 26748 hits during the first test.

nginx vs openlitespeed load testing Results For nginx

During this test, the response time slightly fluctuated, but OpenLiteSpeed got the overall 99th percentile time of 0.248s which is pretty good.

response time percentiles results

In our second test, OpenLiteSpeed completed 149474 requests with 0 errors, thereby achieving a throughput of 496.5 requests/second.

openlitespeed requests results

Results For NGINX

NGINX on the other hand had the average response time of 0.142s and the 90th percentile time of 0.165s. It achieved an average throughput of 26880 hits during the first test.

nginx vs openlitespeed load testing Results For OpenLiteSpeed

We see a slight bump in the response time percentiles but except that, the graph looks pretty flat. This is good as it means almost all requests took roughly the same amount of time to finish.

response time percentiles results for nginx

In the second test, Nginx was able to serve 149216 requests which resulted in a throughput of 495.7 requests/second.

nginx requests and errors results

Which One Is Better?

In our two tests, OpenLiteSpeed lost one round by a margin of 0.49% and won another round by a margin of 0.17%. The difference in measurements is insignificant and the fluctuations can be attributed to randomness in the environment. After analyzing the results, there is no clear winner. Enabling the FastCGI Caching on Nginx makes it just as performant as OpenLiteSpeed.

OpenLiteSpeedNginxDifference
TEST 12674826880-0.491%
TEST 21494741492160.172%

Other Factors To Consider

There are many other factors to consider besides raw performance and benchmark numbers before deciding which server to use.

  1. Stability and reliability: NGINX and Apache have been around for a long time, and are known for their stability and reliability. They have a large user base and a proven track record of handling high traffic and large numbers of concurrent connections.
  2. Community and support: Both NGINX and Apache have large and active communities of users and developers. This means that if you run into issues or have questions, there is a wealth of information and support available.
  3. Compatibility: Both NGINX and Apache have large support for multiple web applications and frameworks, which means that they are compatible with a wide range of software, making it easy to integrate with other tools in your stack.

NGINX vs. OpenLiteSpeed vs Apache – Frequently Asked Questions

What does a web server store?

A web server generally stores all the resources of a website, such as HTML files, CSS, images, JavaScript files, and other assets. 

What’s the fastest web server for WordPress?

According to various performance tests, OpenLiteSpeed and NGINX compete neck and neck. Both are high-performing and a go-to solution for hosting WordPress websites.

Is Apache still used?

While Apache is now considered archaic, many developers still use it because of its wide community and support. Apache is the easiest to configure among its contemporaries in a variety of usage scenarios. 

Is NGINX better than Apache for WordPress?

Based on all performance testing data available from our own tests as well as other tests performed by people in the industry, NGINX came out on top, yes. 

Is OpenLiteSpeed better than NGINX?

Based on all performance testing data available from our own tests as well as other tests performed by people in the industry, OpenLiteSpeed and NGINX perform equally well. Both are incredibly performant stacks, and can handle large amounts of traffic easily.

After Action Report – Finding The Best Server Stack For You 

OpenLiteSpeed has a better TTFB & Largest Contentful Paint (LCP) and has demonstrated a clear ability to handle a very high number of concurrent users. NGINX has been around for longer and has a more mature ecosystem but requires additional configuration to setup caching and achieve desired performance. Not enabling the cache would impact the performance severely – a difference which could equate to infrastructure savings on a large scale.

And that’s not all – there are tons of other reasons you may prefer OpenLiteSpeed over NGINX: 

  • Performance out of the box (very little configuration needed to get excellent results)
  • Free powerful, extremely well-maintained WordPress caching plugin
  • Understands Apache rewrite rules
  • Lower server costs (thanks to OpenLiteSpeed’s event-driven architecture)

All in all, if you want to know for certain – our best advice is always to test for yourself! And fortunately, deploying an additional server with the help of RunCloud and cloning your existing site onto the new server is a piece of cake. Sign up for a free trial of RunCloud today.

If you have any other questions about how NGINX compares to OpenLiteSpeed and how to make your choice – feel free to leave a comment below & join the conversation.