43 Million Requests, Zero Crashes: Scaling WordPress for High Traffic with JuiceFS

2026-12-03
SAQER (X: @SAQERPRESS)

ELEGELA LLC provides hosting, operation, and performance optimization services for WordPress websites. To handle sudden traffic spikes, the company built an origin-server architecture that serves static HTML pages directly when a cache hit occurs.

The architecture uses Apache HTTP Server and mod_lua to handle cacheable requests at the web server entry point, Redis to maintain a cache index, and JuiceFS as a shared storage layer for static cache files. Together, these components provide a unified way to store and serve HTML files generated by WordPress.

By leveraging JuiceFS' POSIX file system semantics, shared mounts, and local caching, multiple web servers can access the same cache directory. This reduces cache synchronization delays and minimizes remote storage access when serving frequently requested static pages. In LAN direct-connect tests with 100 concurrent connections, the system achieved 810.42 QPS and 105.29 MB/s, approaching the effective throughput limit of a 1 Gbps network interface.

This article is based on a technical submission from a user in Japan. The original case study provides additional details about the test environment, request flow, caching mechanisms, and performance results. For more information, see the original article.

The challenge: handling traffic spikes

ELEGELA provides hosting, operation, and performance optimization services for WordPress websites. WordPress is a widely used content management system (CMS) that powers many content sites, media publications, and corporate websites. It allows users to publish articles, manage pages, and extend site functionality.

By default, however, WordPress often generates pages dynamically rather than serving prebuilt files. A typical request passes through the web server, PHP runtime, WordPress application, plugins, and theme templates. WordPress may then query a MySQL database to generate the HTML page before returning it to the user.

This request path involves multiple processing stages. When traffic spikes, PHP workers, database connections, CPU, and I/O can all become bottlenecks. As a result, response times increase, and the website may even become unavailable.

GENIC PRESS, one of the websites operated by ELEGELA, experienced a typical traffic spike when an article spread rapidly across social media, particularly X, generating approximately 4.5 million impressions. A large volume of external traffic subsequently hit the origin server cluster directly.

According to Apache access logs, the frontend Apache servers handled a total of 43,051,859 HTTP requests between May 12 and May 20, 2026.

Traditional WordPress architectures and conventional page-cache plugins have limitations under this kind of traffic pressure. Even when a page is served from cache, requests often still enter the PHP runtime to determine whether a cached version is available. This means application-level overhead cannot be completely eliminated.

Therefore, the team wanted to move cacheable pages out of the dynamic request path, allowing origin servers to serve static content through a shorter and more predictable path.

The core challenge: sharing and serving static cache files across multiple nodes

One straightforward way to reduce the load on WordPress under high concurrency is to generate static HTML cache files ahead of time. When users request cacheable pages, the server can return these prebuilt files directly instead of regenerating pages through PHP, WordPress, and MySQL.

However, static cache files introduce another challenge in multi-node deployments.

If each web server maintains its own local cache, tools such as rsync or lsyncd are needed to synchronize files across nodes. When content is updated or a cache entry expires, files on different nodes may not be refreshed at the same time. Synchronization delays can range from several seconds to tens of seconds, potentially causing users to receive different versions of the same page.

Cache synchronization delays and consistency issues with local caches across multiple nodes
Cache synchronization delays and consistency issues with local caches across multiple nodes

Another option is to store static cache files in object storage and mount that storage as a file system for web servers to access. While this provides scalable storage capacity, operations such as opening files, checking attributes, and resolving paths may trigger remote object storage API requests.

Under high concurrency, the latency of these remote operations can directly affect origin-server response times. Access may also be affected by object storage rate limits.

Therefore, the real challenge is not simply how to generate static cache files. It is how to let multiple web servers access the same set of files reliably and efficiently. The underlying storage needs to provide a unified file system interface, support shared access across nodes, minimize cache synchronization delays, and reduce the I/O overhead associated with remote storage.

This is why the architecture incorporates JuiceFS. Static cache files need a unified shared storage layer that allows web servers to access cached content just like regular files while supporting consistent access and high read throughput across multiple nodes.

Architecture overview: bypassing the WordPress dynamic request path on cache hits

To address WordPress performance bottlenecks under high traffic, the team redesigned the request path for cacheable pages.

Request handling and routing when a cache hit occurs
Request handling and routing when a cache hit occurs

Request entry: bypassing the dynamic request path at the Apache layer

When a user request reaches Apache, the system uses mod_lua to evaluate it directly within the web server.

If the requested page is eligible for caching and a valid cache entry exists, the request is not forwarded to PHP-FPM. WordPress initialization, plugin loading, theme rendering, and MySQL queries are all bypassed.

The key advantage is that cache lookup happens earlier in the request path, at the web server entry point.

Unlike conventional WordPress cache plugins, which typically need to enter the PHP runtime before checking for a cached page, this architecture can short-circuit the dynamic request path much earlier. This reduces the risk of PHP workers and database connections being consumed by a large volume of concurrent requests.

Cache lookup: using Redis to locate static files

Once a request is identified as cacheable, the system needs to quickly locate the corresponding static HTML file.

Redis serves as the application-level cache index, storing mappings between URLs and cache file paths.

To avoid storing a large number of URLs as top-level Redis keys, the system uses a two-level hash structure. The top-level key combines the domain, path hash, and device type. Individual URLs are stored as hash fields, with their corresponding static cache file paths as values.

This structure supports a large number of page cache entries while keeping the number of top-level Redis keys manageable.

Static file access: reading cached pages from JuiceFS

After Redis returns the file path, the web server reads the corresponding static HTML file from the JuiceFS mount directory and returns it directly to the user.

In this architecture, JuiceFS serves as the shared storage layer for static cache files, providing a unified access path for content generated by WordPress.

From the web server's perspective, cached pages remain accessible through ordinary file system interfaces. Across the multi-node deployment, all web servers can work with the same cache directory. This eliminates much of the complexity associated with maintaining separate cache copies on individual nodes.

Serving static content: returning cache hits directly from the origin

With this request path, cacheable WordPress pages are effectively removed from the dynamic page-generation workflow.

For requests that hit the cache, the processing path becomes:

Apache/mod_lua evaluates the request → Redis looks up the cache file path → JuiceFS reads the static HTML file → Apache returns the page to the user.

The architecture also incorporates protection mechanisms at the Apache entry point. These include early filtering of suspicious paths, malicious crawlers, AI crawlers, and requests to endpoints such as xmlrpc.php and /wp-json.

By rejecting unwanted traffic early, the system prevents unnecessary requests from consuming resources in Redis, JuiceFS, PHP-FPM, and MySQL.

In this design, Apache/mod_lua handles request evaluation at the entry point, Redis maintains the cache path index, and JuiceFS provides shared access to static cache files.

Together, these components allow cache hits to bypass PHP and MySQL entirely. This gives the origin servers a shorter and more predictable path for serving static content.

Storage implementation: how JuiceFS supports high-frequency static cache reads

In this architecture, the storage layer ultimately handles the read traffic generated by static cache files.

Ideally, origin servers should be able to read cached pages just as they would read local files. At the same time, the underlying storage must support shared access across multiple nodes, provide sufficient object storage capacity, and deliver hot data efficiently.

ELEGELA uses JuiceFS as the shared file system for static HTML cache files generated by WordPress.

JuiceFS uses a data-metadata separation architecture. In this deployment, Redis serves as the metadata engine, managing file system metadata such as directory structures, file names, file sizes, timestamps, and permissions. File data is split into fixed-size 4 MB chunks and stored in object storage.

JuiceFS Community Edition architecture
JuiceFS Community Edition architecture

To handle frequently accessed cached pages, JuiceFS works with local NVMe SSDs and the operating system's page cache to keep hot data as close to the web servers as possible.

Once cache files are available locally, origin servers can read static pages with less latency than accessing remote object storage for every request.

For deployment, the JuiceFS mount directory is exported to web-facing hosts through NFSv4.2. The configuration also uses options such as noatime and larger rsize/wsize values to reduce the overhead of access-time updates and network transfers.

To the web server, cached pages remain accessible through ordinary file paths. Under the hood, JuiceFS coordinates metadata, object storage, and local caching to manage data access.

The value of JuiceFS in this scenario goes beyond simply storing cache files. It brings object storage, local caching, and POSIX file access together in a unified shared storage layer, providing a stable foundation for serving static pages at high concurrency.

Performance testing: approaching the effective throughput limit of a 1 Gbps network interface

To evaluate how the architecture performs under high concurrency, the team used wrk, an HTTP benchmarking tool, to run three groups of stress tests.

  • Test 1: Compare traditional WordPress, plugin-based caching, and the new architecture to measure the performance gains from shortening the request path.
  • Test 2: Evaluate performance under external network conditions in a WAN environment.
  • Test 3: Use a direct LAN connection to eliminate the effects of public network links and upstream proxies, measuring the architecture's throughput under cache-hit conditions.

The test environment consisted of 4 vCPUs, 8 GB of RAM, and Ubuntu 24.04 LTS. Each wrk test used four threads and ran for 30 seconds. The tests used real HTML pages from the production website, with each file approximately 133 KB in size.

Test 1: comparing traditional WordPress, plugin-based caching, and the new architecture

The first test compared three configurations with 10 concurrent connections.

Configuration QPS Throughput Average latency Errors
Traditional WordPress 3.46 0.44 MB/s 1.89 s 68 timeouts
Plugin-based caching 38.20 5.08 MB/s 256.40 ms 0
New architecture 273.53 35.54 MB/s 29.19 ms 0

The results show that traditional dynamic request handling and application-level caching still leave considerable runtime overhead from PHP, WordPress, and MySQL.

By moving cache handling to the web server entry point, the new architecture significantly improved both throughput and response latency.

Test 2: performance under WAN conditions

The second test used a WAN environment without an external CDN. The team tested the system with 100 and 500 concurrent connections.

Test scenario QPS Throughput Average latency P50/P90 Socket errors
WAN, 100 concurrent connections 318.76 41.57 MB/s 338.88 ms 254.19 ms / 616.49 ms 63 read errors / 13 timeouts
WAN, 500 concurrent connections 270.14 35.88 MB/s 600.25 ms 420.74 ms / 1.43 s 1,267 read errors / 1,639 timeouts

In the WAN environment, throughput remained between 270 and 318 QPS, with data transfer rates of approximately 35–41 MB/s.

As concurrency increased to 500, socket errors and timeouts rose significantly. This indicated that the external network path or upstream proxy had started to become a limiting factor.

Test 3: direct LAN performance

To eliminate the limitations of external proxies and WAN bandwidth, the team conducted another round of tests over a direct LAN connection.

Before testing, ping latency ranged from approximately 0.05 to 0.09 ms.

The results were as follows:

Test scenario QPS Throughput Average latency P50/P99 Socket errors
LAN, 100 concurrent connections 810.42 105.29 MB/s 153.50 ms 92.60 ms / 742.19 ms 25 read errors / 0 timeouts
LAN, 500 concurrent connections 748.75 97.28 MB/s 334.15 ms 58.91 ms / 1.85 s 864 read errors / 2,129 timeouts

The most notable result came from the LAN test with 100 concurrent connections. The system achieved 810.42 QPS and 105.29 MB/s, equivalent to approximately 842 Mbps. This approached the effective throughput limit of a 1 Gbps network interface under the test conditions.

With 500 concurrent connections, the system still maintained 748.75 QPS and 97.28 MB/s. P50 latency was 58.91 ms. However, read errors and timeouts increased significantly, suggesting that the system was encountering limitations related to network send buffers, physical bandwidth, or other factors at higher concurrency.

The results show that, when cache hits are served over a direct LAN connection, the dynamic application processing path can be substantially reduced. The primary bottlenecks then begin to shift toward network bandwidth and other physical infrastructure limits.

For a dynamic CMS such as WordPress, this means that cacheable pages can be served much more like static files rather than being generated dynamically through PHP and MySQL for every request.

Production validation: serving more than 43 million requests without crashes

In addition to controlled stress tests, the architecture was validated under real production traffic.

During one traffic spike at GENIC PRESS, an article spread rapidly across social media, particularly X, generating approximately 4.5 million impressions. A large volume of external traffic subsequently reached the origin server cluster directly.

According to Apache HTTP Server access logs, the frontend Apache servers handled 43,051,859 HTTP requests between May 12 and May 20, 2026.

During this traffic spike, the site did not rely on a commercial external CDN to distribute traffic. Instead, the origin-side architecture handled the incoming requests directly.

Because cacheable pages were handled early at the Apache entry point, a large proportion of requests did not proceed to the PHP-FPM, WordPress, or MySQL dynamic request path.

During the traffic spike, CPU utilization on the backend PHP-FPM and MySQL services remained at 0.0%. This indicated that the architecture effectively protected application and database resources from the traffic surge.

Real-user experience metrics also reflected the results. Measurements from Google PageSpeed Insights and the CrUX API showed:

  • TTFB: 0.6 seconds on desktop and 0.5 seconds on mobile.
  • LCP: 1.9 seconds on desktop and 2.2 seconds on mobile.
  • INP and CLS: Both met the Core Web Vitals passing thresholds.

To maintain production reliability, the Lua handler also includes fallback logic.

If a Redis query fails, requests fall back to the normal WordPress dynamic request path. The system also excludes abnormally small cache files from cache hits to prevent incomplete or erroneous pages from being served directly to users.

For dynamic CMS platforms such as WordPress, generating static files for cacheable pages and serving them before requests reach PHP-FPM, WordPress, and MySQL is an effective way to handle sudden traffic spikes.

In this architecture, JuiceFS provides the shared storage layer for static cache files. Combined with Apache/mod_lua for early request handling and Redis for cache path lookups, it allows multiple origin servers to work with the same set of cached files while protecting backend application and database resources during traffic surges.

Looking ahead, the team plans to explore moving load-balancing capabilities further upstream into the Lua layer and extending the architecture to Kubernetes, multi-region cache delivery, and larger-scale horizontal deployments.

Author

SAQER (X: @SAQERPRESS)
Focusing on cybersecurity, web security, and server architecture