Authentic.
  • Plans & Pricing (On Sale!)
  • Client Login
ChemiCloud Blog
  • Plans & Pricing (On Sale!)
  • Client Login

LiteSpeed vs NGINX vs Apache: Web Server Showdown

    Updated on
  • April 4, 2022
  • 10 minute read
  • By Michael Thomas
Total
12
Shares
12
0
0

Litespeed vs Nginx vs Apache

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. 

In this article, we will explore the background of these technologies, what their unique advantages and disadvantages are, and explain why we run (and love) LiteSpeed. 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! 

Table of Contents
  1. What is a Web Server?
  2. What Are The Top Web Server Technologies? 
    1. Apache HTTP Server
    2. Nginx
    3. LiteSpeed Web Server
    4. Internet Information Services from Microsoft
  3. Why Choose One Over The Other?
  4. Why Does ChemiCloud Run LiteSpeed?
  5. Time For Some Benchmarks!
    1. Our Test Environment
    2. Our ApacheBench Configuration
      1. Our ApacheBench Results
    3. GTMetrix Results
  6. Conclusion

What is a Web Server?

Simply put, a web server is 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 own hardware configuration. 

A 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. 

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. 

Linksys Router Admin Page

What Are The Top Web Server Technologies? 

Apache HTTP Server

The most commonly used Web Server is by far Apache HTTP Server from the Software Apache Foundation. Created in 1995 by Rob McCool and Brian Behlendorf, among others. The name is a pun for A PatCHy server, as at the time of 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. According to W3Techs, Apache has around 36% market share as of September 1st, 2020. 

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 really 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. 

Nginx

Another increasingly popular web server is Nginx – pronounced as engine-x. 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 was able to fully replace Apache instead of just working alongside the webserver. 

LiteSpeed Web Server

LiteSpeed Web Server, abbreviated as LSWS, is almost a newcomer to the webserver ‘scene’. 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. 

Imagine if you are a web hosting company with 20 servers in your fleet running Apache and each server could host 200 websites. That’s 4000 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 8000, just by installing the application? It’s a very tempting offer. 

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. 

Why Choose One Over The Other?

The answer to this question isn’t an easy one. There isn’t a one size fits all solution to picking Nginx over Apache or LiteSpeed over Nginx. Suppose you find yourself in the position of being able to choose one over another. In that case, you’ll want to do your research and dive into how your users will be using the websites running on the server and what technology those websites are using, as that will help you decide. 

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. 

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. 

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. 

Time For Some 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 for testing. Each server was configured the same, save for its web server technology. Below are their configurations: 

We created 3 Cloud VPS Servers 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 with a maximum of 100 requests running concurrently. 

Our ApacheBench Results

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

We have also included the full 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 of the images to view the full test report. 

Conclusion

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 it’s 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! 

You May Also Like
Personal Information
View Post

Personal Information and Why Protecting It Matters in the Digital Age

    Updated on
  • December 6, 2022
  • By Bogdan Tirpescu
View Post

Shared Hosting vs WordPress Hosting: What’s the Difference?

    Updated on
  • November 9, 2021
  • By Bogdan Tirpescu
Become a Domain Reseller
View Post

How to Easily Start Your Domain Reselling Business

    Updated on
  • January 17, 2022
  • By Michael Thomas
Shared Hosting
View Post

What Is Shared Hosting? Explained for Beginners

    Updated on
  • October 15, 2021
  • By Michael Thomas
View Post

What Is Web Hosting? A Beginner’s Guide to Website Hosting

    Updated on
  • October 6, 2021
  • By Michael Thomas
View Post

7 Ways to Stop Spam Emails From Reaching Your Inbox

    Updated on
  • September 17, 2021
  • By Michael Thomas
Google PageSpeed Insights
View Post

Everything You Wanted To Know About Google PageSpeed Insights Tool

    Updated on
  • September 2, 2021
  • By Michael Thomas
Guest Mode
View Post

A Deep Dive into Guest Mode for LiteSpeed Cache

    Updated on
  • September 2, 2021
  • By Michael Thomas
2 comments
  1. Dominik says:
    October 26, 2021 at 12:03 pm

    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?

    Reply
    1. Michael Thomas says:
      October 26, 2021 at 7:30 pm

      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

      Reply

Leave a Reply Cancel reply

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

Recent Posts
  • Personal Information
    Personal Information and Why Protecting It Matters in the Digital Age
      Updated on
    • December 6, 2022
    • 8 minute read
  • Shared Hosting vs WordPress Hosting: What’s the Difference?
      Updated on
    • November 9, 2021
    • 6 minute read
  • Become a Domain Reseller
    How to Easily Start Your Domain Reselling Business
      Updated on
    • January 17, 2022
    • 7 minute read
  • Shared Hosting
    What Is Shared Hosting? Explained for Beginners
      Updated on
    • October 15, 2021
    • 8 minute read

Subscribe now to our newsletter

  • Shared Hosting
  • WordPress Hosting
  • Reseller Hosting
  • VPS Hosting
© 2020 CCHOSTING, INC. ALL RIGHTS RESERVED

Input your search keywords and press Enter.