LiteSpeed Web ADC: Load Balancing, Dynamic and Static Cache, Integrated Cyber Protection and HTTP/3 Support

By | October 10, 2019

LiteSpeed Web ADCLiteSpeed Web ADC (Application Delivery Controller) is a new generation load balancer suitable for the projects of any scale, being able to handle everyday traffic and occasional spikes alike. Lightning fast scalability on demand ensures adapting to the needs of business, at the same time staying highly efficient and safe.

LiteSpeed Web ADC supports modern HTTP/3 protocol and flexible algorithm of traffic distribution for optimal performance, as well as ESI dynamic cache that helps to serve dynamic content directly and reduce requests to web servers. It provides secure runtime with enhanced cyber protection including Web Application Firewall (WAF), Layer-7 Anti-DDoS Filtering, brute force attacks defense, as well as IP level bandwidth and request rate throttling.

This load balancer can be configured via a friendly user interface that makes setup, configuration, and maintenance very easy. As a high-end software, it has a comprehensive Help system which is accessible via the WebAdmin console.

To get LiteSpeed load balancer up and running in your cloud environment follow the steps below.

LiteSpeed Load Balancer Installation

1. Log into your Jelastic account and click New Environment at the top.

LiteSpeed Web ADC create

2. Within the opened topology wizard, choose LiteSpeed Web ADC load balancer. In order to get HTTP/3 aka QUIC support, enable public IP address. Specify any other required configuration parameters (add app servers or other instances), state resource limits using cloudlets slider, etc.

LiteSpeedWebADC cloud environment topology

3. When the environment is created, you will receive emails with access credentials to LiteSpeed Web Admin console (separately for load balancer and application server if any).

LiteSpeedWebADC environment created

4. Log in the LSADC WebAdmin Console as admin user.

LiteSpeed Web ADC WebAdmin Console

The load balancer parameters are grouped in three main areas: General, Configuration and WebAdmin Console.

LiteSpeed Web ADC settings

LiteSpeed Web ADC General Management

The section General allows to get access to Service Manager to perform general actions such as service monitoring and controlling top-level functions:

  • Restart allows performing graceful restart applying configuration changes
  • Toggle Debug Logging allows to enable/disable debug level logging in an emergency manner. Always set debug level to NONE if you do not need detailed debug logging. Active debug logging will severely degrade service performance and potentially eat disk space in a very short time. Debug logging includes detailed information for each request and response
  • Server Log Viewerdisplays server logs of different levels using a user-friendly representation
  • Real-Time Statisticsreal-time service statistics monitoring
  • Version Manager – downloads new versions or switches between installed ones

LiteSpeed Web ADC general management

In order to keep your environment compatible with Jelastic platform, it is strongly recommended using Redeploy Containers functionality at the dashboard instead of the LiteSpeed Version Management.

LiteSpeed Web ADC redeploy containers

LiteSpeed Web ADC Configuration

The Configuration block provides admin user with settings in six directions:

  • Server

    General and specific server settings: Security, Cache, PageSpeed Module Settings, ZeroConf etc.

  • Listeners: plain and secure (SSL)
    A server socket that listens on specific IP address and TCP port
  • Clusters
    A group of backend servers that run the same type of service. A load balancer distributes requests to cluster nodes based on a predefined rules.
  • Virtual Hosts
    Load balancing can be performed for multiple web sites (virtual hosts) on different clusters.
  • Virtual Host Templates
    Pre-configured templates simplify the administration of virtual hosts with similar configuration. Each of them includes a template configuration file, a list of mapped listeners and a list of member virtual hosts.
  • HA

    Configurations for High Availability (HA) that ensures failover for two load balancer nodes.

LiteSpeed Web ADC configuration

Static Assets Caching on LiteSpeed Web ADC

In order to decrease the workload on backend servers,  load balancer’s cache can be configured to serve static assets requests. Originally, LSCache functionality was designed to only cache dynamic pages but currently there is a set of LSCache plugins that do all the caching work. For example, there can be used CDN-like feature in order to make load balancer do the static assets caching. Let’s follow the steps to enable this configuration:

1. Log in the WebAdmin Console of LiteSpeed Web ADC. Go to Configuration and open Virtual Hosts section.

LiteSpeed Web ADC virtual hosts

2. Open the required Virtual Host for editing (Jelastic, in our case).

3. Choose Rewrite tab and switch the Enable Rewrite parameter to Yes.

LiteSpeed Web ADC enable rewrite

4. Edit Rewrite Rules adding the lines:

RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{REQUEST_URI} ^.*\.(jpg|gif|png)$ [NC] RewriteRule .* – [L,E=cache-control:max-age=300]

Shown rules allow caching three types of static assets – image files with extensions jpg, gif or png. But of course you can change or add any type files to be cached, even application files like php can be stated that will actually make LSADC cache dynamic content as well.

LiteSpeed Web ADC rewrite rules

5. The final step is to perform the Graceful Restart via the Actions menu item.

LiteSpeed Web ADC Graceful Restart

6. To make sure the static assets caching is working, open your application in web-browser, go to development tools and see the Response Headers section related to the required static asset(for example, *.png). It should contain a header like this:

X-LSADC-Cache: miss

Once you refresh the webpage the header should switch to hit state:

X-LSADC-Cache: hit

LiteSpeed Web ADC header

So, hitting the cache means the asset was delivered from load balancer’s cache storage directory and not from the backend server.

LiteSpeed Web ADC Licensing and Price

Specifically for Jelastic PaaS, there was created a more flexible pricing model for LiteSpeed balancers that suits dynamic cloud environments. You are charged based on the network traffic processed by the node at the rate of 0.01$ per GB. Herewith, in case there was no traffic at all during an hour, the minimum fee for the license usage (0.01$) is charged. The maximum total charge per month is 65$, i.e. any traffic over the 6,500 GB is free of charge until the end of the month (the starting date is defined by the very first charge).

Now you are aware of key advantages connected with load balancing from LiteSpeed Technologies. Explore the benefits of high performance and availability with cutting edge LiteSpeed Web ADC hosted at Jelastic Multi-Cloud PaaS.

Related Articles

LiteSpeed Web Server for Highly-Loaded PHP Applications

HTTP/3 Premium CDN Setup for Magento Cloud Hosting on LiteSpeed Servers

Magento Cloud Hosting. How to Deploy E-Commerce Platform on LiteSpeed Servers

Jelastic and LiteSpeed Partnership: Improved Performance, Security and Cost Efficiency for PHP Applications

Subscribe to get the latest updates