CH-J Toolsserver management over SSH
Menu
All guides and articles →

How to handle the onslaught of over 100,000 visitors per day

Capacity plan for peaks, static and dynamic traffic, limits, request load and verification. Traffic numbers as a model, not an imaginary record.

One hundred thousand visitors are not one hundred thousand identical requests

The number of visitors is a useful indicator for the audience, but it does not determine the demands on the server. The number of pages per visit, additional files, API, cache, transfer size and time distribution are all factors. A single visitor to a static article and a user of a complex administrative export can create very different loads.

This article uses a transparent capacity model and experience with CH-J optimization. It does not claim that a day with 100,000 unique visitors has been newly measured here or that such a maximum capacity has been verified. The actual measurement is described below separately from the model assumptions. The operational plan should also maintain this limit in the marketing headline.

Convert visits to the necessary quantities

Model: 100,000 visitors, three pages each, each page making a total of ten HTTP requests including the document. This results in three million requests per day, averaging about 34.7 per second. If PHP only requires one request from each page, this results in 300,000 dynamic requests, averaging about 3.47 per second.

At a modeled 20x peak, this is about 694 total and 69.4 dynamic requests per second. This is not an estimate of CH-J's actual traffic, but a consequence of the assumptions chosen. A bot repeating an expensive URL can put more strain on PHP than many readers served from static. Therefore, separate legitimate audiences and technical traffic.

Calculate the cost of a dynamic operation

If one request consumes 200ms of CPU, four such requests per second require an average of about 0.8 CPU cores just for that work. This simple model does not include other processes, spikes, or waits. Therefore, reducing the load of one frequently called function can have a greater impact than adding several FPM workers.

In a controlled test by CH-J on a standalone 6vCPU VM, the median CPU of the PHP homepage dropped from 205.732 to 6.247 ms after changing the revalidation of the publication. The test had 40 requests per variant at 4 per second. This is a documented change in a specific job, not evidence of serving an audience of hundreds of thousands or a benchmark of any server.

Design static and cache based on content

Images, fonts, and versioned files should not be entered into PHP without reason. Appropriate cache headers and stable versioned URLs reduce retransmissions. Page size affects both network and client speed: a model of 300,000 views at one megabyte of data transferred per view means 300 GB per day before other influences.

Only implement dynamic caching with a clear contract. Login pages, personal data, sessions, and CSRF must not leak into the shared response. A good cache also knows when to invalidate after publication. A fast old or foreign response is not an operational success. First, break down URLs by real properties, not just by extension.

Reduce costly pre-application abuse

Rate limiting on the web server can reject unreasonable requests before they overwhelm PHP. The rules should correspond to a specific expensive path, not unnecessarily block normal downloading and reading of articles. Consider the client's real address as a trusted proxy and do not accept any header from the internet as the true identity.

Per-client limits and overall shared capacity protection address different situations. Many independent clients can collectively exhaust the backend even if individual limits are met. Return the correct status and appropriate information on rejection. Also test limits for coded and alternative paths if they lead to the same demanding operation.

Measure peaks and user outcomes

Monitor request rate, bytes transferred, backend time, FPM queue, errors, CPU, memory, and database waits. Use time windows to plan for actual peaks. A daily average will mask a five-minute spike, and a single screenshot of high CPU won't show the full length or impact of the issue.

Perform the load test in a legitimate sandbox environment with a representative mix of URLs. Set a termination threshold beforehand and monitor for content integrity, not just HTTP 200s. Include cache warm-ups, new posts, and error conditions. Serially measuring ten common GET requests is not a capacity test.

Prepare for degradation and restoration

As you grow, you need to know which features have priority and which can be temporarily reduced. A second node will only help with verified publication and prepared routing. Backups and rollback must be available even in the event of a surge. Don't add new components based solely on visitor numbers unless they solve a measured bottleneck.

  • The assumptions of the attendance model are explicit.
  • Dynamic work and transmission have a separate budget.
  • Expensive URLs have adequate protection.
  • Measurements include spikes, errors, and content accuracy.
  • Degradation and restoration have a clear progression.

A hundred thousand visitors a day can mean a completely different job for different websites. A useful capacity plan translates the audience into specific requirements and resources. Documented optimization then shows which part of the costs has really decreased and what margin still needs to be verified.

Frequently asked questions

Is 100,000 visitors the same as 100,000 requests?

No. The number of requests depends on pages, files, API, and cache.

Does the article document such a day of CH-J attendance?

No. The traffic numbers are explicitly a model; the actual documented measurement relates to specific PHP optimizations.

Is it enough to increase the number of FPM processes?

Without identifying the bottleneck, this may not help and may increase pressure on memory or the database.

Detailed documentation

NGINX: request frequency throttling →

NGINX: access logs and times →

PHP: FPM configuration →

Biometric unlock and security →

All tutorials by category →