Table of Contents
IMPORTANT ANNOUCEMENT
The new feature (lightning stack) is currently in private preview.
Private previews are initial releases of potential future products or features. Participating in private previews provides you with the opportunity to test, validate, and give feedback on future functionalities, which helps us concentrate our efforts on what delivers the most value to you.
Private previews are not suitable for critical production-level workloads. We recommend using a clone application instead of running sensitive production workloads on private preview products.
Private previews are available by invitation only. They come with limited support and do not have SLAs. All offerings follow our standard pricing and billing procedures.
At the end of a private preview, we determine whether to continue an offering through its lifecycle. We reserve the right to change the scope of or discontinue a private preview product or feature at any point in time without notice, as outlined in our terms of service.
What is Webstack?
A web stack is a collection of software used for web development that includes, at a minimum, an operating system (Debian OS), a programming language (PHP), database software (MariaDB), and a web server (Apache/Nginx)—also known as a web application stack.
Type of Webstacks
Cloudways currently offers two stacks for your web hosting needs.
Hybrid Stack (Nginx plus Apache2)
Lightning Stack (Nginx Only)
Each stack has its own advantages and limitations. You can choose the stack that suits your website best.
Hybrid Stack
This stack combines the power of NGINX, Varnish, and Apache2. In this hybrid stack, NGINX serves as a reverse proxy for Apache2. The static content (e.g., CSS, JS, images, fonts) is directly served by NGINX, which then passes dynamic content (PHP requests) to Apache, whose responses are cached by Varnish in between. This way, you can enjoy the speed and efficiency of NGINX for static content, and the compatibility and flexibility of Apache2 for PHP content.
This stack is ideal for applications that require .htaccess support, offering wider compatibility with legacy PHP applications and WordPress plugins that may rely on htaccess and specific Apache features.
Lightning Stack
This stack combines the power of NGINX and Varnish. In the Lightning stack, NGINX is responsible for serving both static and dynamic content. NGINX passes all dynamic requests to FastCGI to communicate with PHP-FPM, making this stack much faster than the hybrid stack. Varnish caches each dynamic request response.
This stack is ideal for modern applications that don't require .htaccess support.
Known Limitations:
The Lightning stack doesn't support WebP fallback redirection for WordPress, as the feature is powered by htaccess.
The Lightning stack doesn’t include integration for one of the two firewalls currently integrated into the Hybrid stack. Switching to the Lightning stack would reduce the overall protection of your application.
How to switch Application Stack
All existing applications on the Hybrid stack are by default. If you want to switch a specific application from the Hybrid stack to the Lightning stack or vice versa, you can follow these steps shared below:
Step #1 — Navigate to Your Application
Log in to your Cloudways Platform using your credentials.
From the top menu bar, open Servers.
Next, choose the server where your desired application is deployed.
Click the globe icon.
Next, choose your application.
Step #2 — Navigate to Stack Settings
Under Application Management, select Application Settings
Select Stack setting tab. Here, you'll find the status indicating whether your application is currently configured to the Hybrid Stack or the Lightning Stack (default is Hybrid Stack)
Select Lightning Stack
Click on "Update Now"
You will be prompted here about switching stacks. Click "Yes, I want to" to confirm.
Benchmarks
Configuration:
WordPress App with k6 loadouts.
Varnish Disabled.
Redis - Object Caching Disabled.
Caching Plugins removed.
Test Instances:
DigitalOcean | Basic Series - 4vCPU 8GB (Premium)
Methodology:
The benchmark was conducted using k6. The LoadStorm test (in k6) is designed to simulate real users visiting the site, logging in and browsing. It tests uncached performance.
The process involved scaling users over a specified period. The simulated users will access the homepage, visit the login page, log in, and then navigate through all pages and posts.
The test duration was 30 minutes, scaling from 1 user at the start to 1000 users over 20 minutes, with a sustained peak load for 10 minutes. Each page load also retrieves all assets (CSS/JS/images) on the page that haven’t been loaded prior (to emulate a normal browser cache).
The key metrics are:
Total Requests - Number of requests k6 made
Total Errors - Number of error requests
p95 - The 95th percentile response time
Page Cum Avg - Cumulative average response time for Pages (html)
Asset Cum Avg - Cumulative average response time for Assets (css, js, images)
Login Cum Avg - Cumulative average response time for Login (wp-profile.php)
WP-Login Avg Response Time - Average response time for login (301 redirect, which validates credentials)
Stack Type | Total Requests | Total Errors | P95 (ms) | WP-Login Avg Response Time | Page Avg (ms) | Asset Avg (ms) | Login Avg (ms) |
Hybrid | 255190 | 3 | 5734 | 3000 | 3600 | 549 | 3238 |
Lightning | 394437 | 6 | 4620 | 2000 | 2703 | 487 | 2477 |
With the benchmarks, we can see that the lightning stack, compared to the hybrid stack, had
54% more requests served.
19% faster response times.
33% faster WP Login response times.
25% faster page response times.
11% faster average asset response times.
24% faster average login response times.
That’s it! We hope this tutorial was helpful. If you need help, please search your query on Cloudways Support Knowledgebase or contact us via chat (Need a Hand > Send us a Message). Alternatively, you can also create a support ticket.