Litespeed on Plesk – Installation and Configuration Guide

Guide on how to install LiteSpeed on your Plesk server
In this guide, we’ll explore both how to install LiteSpeed on Plesk and the installation of the LiteSpeed Plesk Extension on a Plesk server. This will be based on the assumption that you’re using a fully-functional Apache-Plesk setup. You can approach the installation of the LiteSpeed web server and the Plesk Extension in a number of ways, but we’ll focus on the extension first. We’ll cover how to install the LiteSpeed web server later on in the guide.

Requirements before installation

You’ll need these before you can proceed with the installation process:

  1. An operational Apache server on Plesk

  1. Your NGINX reverse proxy should be stopped, if you have one (we’ll get to this below)

  1. A PHP handler set to FastCGI — this enables the LiteSpeed web server to follow the handler settings

How to stop the Nginx Reverse Proxy Properly

With the latest version of Plesk, NGINX may be configured as a reverse proxy server positioned between Apache and the Internet. You need to stop the NGINX reverse proxy before proceeding with the LiteSpeed web server installation, so that Apache operates as the sole web server for handling live web traffic.

The LiteSpeed process will be unable to start as required if you fail to do this.

If you don’t stop the NGINX reverse proxy, you’ll see the following notification when you attempt to access the LiteSpeed extension:

“LiteSpeed is not running. Apache is running (PID = 23136)

“NGINX reverse proxy server is currently running and must be stopped. Please go to ‘Server Management > Tools & Settings > Services Management’ and stop NGINX.”

So, to stop the reverse proxy, you’ll have to start at the Plesk Admin Console and navigate to: Server Management > Tools and Settings > Server Management > Services Management > Reverse Proxy Server (NGINX) , then hit the Stop button.

Once NGINX has come to a stop, verify that Apache has been configured to run on 80/443 like this:

netstat -lnp | grep httpd or netstat -lnp | grep apache

In the event that it hasn’t been configured that way, you’ll need to execute this command — plesk repair web — to rebuild the Apache configuration file.

Installing the LiteSpeed Plesk Extension

Follow these steps to install the LiteSpeed Plesk Extension:

  1. Download the most recent Plesk extension from the LiteSpeed site
  2. Open /usr/local/psa/admin/conf/panel.ini to be edited: if this doesn’t exist yet, create it now.
  3. Add the following content before saving the file:
    1. [ext-catalog]
    2. extensionUpload = true
  4. In Plesk: go to Extensions > My Extensions . Hit the Upload Extension button, then upload the package you downloaded in the first step.

How to Install LiteSpeed Web Server

You can use two methods for installing the LiteSpeed Web Server on Plesk: either via a script or the LiteSpeed Plesk Extension. Be aware, though, that the script won’t install the extension — it only installs LiteSpeed Web Server.

Installing LiteSpeed Web Server Via Script

Generally, this is the recommended technique if this is your first time installing LiteSpeed. We’ll explore all of the options presented throughout the installation stage in depth to help you complete it as efficiently as possible.

Installation LiteSpeed is simple. The first step is to sign into the SSH server.

Next, run this command (replace your _serial_nr with your License Key):

bash <( curl https://get.litespeed.sh ) your_serial_nr

This script will detect your environment and ensure only the necessary dependencies and installation data is downloaded from the servers. The script will ask you to answer a number of questions, depending on the environment detected, before it starts to install LiteSpeed Web Server.

Helpful Hint:

If you want to take advantage of the script via a trial license, you’ll need to switch ‘your _serial_nr’ with the word TRIAL (written exactly like this, all in capitals) in this way:

bash <( curl https://get.litespeed.sh ) TRIAL

When you do this, you’ll request a trial license for your server automatically before LiteSpeed Web Server is installed on it. If you notice an error when you’re utilizing the Trial License, please take a look at this helpful FAQ .

When the script starts, it will recognize the installation uses Plesk. It will then present you with the following prompts to request your input:

Could not find an lsws.options file

Could not find an lsws.options file. We will ask you for your preferred settings instead, but for automated bulk provisioning, you may want to exit and create an lsws.options file. Continue Installer(Y/N) ?

Don’t worry: this is to be expected, as this is the detailed method of installation. lsws.options is for fast/automatic installation.

Press Y then Enter to continue.

Enable PHP_SUEXEC

Enable PHP_SUEXEC. Run PHP processes as the account owner. Available values: 0 (off), 1 (on), and 2 (user home directory only).

This option will stipulate how your server runs a PHP process — a value of “2” is advised for shared hosting servers (this is the default).

Apache port offset

Apache port offset. Run LiteSpeed in parallel with Apache. For example, if set to 1000, Apache will listen on port 80, and LiteSpeed on 1080. If set to 0, Apache and LiteSpeed will use the same port, and LiteSpeed will not automatically start after installation.

This option defines which port the LiteSpeed Web Server will bind to when you’ve installed it. You’re recommended to set the port offset to something besides 0 (such as the default value of 1000), as this will enable LiteSpeed and Apache to run simultaneously while you’re testing if LiteSpeed works properly on your server.

You can switch the port offset to 0 once the installation has been completed and you feel sure that your sites run as they should with LiteSpeed.

If you decide to set port offset to 0, LiteSpeed will begin following the installation and Apache will then come to a stop. You’ll also need to enable the Switch to LiteSpeed Automatically option (we’ll cover further down).

Admin username

Admin username. For accessing LiteSpeed WebAdmin console.

This option defines what username you’ll utilize to gain entry to the LiteSpeed WebAdmin Console. This is valuable for getting into LiteSpeed Stats or taking control of LiteSpeed behavior following installation. It’s advised that you configure this to be fully secure. The default value is admin.

Admin email address

Admin email address. Receive important server notices, such as license expiration and server core dumps.

This option establishes the email address that you want to get warnings, errors, and notices from LiteSpeed Webserver. You’re recommended to choose an email address you monitor on a regular basis, to avoid missed updates. The default value is [email protected]

Switching PHP Handlers

Automatically switch PHP handlers for users and/or subscriptions inside of Plesk. Available values: 0 (No change), 1 (Switch just for users), 2 (Switch just for subscriptions), 3 (Switch for both users and subscriptions).

This option inquires whether you intend to switch PHP handlers for users and/or subscriptions within Plesk. The default value is 0.

Switching to LiteSpeed Web Server

Switch to LiteSpeed Web Server. Automatically switches at the end of the installation if the port offset is set to 0. Available values are 1 (enable) and 0 (disable).

This option defines if the installer should close Apache down automatically and switch to LiteSpeed Web Server after it’s been installed. You should set this to 1 if you configured Apache Port Offset to 0 earlier. The default value is 0

Quick/Automated Installation

This utilizes shortcuts to ensure LiteSpeed is installed and deployed on Plesk as quickly as it can be.

In the majority of cases, it’s sufficient to run the installer script manually. You can automate the process for bulk provisioning through the following steps: create a lsws.options file at the directory you run the script command (such as /root/) or upload to your business’s internal repo instead. This will enable the installer to pick up installation options right from the file, without requesting input from users.

So, a default lsws.options file will usually resemble the following:

php_suexec="2"

port_offset="1000"

admin_user="admin"

admin_pass="a1234567"

admin_email="[email protected]"

auto_switch_php="1"

auto_switch_to_lsws="0"

admin_pass is a fresh option here, and is the password you’ll use to enter your LiteSpeed WebAdmin Console. Take care to set it as a secure password for internal usage only.

You can create lsws.options and keep it on your local network for bulk provisioning, at a URL like yourlink.com/yourinternalrepo/lsws.options. Then, run this command:

curl -o lsws.options yourlink.com/yourinternalrepo/lsws.options && bash <( curl https://get.litespeed.sh ) your_serial_no

Important note

yourlink.com/yourinternalrepo/lsws.options links to your personalized lsws.options file, which your servers should be able to access.

lsws.options is the lsws.options file’s location. It’s fine to leave it like this when the installer is being run from the directory that the lsws.options file is too.

your_serial_no is the LiteSpeed Web Server license key. If you want to request a Trial License, you can use TRIAL too, but if you encounter an error when utilizing the Trial license, check out the FAQ.

Install LiteSpeed Web Server from the LiteSpeed Plesk Extension

You’ll be able to access the LiteSpeed Plesk Extension via Server Management > Extensions > LiteSpeed Extension.

Click on Install LiteSpeed Web Server.

Once you’ve read the comprehensive License Agreement, tick the I agree box. You’ll also have to enter your license’s serial number or request a trial license instead.

Scroll down the page a little more and you’ll find Installation Options and WebAdmin Console Login .

For the Installation Options section, the default values should be fine, but it’s advised that you set a non-zero Port Offset when installing for the first time (such as 1000).

For shared hosting, **Enable PHP SuEXEC** is recommended and implemented by default. You’ll only need to input a password in the WebAdmin Console Login section, though you’re advised to utilize a different username than the default to maintain effective security.

When you feel ready to proceed, click on the Install button below the Web Admin Console Login section.

You’ll be presented with a message to confirm that LiteSpeed has been “installed successfully” . This will include details such as:

  • platform detected

  • latest stable version

  • download directory created

At the bottom of the page, hit Okay and start LiteSpeed Web Server by clicking on the Restart LiteSpeed button.

If this process completes successfully, you should see a message on your LiteSpeed Extension page: this will inform you that LiteSpeed and Apache are operating on separate ports. Apache will run on the regular port 80 and LiteSpeed on 1080 (assuming your port offset is 1000).

You don’t need to test LiteSpeed on an offset port for staging servers or test environments, and LiteSpeed is unable to be tested on an offset port for certain applications (e.g. Magento, WordPress). In this case, you can just “Switch to LiteSpeed” from the extension GUI or command line for testing (as so):

/usr/local/lsws/admin/misc/cp_switch_ws.sh lsws

Running Testing with a Port Offset

The major advantage of the port offset is that you’re able to run both LiteSpeed Web Server and Apache at the same time. So, you can test hosting your websites on LiteSpeed Web Server to ensure they work before you switch off Apache.

For example, we have set the port offset to 1000. Sites could be tested on ports 1080 and 1443 for HTTP and SSL requests (respectively).

When you feel satisfied that your websites run properly with Litespeed Web Server, you’ll be ready to switch to LiteSpeed Web Server as your primary server.

Switching to LiteSpeed

First, under the Switch between Apache and LiteSpeed heading, click on Switch to LiteSpeed to stop Apache and make LiteSpeed Web Server your main server ports: 80 and 443.

LiteSpeed will be running as your primary web server. You’ll be presented with a message stating that “LiteSpeed is running” and “Apache is not running”. It will also tell you that you “Switched to LiteSpeed successfully”.

Switch between LiteSpeed and Apache

You should switch between LiteSpeed and Apache via the LiteSpeed Extension.

Also, you can do this by running the switching script from this command line:

/usr/local/lsws/admin/misc/cp_switch_ws.sh apache

/usr/local/lsws/admin/misc/cp_switch_ws.sh lsws

LiteSpeed on Plesk: Configuration Process

PHP

Straight out of the box, LiteSpeed works with Plesk PHP. The only step you need to take is to set PHP handler to FastCGI, to prevent mismatched PHP settings .

By default, LiteSpeed will honor Plesk’s PHP settings with no need for further configuration, but extra handlers will be needed if CloudLinux PHP Selector is enabled and you would rather use that as your PHP manager instead. We’ll cover this in more detail further on in this guide.

Disabling PHP Override

With LiteSpeed Web Server, you can disable the PHP override in .htaccess.

php_value and php_flag may be utilized in Apache configuration, or .htaccess to override php.ini settings. But they’re only supported by Apache’s mod_php handler, which is deprecated in the majority of the control panel systems after being replaced by php-fpm, LSPHP or fastcgi.

This means Apache should return an error if you place php_value or php_flag in .htaccess. You can find details in Plesk’s documentation .

You may see one of these errors:

500 internal server error

503 Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration.

The following error can be found in the domain error log in Domains > example.com > Logs:

/var/www/vhosts/example.com/httpdocs/.htaccess: Invalid command 'php_value', perhaps misspelled or defined by a module not included in the server configuration

/var/www/vhosts/example.com/httpdocs/.htaccess: Invalid command 'php_flag', perhaps misspelled or defined by a module not included in the server configuration

/var/www/vhosts/example.com/httpdocs/.htaccess: RewriteRule: bad flag delimiters

/var/www/vhosts/example.com/public_html/.htaccess: Invalid command 'suPHP_ConfigPath', perhaps misspelled or defined by a module not included in the server configuration.

LiteSpeed Web Server utilizes LSPHP, supporting php_value and php_flag usage in .htaccess. LiteSpeed Web Server will not return a 500 error when you use these, as it tolerates these PHP overrides more than Apache does.

In certain situations, you may opt to disable such PHP overrides in .htaccess for LiteSpeed too. To achieve this, you can use a dedicated Apache directive DisablePhpOverride htaccess (which may be utilized at the server level httpd.conf.).

Let’s look at an example: on Plesk, make a file named DisablePhpOverrideLiteSpeed.conf in the following directory (depending on your system):

CentOS:

/etc/httpd/conf.d/

Debian Ubuntu:

This DisablePhpOverrideLiteSpeed.conf file should include this:

DisablePhpOverride htaccess

Customized Configuration

PHP is auto detected as of LiteSpeed Web Server v5.3. There’s no longer a need for manual PHP external app configuration, and the preferred PHP manager is Plesk.

But if you would prefer to have a customized configuration for a specific PHP version, you might be required to create and configure the external app manually. From LiteSpeed Web Server Admin Console, you can create lsphpXX (such as lsphp70, lsphp71, lsphp72) one at a time.

Just adjust the Name, Address and Command settings to align with the relevant PHP version. If you would prefer to use the command line rather than the GUI tool, though, you can edit the LiteSpeed Web Server configuration file instead. This is typically located at /usr/local/lsws/conf/httpd_config.xml. 

CloudLinux PHP Selector

When you enable CloudLinux PHP Selection alongside Plesk PHP settings, you may be uncertain which PHP Selector is actually in effect. LiteSpeed automatically honors Plesk’s PHP selection straight out of the box, with no additional configuration necessary. So, you’ll have to make a few adjustments if you would like to use CloudLinux PHP Selector:

  • Set up an extra handler for LiteSpeed: this will force Plesk PHP to point to CloudLinux for non alt-phpxx versions.

  • Select a non alt-php version in Plesk’s PHP settings.

Together, these actions will make the CloudLinux PHP Selector come into effect.

Configure Extra Handler

Go to LSWS Web Admin Console > Server > PHP > Add PHP Handlers and follow these instructions:

  • Handler ID: php

  • Command : /var/www/cgi-bin/cgi_wrapper/cloudlinux_wrapper

  • Handled Suffixes: php, php54, php55, php56, php70, php71, php72, php73, php74

These settings will cause those Plesk PHP versions listed to utilize the CloudLinux PHP selector.

You can edit LiteSpeed’s configuration directly if you would rather take this route:

vi /usr/local/lsws/conf/httpd_config.xml

Enter the following in ... tags:

    php

    /var/www/cgi-bin/cgi_wrapper/cloudlinux_wrapper

    php, php54, php55, php56, php70, php71, php72, php73, php74

Select Plesk PHP

After the handler has been created, go to Plesk’s PHP settings and pick any PHP version (the PHP support dropdown) that’s not one of the alt-php versions (i.e. one of those listed in the PHP handler that has just been created). This will make sure that CloudLinux PHP selection is utilized.

LiteSpeed Cache for WordPress

The LiteSpeed Cache plugin can be mass installed in each WordPress installation on your server using the LiteSpeed Plesk Extension. Once you’ve installed the LiteSpeed Plesk Extension, you could see a No Cache Management data file found message.

Set Cache Root

Click Manage Cache Installations , and then Set Missing Cache Roots in the Cache Root Setup section.

Scan and Enable

Once you have set up the cache root successfully, navigate back to the extension main page. Then, click the Manage Cache Installations option again.

Next, you will need to scan for WordPress installations across the server and install LSCache for WordPress (LSCWP) on them. First, though, you’ll have to select the LSCache plugin version you want to install. Typically, it’s recommended that you pick the latest version.

This is a fairly simple process thanks to the user-friendly layout. Once you begin scanning, this could take some time based on the number of sites you have.

When the scan ends, you’ll get to manage those WordPress sites found. You can use the Discover New button in future: this will help to save time as only scans for sites that haven’t been discovered yet.

Now you’ll be able to activate the LiteSpeed Cache Plugin for WordPress individually or use bulk activation for a number of websites instead. You should notice a green light symbol in the Cache Status column when LSCWP has been activated successfully.

If you want to verify a site is cached, take a look at the x-litespeed-cache:hit response header, which indicates that the caching is running properly.

QUIC

QUIC connections use UDP port 443. You need to make sure it’s not being blocked by your firewall.

HTTP/2 and HTTP/3 through Apache Config

You may enable and disable a number of protocols (such as HTTP/3 and HTTP/2) in httpd.conf, by utilizing the SpdyEnabled directive, as so:

    SpdyEnabled http3

Alternative parameters that are valid include:

  • spdy2

  • spdy3

  • http2

  • off

By default, all protocols are enabled, which means there’s no requirement for a SpdyEnabled directive if you want to use all SPDY, HTTP/2 and HTTP/3 protocols.

Helpful Hint

When using this directive to enable protocols, anything you don’t select will actually be disabled. So, for instance, SpdyEnabled http2 enables HTTP/2 while disabling SPDY and HTTP/3. Take care not to accidentally disable one or more protocols you need to use.

TLS

To strengthen Plesk’s security features, enable TLS 1.3 and disable weak cipher suites. TLS1.0, TLS1.1, TLS1.2 will be enabled by Plesk configuration by default, and this guide will demonstrate how to enable TLS 1.3.

This guide is created and tested on Plesk 17.8 as well as Centos 7.5. Configuration files must be in /etc/apache2/mods-available/ssl.conf for Debian/Ubuntu Plesk.

Remember: as with any changes to Apache config files, you’ll have to restart the server when making the below adjustments. Use the following command with restarts:

systemctl restart lsws

Enabling TLS1.3

Edit the file /etc/httpd/conf.d/ssl.conf.

Locate this line and comment out (using #):

SSLProtocol +TLSv1 +TLSv1.1 +TLSv1.2

SSLCipherSuite HIGH:!aNULL:!MD5

Replace this with the following:

SSLProtocol TLSv1.1 TLSv1.2 TLSv1.3

SSLCipherSuite HIGH:!aNULL:!MD5

This enables TLS1.1, TLS1.2 and TLS1.3.

Want to disable TLS1.1 too? Change the line to the following:

SSLProtocol TLSv1.2 TLSv1.3

Disabling Weak Cipher Suites (this is optional)

Plesk also includes a number of weak cipher suites by default, but you can disable them with:

SSLCipherSuite HIGH:!aNULL:!MD5

Then, replace it with the following:

SSLCipherSuite TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_256_GCM_SHA384:TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256:TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384

:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA:TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA

Please be aware, though, this can lead to CPU load. Testing is performed through SSL Labs.

WebAdmin Console

The LiteSpeed WebAdmin Console utilizes port 7088 rather than 7080 for Plesk. Take a look at your firewall to determine if port 7088 is enabled, and then you will likely have access to WebAdmin via https://SERVER_IP:7088.

Plesk Login Page

It’s possible to set up a Plesk login page with no need for a URL port number — for instance, https://IP-or-domain:8430 may become https://domain.com.

Make a vhost in Plesk then put this rewrite rule in its .htaccess:

RewriteRule ^(.*)$ https://127.0.0.1:8443/$1 [P,L]

This brings our insightful guide on how to install LiteSpeed on Plesk to a close. Thank you for reading — we hope it helps you get off to a great start!

Litespeed vs NGINX

Comparing NGINX and LiteSpeed

In a series of benchmarking tests, LiteSpeed’s HTTP/3 implementation demonstrated higher performance than that of the hybrid NGINX/Quiche.

Overall, LiteSpeed managed to transfer resources faster, demonstrate stronger scaling, and utilized less CPU & memory in the process. LiteSpeed bettered NGINX in all of these metrics by a factor of two or above. While NGINX was unable to complete certain tests, it achieved just below TCP speed in others.

Below, we’ll delve deep into the setup process and the range of benchmarks used.

  1. LiteSpeed vs NGINX: Why it Matters
  2. What is Cloudlare’s Patch for Quiche?
  3. Benchmarking Setup
  4. NGINX vs LiteSpeed: Benchmark Testing
  5. LiteSpeed Found to be More Impressive than NGINX

LiteSpeed vs NGINX HTTP/3: Why it Matters

HTTP/3 is a new web protocol, succeeding Google QUIC and HTTP/2. With the IETF QUIC Working Group approaching a finalized version of the drafts, it’s clear that the nascent HTTP/3 implementations are becoming more mature and some are beginning to see production use.

LiteSpeed became the first to ship HTTP/3 support in LiteSpeed Web Server, and QUIC has been supported since 2017. Improvements have been made here and there. It’s on this foundation that the support for HTTP/3 stands.

Recently, Cloudflare launched a special HTTP/3 NGINX patch and encouraged users to start experimenting.

What is Cloudlare’s Patch for Quiche?

Quiche is Cloudflare’s HTTP/3 and QUIC library, written in Rust (this language is high level and new). Said library provides a C API, which is how NGINX uses it.

Benchmarking Setup

The Platform

Both the servers and load tool run on the same VM. This is an Ubuntu-14 machine featuring a 20 core Intel Xeon E7-4870 and 32GB RAM. Netem was used to modify the bandwidth and RTT.

The Servers

We leveraged OpenLiteSpeed, an open-source version of the LiteSpeed Web Server (specifically, version 1.6.4.).

With regards to NGINX, we utilized 1.16.1 with Cloudflare’s Quiche patch.

OpenLiteSpeed and NGINX had been configured to utilize a single worker process, and NGINX’s maximum requests setting was boosted to 10,000. This enabled us to issue 1,000,000 requests with 100 connections.

# OpenLiteSpeed
httpdWorkers 1
# nginx
worker_processes 1;
http {
    server {
        access_log off;
        http3_max_requests 10000;
    }
}

The Website

This comprised a simple collection of static files, including a 163 byte index file with files of varied sizes (1MB, 10MB, 100MB, 1GB).

The Load Tool

Load was generated with h2load with HTTP/3 support . This is easy to build when utilizing the Dockerfile supplied.

NGINX vs LiteSpeed: Benchmark Testing

We ran three LiteSpeed or NGINX tests and took the median value to get each number (the requests per second or resource fetch time).

LiteSpeed or NGINX: small page fetching

This testing involved fetching the 163 byte index page in numerous ways, through multiple network conditions. Key h2load options:
  • -n: Overall number of requests to be sent
  • -c: Amount of connections
  • -m: Amount of concurrent requests for each connection
  • -t: Amount of of h2load threads
-n 10000 -c 100
LiteSpeed NGINX
100 mbps, 100 ms RTT 925 reqs/sec 880 reqs/sec
100 mbps, 20 ms RTT 3910 reqs/sec 2900 reqs/sec
100 mbps, 10 ms RTT 6400 reqs/sec 4150 reqs/sec
-n 100000 -c 100 -t 10 Every connection will send 1000 requests now, with this being a longer run.
LiteSpeed NGINX
100 mbps, 100 ms RTT 995 reqs/sec 975 reqs/sec
100 mbps, 20 ms RTT 4675 reqs/sec 4510 reqs/sec
100 mbps, 10 ms RTT 8410 reqs/sec 7100 reqs/sec
At 100ms, LiteSpeed is quite a bit faster. But its speed increases substantially at 20ms and 10ms RTT. -n 100000 -c 100 -m 10 -t 10
LiteSpeed NGINX
100 mbps, 100 ms RTT 9100 reqs/sec 7380 reqs/sec
100 mbps, 20 ms RTT 24550 reqs/sec 5790 reqs/sec *
100 mbps, 10 ms RTT 25120 reqs/sec 6730 reqs/sec *
* High variance It was fascinating to find in the initial test that NGINX used 100 percent CPU, when OpenLiteSpeed utilized around 45 percent CPU only. This is why NGINX’s numbers tend to not improve despite the RTT dropping. Still, OpenLiteSpeed doesn’t utilize 100 percent CPU even with 20 and 10ms RTTs. -n 1000000 -c 100 -m 10 -t 10 We had to set the NGINX http3_max_requests parameter to 10000 (from the 1000 default value) to make sure it could issue in excess of 1000 requests for each connection.
LiteSpeed NGINX
200 mbps, 10 ms RTT 29140 reqs/sec 7120 reqs/sec *
* High variance At this point, LiteSpeed was using 100 percent CPU. NGINX allocated in excess of 1GB of memory during this test, while LiteSpeed remained below 28MB. So, that equates to greater than four times the performance for approximately 1/37th of the price.

Single file fetching

In this situation, we fetched a single file using alternative network conditions and measured the length of time required to download it. 10MB
LiteSpeed NGINX
10 mbps, 100 ms RTT 9.6 sec 10.9 sec
10 mbps, 20 ms RTT 9.6 sec 10.5 sec
10 mbps, 10 ms RTT 9.4 sec 10.8 sec
It’s clear that NGINX is a little slower here. It also utilizes three to four times more CPU than LiteSpeed did in the above tests. 100MB
LiteSpeed NGINX
100 mbps, 100 ms RTT 11.9 sec 39 sec *
100 mbps, 20 ms RTT 9.2 sec 38 sec *
100 mbps, 10 ms RTT 8.9 sec 29 sec
*High variance Across all three of the NGINX vs LiteSpeed benchmarks, NGINX utilized 100 percent CPU. It’s highly likely this is the cause of its weaker performance. 1GB We attempted to download a 1GB file with NGINX at 1gbps. However, we became tired of waiting for the download to complete. We believe the contrast in LiteSpeed and NGINX’s respective performance was pronounced at this speed.

NGINX vs LiteSpeed: Shallow Queue

NGINX has struggled with high bandwidth, so we decided to see how it would fare with low bandwidth instead. We used a shallow queue with netem’s limit parameter and set it to seven. Single 10MB file fetching
limit LiteSpeed NGINX
5 mbps, 20 ms RTT 1000 * 19.5 sec 23.1 sec
5 mbps, 20 ms RTT 7 29.5 sec 47.9 sec
*netem default We found LiteSpeed’s performance decreased by around 50 percent when we introduced a shallow queue on path. However, NGINX’s performance was degraded by more than 100 percent. So, LiteSpeed was found to be substantially faster than NGINX in both situations.

Conclusion – LiteSpeed Found to be More Impressive than NGINX

In all, we used numerous LiteSpeed vs NGINX benchmarking tests, and LiteSpeed performed to a higher standard than NGINX.

Files were transferred faster and less CPU & memory were used. NGINX never reached TCP level throughput when at a low bandwidth, and its throughput was a fraction of LiteSpeed’s at a high bandwidth.

NGINX’s HTTP/3 is unprepared for production use, as it provides weak performance and consumes more memory and CPU.

We’re not surprised by this result, frankly. QUIC and HTTP/3 are complicated protocols, and new implementations will find it difficult to match LiteSpeed’s performance.

NGINX is likely to show improvement in years to come, and we’ll be interested in running further benchmark tests when that time comes. But LiteSpeed HTTP/3 can’t be beaten in the meantime.