Choosing the right web server is crucial for website performance. To assist in this decision, we conducted a detailed performance comparison of three popular web servers: LiteSpeed Enterprise, Apache, and NGINX.
Video

Watch on YouTube.
Test Environment & Explanation
- Server: Hetzner CPX11 (2x vCPU, 2GB RAM, 40GB NVMe SSD, 10Gbit Network)
- Control Panel: Enhance
- Configuration: No CDN, Latest WordPress release, PHP 8.1, no Redis, Standard Out of the Box Experience
- Web Servers: Apache and NGINX (without native caching plugins), LiteSpeed Enterprise (with default LiteSpeed Cache plugin without any settings)
- Testing Tool: loader.io
- Test Type: Maintain Client Load (1 to a maximum specified number of clients)
The “Maintain Client Load” test is a specific type of performance testing used to evaluate the resilience and scalability of a web server or application under sustained traffic. This test is crucial for understanding how systems behave under a continuous and increasing load over a set period. - Failure Rate: 1%
Test Phases
- Without Cache: Ranging from 1 to 350 clients/second, 1 to 700 clients/second, and for LiteSpeed, 1 to 2400 clients/second over 5 minutes.
- With Cache: WP Fastest Cache enabled for Apache & NGINX, replicating the non-cached scenario.
Results Summary
Without Caching Plugin
The primary goal was to assess how these web servers handle increasing loads without the benefit of caching, except Litespeed which have native caching capabilites out of the box experience.
Test #1 – 1 – 350 clients/s over 5 minutes
Apache:
- Average Response Time: 4083ms
- Min/Max Response Time: 134ms / 9237ms
- Success Response Count: 12,797
- CPU Usage: 100%


NGINX:
- Average Response Time: 4422ms
- Min/Max Response Time: 136ms / 9050ms
- Success Response Count: 11,798
- CPU Usage: 100%


LiteSpeed Enterprise:
- Average Response Time: 95ms
- Min/Max Response Time: 95ms / 494ms
- Success Response Count: 542,049
- CPU Usage: 25 – 35%


Test #2 – 1 – 700 clients/s over 5 minutes
Apache:
- Average Response Time: 5244ms
- Min/Max Response Time: 140ms / 19502ms
- Success Response Count: 8,118
- Timeout Response Count: 162
- Timing out at: 390 clients/second
- CPU Usage: 100%


NGINX:
- Average Response Time: 5254ms
- Min/Max Response Time: 136ms / 10315ms
- Success Response Count: 7,115
- Timeout Response Count: 363
- Timing out at: 410 clients/second
- CPU Usage: 100%


LiteSpeed Enterprise:
- Average Response Time: 95ms
- Min/Max Response Time: 95ms / 615ms
- Success Response Count: 1,114,793
- CPU Usage: 35 – 50%


Test #3 – 1 – 2400 clients/s over 5 minutes
- LiteSpeed Enterprise:
- Average Response Time: 213ms
- Min/Max Response Time: 95ms / 2151ms
- Success Response Count: 1,675,476
- Timeout Response Count: 0
Note: Throttling at around 1000 clients/second to prevent timeouts. - CPU Usage: 35 – 100%


Analysis – No Cache
- Performance Efficiency: LiteSpeed Enterprise demonstrates significantly better performance efficiency compared to Apache and NGINX in all tests, handling more requests with lower response times and better CPU usage management.
- Scalability: LiteSpeed Enterprise scales much better under high load without timeouts, suggesting superior resource management and request handling capabilities.
- Apache vs NGINX: Both Apache and NGINX show similar performance under stress, with 100% CPU usage and increasing response times as the number of clients increases. However, Apache slightly outperforms NGINX in terms of the number of successful responses.
- Reliability: LiteSpeed Enterprise shows high reliability even at 2400 clients per second, with no timeouts and automatic request throttling, indicating a robust architecture for high-traffic scenarios.
- Timeouts: The occurrence of timeouts in Apache and NGINX during higher load tests indicates potential bottlenecks in handling concurrent connections and may reflect negatively on user experience and revenue in real-world scenarios.
This analysis indicates that for high-traffic WordPress sites, particularly without caching, LiteSpeed Enterprise offers a significant advantage in terms of performance, scalability, and reliability.
With Caching Plugin
The primary goal was to assess how these web servers handle increasing loads with the benefit of caching, using WP Fastest Cache.
Test #1 – 1 – 350 clients/s over 5 minutes
CPU Usage: 5-100%, reaching 30% at 50 clients/second and 100% at 275 clients/second
- Apache:
- Average Response Time: 184ms
- Min/Max Response Time: 95ms / 10,461ms
- Success Response Count: 286,741
- Timeout Response Count: 60
- Timing out at: 260 clients/second
- CPU Usage: 5-100%, reaching 30% at 50 clients/second and 100% at 275 clients/second

- NGINX:
- Average Response Time: 526ms
- Min/Max Response Time: 99ms / 2859ms
- Success Response Count: 101,305
- CPU Usage: 20-100%, reaching 100% at 50 clients/second

Test #2 – 1 – 700 clients/s over 5 minutes
- Apache:
- Average Response Time: 184ms
- Min/Max Response Time: 95ms / 10,461ms
- Success Response Count: 286,741
- Timeout Response Count: 328
- Timing out at: 275 clients/second
- CPU Usage: 5-100%, reaching 30% at 50 clients/second and 100% at 275 clients/second

- NGINX:
- Average Response Time: 1050ms
- Min/Max Response Time: 99ms / 10,318ms
- Success Response Count: 100,968
- Timeout Response Count: 7
- Timing out at: 690 clients/second
- CPU Usage: 20-100%, reaching 100% at 50 clients/second

Analysis – With Cache
- Cache Impact: Implementing WP Fastest Cache significantly improves the performance of both Apache and NGINX, particularly noticeable in the reduced average response times and increased success response counts.
- Apache Performance:
- Shows good improvement with caching, notably in average response time.
- CPU usage is more efficiently managed, though it peaks at higher client loads.
- Experiences timeouts at a lower client threshold compared to NGINX.
- NGINX Performance:
- Demonstrates a substantial increase in average response time under higher load (Test 2).
- Maintains higher resilience against timeouts, handling more clients before timing out compared to Apache.
- CPU usage reaches its peak quickly as client load increases.
- Comparison:
- Apache shows better average response time performance, especially noticeable in Test 2.
- NGINX, while having higher average response times, manages to handle more clients before experiencing timeouts, indicating better scalability under high load with caching.
- CPU usage patterns suggest that Apache might be more efficient in resource utilization under moderate loads but struggles under high loads compared to NGINX.
- General Observation:
- The implementation of caching dramatically improves the capacity to handle higher client loads for both servers, but they each exhibit different strengths and weaknesses. Apache shows better response times but lower tolerance for high client loads, while NGINX scales better but with longer response times.
These insights can guide optimization strategies depending on the expected traffic patterns and performance priorities for a given application or website.
Conclusion
The tests unequivocally demonstrate that LiteSpeed Enterprise stands out as a superior choice for high-traffic WordPress sites, especially in scenarios demanding high performance and reliability. While Apache and NGINX can be optimized with caching, they still lag behind LiteSpeed in terms of scalability and efficiency.
This comprehensive comparison underscores the importance of selecting a web server that not only meets the current needs but can also efficiently handle future growth and traffic spikes. In this context, Webnestify emerges as a robust solution provider.
A significant advantage of LiteSpeed Enterprise is the potential for substantial cost savings. The LiteSpeed Cache plugin, often regarded as the best caching solution in the market, offers a broad range of services including advanced image optimization. Its integration with Quic.cloud and features like Guest Optimization mean that there is no need to invest in additional premium caching or image optimization plugins. This all-in-one approach not only streamlines your website’s performance but also reduces the overall cost of maintaining a high-traffic site. Furthermore, Webnestify’s partnership with QUIC.cloud enhances this offering, providing even more robust optimization and acceleration capabilities.
Webnestify offers high-performance dedicated LiteSpeed Enterprise web servers tailored for any project. As a proud official LiteSpeed Solution provider (see LiteSpeed Technologies Solution Partners), Webnestify is committed to delivering top-tier hosting solutions. We invite you to visit our application page for exclusive access to a wide range of Webnestify Services, ensuring your website’s performance is not just optimal but exceptional.
