LiteSpeed vs NGINX vs Apache: Web Server Showdown

Michael Thomas

Michael Thomas

If you’ve ever shopped around for web hosting, you’ve probably noticed various companies advertise what web server technology they use.

The most frequently used web server is perhaps Apache, but there are alternatives such as Nginx and LiteSpeed, both of which are gaining rapid market share. 

Which of these three web hosting options best fits your website? Comparing LiteSpeed, Nginx, and Apache to determine which is best for your website, this article will help you make an informed decision. We’ll cover their features, performance, and scalability so that you can decide whether LiteSpeed, Nginx, or Apache is suitable for your needs.

This article isn’t meant to be a technical head-to-head comparison, although we do have some benchmarks for you at the end. 

Let’s dive in! 

What is a Web Server?

Simply put, a web server is a software or hardware dedicated to running the necessary hardware that can satisfy client requests and deliver web pages to these clients. A web server can host one or many websites, depending on its hardware configuration. 

client is any device that can access the internet, such as a smartphone, smartwatch, IP Camera, laptop, or desktop computer, and request data from a web server, typically by using a web browser, like Chrome or Firefox, for example. 

Web servers have been around since the inception of the internet and the technology they use along with the content they serve has continued to evolve and shape the Internet we use today. The very first web server was a NeXT Computer workstation with an Ethernet setup at CERN in 1990 by Sir Tim Berners Lee, who is credited with creating the foundation and basis of the protocols comprising the Internet. 

1920px First Web Server
The world’s first web server, a NeXT Computer workstation with Ethernet, 1990. The case label reads: “This machine is a server. DO NOT POWER IT DOWN!!”

Web servers also run on much smaller pieces of technology. You’ve probably logged into your home router by opening something like http://192.168.1.1 in your browser to make changes to your WiFi Network Name or Password. That is a web server and it’s running on your home router. 

What Are The Top Web Server Technologies? 

LiteSpeed, Nginx, and Apache are the three most popular web hosting services. Learn more about these popular options and discover which offers the speediest performance. 

What is Apache?

Apache is one of the world’s most widely used open-source web servers. It is known for its stability, flexibility, and wide range of features and modules. According to W3Techs, Apache has around 36% market share as of September 1st, 2020. 

Created in 1995 by Rob McCool and Brian Behlendorf, among others. The name is a pun for A PatCHy server, as at its inception, Apache was based on some existing code, along with some perhaps “hacky or clunky” software packages, enabling it to run. Additionally, the name Apache was chosen out of respect for the various Native American nations collectively calling themselves Apache, who were well known for their war strategy and inexhaustible endurance. 

Apache’s dominance is no mere coincidence. Much of the software’s foothold was achieved because Apache is preinstalled on all major Linux distributions. This makes it easy to get up and running since it’s already installed. Let’s also not forget the primary protocol we use on the internet — HTTP — is synonymous with the name of the process under which Apache runs on Linux — HTTPD, aka the HTTP Daemon. 

What is NGINX?

Another increasingly popular web server is Nginx – pronounced as engine-x. NGINX is a high-performance, open-source web server designed to handle high traffic and requests. It is known for its speed, scalability, and robustness.

Created by Igor Sysoev and released in 2004, Nginx was created with the explicit goal of out-performing the Apache Web Server technology; it currently has around 32.5% market share and is growing. 

Out of the box and serving only static files, Nginx consumes much less memory than Apache and can theoretically handle four times as many requests per second. This is why it was initially used as a load balancer or reverse for busy websites. As the software evolved and the codebase grew, Nginx could fully replace Apache instead of just working alongside the webserver. 

What is LiteSpeed?

LiteSpeed Web Server, abbreviated as LSWS, is almost a newcomer to the webserver ‘scene’. 

LiteSpeed is a web server that provides speed and scalability for websites. It’s designed to be faster than Apache, the most popular web server software on the market. LiteSpeed allows users to fine-tune their website’s performance, like configuring options for caching, compressing, and security.

It has gained a vast, perhaps even cult-like following in the last few years among web hosting companies due to its efficiency. With its streamlined architecture, companies running LiteSpeed Web Server could (theoretically) double the maximum capacity of websites on their servers, assuming they were previously running Apache. 

Another key advantage of using LiteSpeed is its speed. With advanced caching techniques and an optimized codebase, it can deliver content up to 50 times faster than Apache. This makes LiteSpeed perfect for sites that get a lot of visitors or have many images and videos, as it will load pages quickly regardless of the amount of traffic.

Another benefit of using LiteSpeed is its scalability – meaning it can easily handle large amounts of traffic without slowing down or crashing due to overloads. This makes it an excellent choice for businesses that want to ensure their website stays available even during peak hours or when visitors suddenly spike.

Imagine if you are a web hosting company with 20 solid servers in your fleet running Apache, and each server could host 500 websites. That’s 10,000 websites max you could host. Then you come across LiteSpeed Web Server, which advertises the ability to double the capacity of your server fleet to 20,000 by installing the LiteSpeed web server? It’s a very tempting offer. 

 
Key Takeaway: LiteSpeed is a web server renowned for its speed and scalability, making it the perfect option for sites with large amounts of visitors. 

Internet Information Services from Microsoft

I would not remiss to mention Microsoft’s own Internet Information Services or IIS. At the same time, there’s nothing overtly wrong with using IIS you won’t find many web hosting companies using it. First of all, IIS only runs on Microsoft Windows Server which has (often, expensive) licensing costs and many hosting companies don’t want to spend the money. Second, IIS isn’t great for PHP-driven applications such as WordPress. While WordPress can run on IIS, it’s a painful setup that may involve actual witchcraft to get it running in the end, as PHP is currently not working 100% with the latest versions of IIS and WordPress. 

Microsoft’s IIS product is designed for corporations still running applications or websites in its proprietary ASP.NET code on which a lot of business software runs. It’s in the corporate business world where you will find a lot of IIS servers running these applications, often legacy applications from decades gone by, or sophisticated Intranet portals for employees. IIS is often paired with Microsoft Sharepoint, it’s a collaborative software suite, or Microsoft Dynamics, its ERP application. 

Comparing LiteSpeed vs Nginx vs Apache

The answer to this question isn’t an easy one. All three have advantages and disadvantages regarding performance, security, cost, and ease of use.

Performance-wise, LiteSpeed is the clear winner here. It’s known for its speed and reliability due to its built-in caching capabilities, which can reduce page loading times significantly. Nginx is also relatively fast but not as fast as LiteSpeed; however, it does offer more flexibility in terms of configuration options than Apache or LiteSpeed.

Apache is an excellent choice for Admins and Hosts who may want something that is very customizable as it has an extensive collection of precompiled modules that can be added. These modules range from anything such as authentication schemas to specific package support for PHP, TCL, Python, Ruby, etc… 

Apache is also reliable, stable, and regarded as beginner-friendly to users, setting it up for the first time. Because Apache is in such wide use, it receives security and feature updates frequently and there is a large base for support out there. 

Also, one important thing to remember – Apache runs applications that utilize CGI very well. While Nginx, for example, technically supports CGI scripts, setting it up isn’t easy. 

One feature of Apache that many criticize is using .htaccess files to control things like rewrites and search engine indexing. When these files are enabled, Apache has to navigate the entire directory leading back to the parent directory and execute the commands listed in each of these .htaccess files. As you can imagine, this increases load time and consumes server resources. 

Nginx on the other hand can work as a reverse proxy in front of an Apache, or as it’s own web server and does not have an equivalent feature for .htaccess files. Apps written in Python and Ruby are known to have high performance when running on an Nginx web server. With load balancers, some optimization, and Nginx, you might have a super high-performance setup. Nginx also has a reputation for being difficult to set up compared to it’s contemporary Apache. 

Comparing Nginx to Litespeed isn’t really fair or a great idea as while they are similar, they are both very specialized web server technologies. Nginx runs Ruby apps very well for example, while LiteSpeed has server-level caching + add on technologies like lscasche and lsphp which means apps like WordPress, MediaWiki, and Magento for example, run very well. 

In conclusion, when choosing between these three web servers consider what type of website you plan on running along with your budget and technical knowledge before making any decisions; after all, a stitch in time saves nine.

While you’re comparing web server technologies, you should compare us to your current host. See why our platform is consistent, reliable, and one of the fastest in the industry. 🤓 Check out our web hosting plans!

As a web host, the primary challenge we have isn’t things like blocking DDoS attacks and keeping our servers secure. That’s easy compared to keeping them from crashing due to too many concurrent visitors on one site eating up all the server resources, such as RAM and CPU. With Apache, that can happen real fast, especially with very busy websites, as each visitor to the site will cause the Apache server to open a new process chain on the server for that user for as long as they are on the website, whether they have requested these resources or not.

Sure, there are some modules you can enable in Apache, but using these can introduce other incompatibilities down the line or affect your ability to get a security update. Scary, right? Imagine your host not being able to update their servers because they have installed a very custom configuration that gives a small subset of their users higher performance, while the rest of their userbase doesn’t benefit from that configuration, and as a result, they can’t update, and your site is left exposed to a possible attack at the webserver level. Not cool man! 

This is but one of many other reasons why LiteSpeed Web Server has grown in popularity, especially among companies offering web hosting. As LiteSpeed is a drop-in replacement for Apache, Admins won’t need to spend much time on server maintenance. It also includes inherent protections from DDoS attacks by featuring bandwidth and connection throttling.

LiteSpeed’s WebServer product is also the only one on the market to fully support HTTP/3, which increases the effectiveness of client-server interaction. This means when your user’s web browser requests resources from your website, such as images and video, as well as text, they are done so in streams rather than pieces, and content is served as needed, versus all at once whether it was requested or not.

It’s like being able to have your cake and eat it too. 🍰 

Why Does ChemiCloud Run LiteSpeed?

We can offer our customers high-performance hosting while not using complicated, fussy web server module configurations. In addition, as we run LiteSpeed Web Server, you’ll be able to install apps like LSCache on WordPress and leverage the server-level caching. 

LiteSpeed Web Server is also a drop-in replacement for Apache and ships with cPanel. This means when we create a new server in a new location or for more capacity, the server won’t need custom configurations which could delay setup or introduce a possible security risk down the road. 

Exciting News: Introducing Our fastest WordPress Hosting stack 🚀 Ready for speed? Try it for just $1!

Additionally, the vast majority of our customers run their websites on PHP applications, such as WordPress or Joomla, and one key component of the LiteSpeed Web Server is lsphp, a process that bridges the connection of PHP applications to the Web Server. LSPHP is incredibly efficient at what it does, especially compared to it’s equivalent on Apache. 

In short, we utilize LiteSpeed Web Server to provide you with the best hosting experience possible. 

LiteSpeed vs Nginx vs Apache Benchmarks

We chose to use the ApacheBench application as our command-line-based benchmarking tool. The application is well established and documented and is a reliable test. You could replicate these results at home with our servers if you wanted to. While ApacheBench was initially created to benchmark and test Apache Web Servers, the application is suitable for testing on any web server, like Nginx or LiteSpeed. 

We also ran additional testing using GTMetrix, a well-established online website performance testing service. 

Our Test Environment

We wanted to be sure we tested using a configuration that was as equal and fair as possible. Each server was configured the same, save for its web server technology. Below are their configurations: 

We created 3 Cloud VPS instances in our Dallas server location. Below are their specifications:

Apache VPSLiteSpeed VPSNginx VPS
4 GB RAM4 GB RAM4 GB RAM
2 CPU Cores2 CPU Cores2 CPU Cores
Apache 2.4.46 (cPanel)LiteSpeed/5.4.10 Enterprisenginx/1.19.2
cPanel / WHMcPanel / WHMcPanel / WHM
PHP 7.4.117.4.117.4.11
PHP SAPI = fpm-fcgi enabledPHP SAPI = litespeedPHP SAPI = fpm-fcgi enabled
MariaDB 10.3.25MariaDB 10.3.25MariaDB 10.3.25

Our ApacheBench Configuration

The command we ran with ApacheBench was:

command ran: ab -n 2000 -c 100 URL

The above command set instructs Apache Bench to run 2000 requests concurrently with a maximum of 100 requests. 

Our ApacheBench Results

The results speak for themselves. The images below represent the benchmark results on each of the three servers: 

resptime

Requests Per Second Higher Is Better

Transfer Rate KB sec Higher Is Better

For transparency, I have also included the total output from the ApacheBench tool below for your review, should you be interested: 


Server Software: LiteSpeed
Server Hostname: litespeed.lcars.ch
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES128-GCM-SHA256,2048,128
Document Path: /
Document Length: 94906 bytes
Concurrency Level: 100
Time taken for tests: 2.606 seconds
Complete requests: 2000
Failed requests: 0
Write errors: 0
Total transferred: 190328000 bytes
HTML transferred: 189812000 bytes
Requests per second: 767.57 [#/sec] (mean)
Time per request: 130.280 [ms] (mean)
Time per request: 15.303 [ms] (mean, across all concurrent requests)
Transfer rate: 71333.46 [Kbytes/sec] received

Server Software: NGINX
Server Hostname: nginx.lcars.ch
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256
Document Path: /
Document Length: 94502 bytes
Concurrency Level: 100
Time taken for tests: 65.696 seconds
Complete requests: 2000
Failed requests: 0
Write errors: 0
Total transferred: 189398000 bytes
HTML transferred: 189004000 bytes
Requests per second: 350.44 [#/sec] (mean)
Time per request: 3284.801 [ms] (mean)
Time per request: 32.848 [ms] (mean, across all concurrent requests)
Transfer rate: 51435 [Kbytes/sec] received

Server Software: Apache
Server Hostname: apache.lcars.ch
Server Port: 443
SSL/TLS Protocol: TLSv1.2,ECDHE-RSA-AES256-GCM-SHA384,2048,256
Document Path: /
Document Length: 94603 bytes
Concurrency Level: 100
Time taken for tests: 86.838 seconds
Complete requests: 2000
Failed requests: 0
Write errors: 0
Total transferred: 189604000 bytes
HTML transferred: 189206000 bytes
Requests per second: 150.03 [#/sec] (mean)
Time per request: 4341.890 [ms] (mean)
Time per request: 43.419 [ms] (mean, across all concurrent requests)
Transfer rate: 42136.21 [Kbytes/sec] received
Connection Times (ms)
min mean[+/-sd] median max
Connect: 3 40 144.0 14 1308
Processing: 221 4212 537.9 4181 5807
Waiting: 209 4211 537.7 4179 5806
Total: 229 4253 529.3 4201 5927

GTMetrix Results

The GTMetrix reports revealed much the same as the numbers above. LiteSpeed Web Server wins by a significant advantage compared to Nginx and Apache. 

You can click on any image to view the full test report. 

LiteSpeed Performance Report on GTMetrix:

ls gt

NGINX Performance Report on GTMetrix:

nginx gt

Apache Performance Report on GTMetrix:

apache gt

How do I optimize my web server for performance?

Optimizing your web server for performance can help improve the speed and responsiveness of your website, resulting in a better user experience and improved search engine optimization.

Here are some tips to optimize your web server for performance:

  1. Choose a fast and reliable web server: Choosing a fast and reliable web server is the first step to optimizing your server’s performance. NGINX and LiteSpeed are popular web servers known for their speed and performance.
  2. Configure caching: Caching can significantly improve the speed of your website by storing frequently accessed content in memory or on disk. Consider using a caching plugin or module, such as W3 Total Cache or FastCGI, to optimize your server’s caching.
  3. Enable compression: Enabling compression can reduce the size of files that are sent from your server to the user’s browser, resulting in faster load times. Consider using gzip, brotli or deflate compression, which can be enabled through your web server’s configuration.
  4. Optimize images: Large, uncompressed images can slow down your website’s load times. Consider optimizing images for the web by compressing them, reducing their size, and using the appropriate file format (e.g. JPEG for photos, PNG for graphics). Alternatively, you can use WebP, a modern image format that provides superior lossless and lossy compression for images on the web. Using WebP, webmasters and developers can create smaller, richer images that make the web faster. WebP lossless images are 26% smaller in size compared to PNGs
  5. Configure SSL/TLS properly: SSL/TLS can improve your website’s security, but improper configuration can also slow down your server’s performance. Consider using the latest SSL/TLS protocols and ciphers, and avoid using deprecated protocols or weak ciphers.
  6. Monitor and optimize server resources: Monitoring and optimizing your server’s CPU, memory, and disk usage can help ensure that your server is running efficiently. Consider using server monitoring tools, such as Munin or New Relic, to identify performance bottlenecks and optimize your server’s resource usage.

Overall, optimizing your web server for performance requires a combination of proper configuration, caching, compression, and monitoring.

Conclusion

Considering the various pros and cons, it’s essential to carefully evaluate your needs before deciding between LiteSpeed vs NGINX vs Apache for web hosting. LiteSpeed offers the highest performance with minimal resources, while Nginx provides more flexibility for customizing your server setup. Apache remains the most popular option due to its reliability and compatibility with different operating systems. 

When it comes to the success of your website, the speed with which pages load for your customers and users is essential. The results clearly speak for themselves – LiteSpeed Web Server has a clear and distinct performance advantage over its contemporaries, and it’s, for this reason, we at ChemiCloud offer it to our customers by default on our Shared and WordPress Hosting. 

Should you want a LiteSpeed fast website literally, you’ll want to check out our web hosting plans! Thanks for reading, and if you have any questions or comments, leave them below or reach out to our support team! We’re here 24×7! 

8 thoughts on “LiteSpeed vs NGINX vs Apache: Web Server Showdown”

  1. One concern I might have is that total page size and request count changes. Why? Did you configure some caching/compression on the litespeed and not on the nginx/apache making it just plainly unfair to those servers?

    1. Hey Dominik,

      Thanks for your comment. We didn’t make any configuration changes to the default settings on any of the web servers we set up for the test. The difference you’ve noticed here is most likely related to the default compression settings that come with the LiteSpeed Web Server by default. Out of the box, it’s using gzip or brotli compressed responses for both static and dynamically generated content. You can read more about this in the Official LiteSpeed Documentation here.

      Let us know if you have any other questions! ^MT

  2. I had similar results until I enabled Nginx micro caching which then handled 30% more requests per second than Litespeed.
    That’s only when the server is under load though. Before that, pages were already faster on Nginx out of the box compared to an optimised Litespeed setup.

  3. Litespeed performance is great. What I’m missing is high stability. Sometimes speed is not everything. The website could be much faster but what about my headache while building it? Maybe I just need to still adapt to it and learn small tricks.

  4. Litespeed performance is great. I use shared Nginx hosting. I had an increased number of visits… and in some peak loads the page was crashing…. Options: VPS or shared Litespeed…. shared Litespeed 🙂

  5. Pingback: 10 Best Cheap Web Hosting In 2024: Reviewed & Compared — LinoDash

  6. Pingback: Tes Kecepatan Web Server LiteSpeed – JAGOANWP

  7. Nothing comes close to Litespeed. NGINX is so much tougher to configure and customers seem happier with the WordPress Litespeed plugin.

Leave a Comment

Your email address will not be published. Required fields are marked *

Cyber Week Sale 🔥

Up to 82% Off Hosting + 2 Months Free!

Related Articles

Share via