In the web server, Nginx accounts for about 30%, how to choose this layer when building a website
Should we choose to use a reverse proxy and a web server layer specifically for website selection? According to public statistics, this layer has long been a general piece - In the statistics of W3Techs in October 2026, the usage rate of Nginx is 30.7%, which is about three tenths of the sites using it. The concentration of shares means that this layer is unlikely to become a bottleneck, and the focus of selection should shift from 'which software to choose' to 'how to configure this layer': The performance gap brought by configuration differences of the same software is much greater than that of changing to a different software.
What can share data show?
About three-tenths of the usage rate indicates three things. First, the documentation, community, and debugging experience are sufficient, making it easy to find similar cases when encountering problems. Second, the panel and deployment tools are maturely adapted to it, and generating site configurations in environments like Baota panel and aaPanel is a standard action. Third, it has been repeatedly verified with various backend programs, and there is no doubt about whether it can run.
The share data cannot explain the performance advantages and disadvantages. It statistics is the installation distribution, not the pressure test results, using it as the 'reason to choose it's technology' is using wrong data. What truly determines the performance is the following three configurations: how to deliver static resources, where the jump rules fall, and how to set proxy timeout and buffering.
The configuration is where the differences lie.
The responsibility of the reverse proxy layer is to forward external requests to the backend program and then return the response to the browser. There are many things that can be done on this chain: static files can be returned directly by the proxy layer without going to the backend, compression and cache headers can be added here, redirect rules can be written here, and the source address can be passed to the backend here.
The difference between two configurations of the same software is usually reflected in four places: whether static resources penetrate to the backend, whether redirection is completed at the proxy layer, whether the cache headers are set consistently, and whether the source address is passed correctly. None of these four items depend on changing the software; it is the configuration that is changed.
Static resources and redirect rules
Static resource delivery is the easiest to waste performance. If images, styles, and scripts are forwarded to the backend program for processing, each request must go through the application logic; by the proxy layer directly reading and attaching cache headers, the backend only handles dynamic requests. Resident memory programs have more room for improvement on this point, with the official figures showing a reduction of about 80% in memory compared to script-based systems, but even for the same set of programs, the difference between static resource penetration and non-penetration is very intuitive.
The redirect rules must be consistent with the rules within the program. Old addresses generated by domain switching, directory adjustment, and column renaming are generally redirected to new positions using 301 redirects. This layer can be written in the proxy configuration or configured in the background redirect management, the key is that only one place can be used as the standard: when two sets of rules are inconsistent, it is easy to occur that the proxy layer returns the redirect first and the redirect table in the program will never reach, and it is easy to misjudge during troubleshooting that the redirect configuration has not taken effect.
The same as pseudo-static. The address format is defined by the pseudo-static rules on the program side, and the proxy layer only needs to forward the request correctly, without duplicating the rules written in two places.
Proxy timeout and backend capability
The response time of the backend program determines how to set the timeout of the proxy layer. If the proxy timeout is shorter than the actual processing time of the program, it will manifest as random error pages, and the log often only leaves a connection interruption, making it difficult to find the cause; a long timeout or incorrect buffer setting will put pressure on the connections during high concurrency.
Here is the fact that the backend is a resident process often overlooked. Resident programs do not release connections when handling long requests, and the timeout value of the proxy layer should be left with a margin, rather than copying the default value of the script environment. The method of judgment is very simple: choose a background time-consuming operation (such as batch import or generating a site map) and measure the time consumption once, and then set the timeout accordingly, which is more reliable than guessing based on experience.
In high concurrency scenarios, we still need to look at the carrying capacity. The official description states that the page loading speed is significantly improved compared to traditional script-based CMS, with a single machine capable of carrying about 5 million PV. These approximate numbers are the starting point for capacity planning, not a promise - they also depend on proxy layer configuration, machine resources, and site content structure.
What four things should this layer focus on during website construction?
The certificate is effective where. When using HTTPS, the certificate is usually terminated at the proxy layer, and the backend receives plaintext. It is necessary to confirm that the redirect relationship will not cause a loop.How do you transmit the source address. If the backend cannot obtain the real visitor's address, the logs and access statistics will all be recorded as proxy addresses. Such issues can be resolved during the installation stage, and after-the-fact remedies require changes to two places.Three is a port relationship. For example, AnQiCMS listens to the default port 8001, the domain access should be consistent with direct port access, and directly exposing the port is usually a configuration oversight.Four is the site map and crawling authorization. The rules of the proxy layer will affect the search engine crawling path, and after generating the site map, it is necessary to actually crawl once to check.
Common questions
Should this layer be updated with the version? The focus is on security advisories rather than new features. Whether within the affected version range, judge according to the announcements of the release channel, and do not upgrade just because 'there is a new version'.
Is a high share rate a sign that no optimization is needed? On the contrary, the comparability between general components is all about configuration. The same software, the delivery method, jump, and timeout settings, whether they are set correctly or not, the gap measured is even greater than the software itself.
Should the jump be placed in the proxy layer or the program layer? Choose one as a benchmark, and the other only for forwarding. The built-in jump management of the program can follow the content, and the rules of the proxy layer need to be manually maintained. It is more convenient to use the former when the content changes frequently.
A criterion for judgment
Is this proxy layer worth picking separately, it depends on whether you treat it as software or configuration. When viewed as software, the share data has already explained that it is a general-purpose component; when viewed as configuration, the actual differences lie in static resource delivery, jump consistency, timeout, and source transmission, which are the places where the actual work is required when building a website.