How to deploy an auto-scaling Magento cluster for premium e-commerce hosting

| Company | July 5, 2022

There are many options for building and hosting an e-commerce website, but Magento is still considered one of the most robust, flexible, and scalable open-source solutions on the market.

However, making sure your Magento website is actually robust, flexible and scalable in production depends on carefully architecting, configuring and tuning the Magento hosting infrastructure. You need to make sure your site is always available for many concurrent users, is versatile enough to store a wide range of data types, and especially, that the Magento application can scale both vertically and horizontally.

That is normally something that takes a lot of time and effort – unless you do it with Virtuozzo.

Automating Magento cluster deployment

We have developed a dedicated auto-scalable clustered Magento package that can be automatically installed within Virtuozzo Application Platform, our elastic application hosting solution. In just a few clicks, you can deploy a Magento cluster with a sophisticated container-based failover topology.

Below you'll find some details on each cluster component, preconfigured auto-scaling settings, and a simple step-by-step Magento user guide describing how to get your own highly-available clustered Magento CMS up and running within the cloud in a matter of minutes.

Magento Cluster Components

Let's start by reviewing each of the premium Magento Cluster components.

Premium CDN

Edgecast CDN is integrated into the Magento cluster to provide a superb experience for site visitors, and improve Google rankings. It’s a global Content Delivery Network that features massive bandwidth capacity, advanced caching and acceleration strategies, along with HTTP/3 support to provide lightning fast loading of static Magento assets loading from the nearest PoP (point of presence).

Let's Encrypt SSL

Let's Encrypt SSL Add-On provides automation to issue trusted SSL certificates, custom domain validation, and automatic certificate renewal.

LiteSpeed Web ADC

LiteSpeed Web ADC (Application Delivery Controller) is a load balancer that supports modern HTTP/3 protocol and flexible traffic distribution algorithm for optimal performance. It also benefits from the ESI dynamic cache, which helps to serve dynamic requests directly, reducing the number of backend server requests.

LiteSpeed Web Server

LiteSpeed Web Server is a high-performance web server with a wide feature set such as HTTP/3 support, ESI cache, CSS and JavaScript optimization, image optimization, browser and object cache support, CDN support, built-in WAF, Geo-DNS, CAPTCHA, IP throttling, cutting-edge anti-DDoS protection, and more.

Web Application Firewall

The Web Application Firewall (WAF) secure feature is enabled by default at the back-end for LiteSpeed Web Server. It ​​manages rules for dynamic requests and thus significantly optimizes computing power. The user can additionally adjust the firewall, which comes with Layer-7 Anti-DDoS Filtering, IP level bandwidth, and request rate throttling.

LiteMage Cache

LiteMage Cache is based on the ESI (Edge Side Include) engine. It is designed to cache dynamic assets as static ones, to make page assembling and request serving significantly faster. Being integrated into LiteSpeed Web Server, it avoids extra paid resource usage.

MariaDB Cluster

MariaDB cluster with a primary-primary replication topology allows the system to perform read/write operations on both database nodes. The potential drawback of data discrepancy (since changes occur on two servers simultaneously) is solved by specifying the auto_increment_increment and auto_increment_offset parameters in the MySQL server settings. Since the application can interact with any node doing CRUD operations, there will be no cluster downtime if one node goes down, and there will be no need to perform complex failover procedures.


Redis is a high-performance RAM-allocated data structure store running in the LiteSpeed Web Server container, and it is used as a high-speed caching solution. Object caching stores already loaded database query results and serves them up faster per request.


OpenSearch cluster is a community-driven, open-source search engine that provides a distributed, multitenant-capable full-text search.

Shared Storage

A dedicated Data Storage Container node is utilized for storing media files in the Magento Cluster.

Now that we’ve explained the topology structure and components, let's walk through the steps required to implement a Magento cluster with Virtuozzo Application Platform.

Magento Cluster Installation

A complex Magento topology would normally require a lot of configuration and tuning, but Virtuozzo Application Platform automates everything for you. Your Magento cluster will be ready in a few minutes.

1. Click the Marketplace button at the top of the dashboard and find the Auto-Scalable Magento Cluster package.

2. In the installation window that opens, you can tune the cluster to your specific needs. Let’s run through each of these options.

A) First, provide general details of the environment where the Magento cluster will be set up

  • Env Name – your preferred environment name
  • Region - select the environment region (if several are available on the platform)

B) Next, choose an appropriate Scaling Strategy to set the default automatic horizontal scaling options. This parameter aims to foresee possible upcoming load growth in the cluster based on the expected cluster load level. Let's take a closer look at how it works.

Based on our experience, we offer three common horizontal scaling scenarios for Magento to prevent overload (these settings can be re-adjusted after installation):

Low Load

  • adds 1 application server node if the workload is higher than 70%
  • removes 1 application server node if the workload goes below 20%

Medium Load

  • adds 1 application server node if the workload is higher than 50%
  • removes 1 application server node if the workload goes below 20%

High Load

  • adds 2 application server nodes if the workload is higher than 30%
  • removes 1 application server node if the workload goes below 10%

C) Lastly, tick the required Advanced Features for your cluster:

  • Web Application Firewall - enables security options for malicious request filtering based on Free ModSecurity Rules from Comodo.
  • Install Let's Encrypt SSL with Auto-Renewal - installs the Let's Encrypt add-on to issue a trusted SSL certificate for a custom domain. The add-on also manages domain validation, certificates renewal, and SSL-related notifications.
  • Install Lightning-Fast Premium CDN - installs the Premium CDN add-on to integrate Edgecast CDN into the Magento application.

3. Click Install and wait while the platform configures everything for you.

Once the deployment is finished, you'll see the success pop-up with access credentials for your administration Magento panel. The same information will also be sent to your email.

Now, you can just click on the Open in Browser button, and start filling your highly available and reliable Magento installation with your content, while being ready to handle as many users as your service requires.

Get Started Now

Need auto-scaling Magento hosting for your e-commerce business? Get started now at one of our Virtuozzo Application Platform service provider partners.

Want to build your own highly-available Magento cloud business? Virtuozzo Application Platform makes it easy, and you can run it on top of your existing infrastructure.