LAMPSource code-level research in the SeriesApacheThe specific content is as follows:
To start this topic, I want to solve the problem of why we need to do so first. To look at Apache at the source code level, you must first solve the attitude problem.
Tracking Apache history, which has been more than 20 years since the cern http server written by Tin Berners-Lee in 1991. Apache is now the most popular Web server. The web servers used by facebook, google, Baidu, and other large Internet companies are customized Apache, which is also called Apache in a broad sense. In this case, the vast majority of Internet traffic is provided by Apache servers. In terms of PHP, although nginx is a rising star, Apache and nginx are everywhere on the Internet. The arguments are basically the same: nginx is better than Apache. We will not compare it here, as long as you admit that Apache is indeed a good web server. As for this, I don't think nginx fans will question this. Apache's well-designed modular architecture has become a classic server architecture.
However, looking at the Apache books on the computer shelf, almost all of them talk about how to use Apache. There are very few source code-level research on Apache. However, from a utilitarian point of view, many large companies are looking to recruit people who are familiar with the Apache module and have experience in developing the Apache module. From Practice to theory, I think it is necessary for related practitioners to study Apache at the source code level. From the perspective of software development alone, because of Apache's excellent architecture, anyone who studies it deeply can absorb rich nutrition.
One of the most important reasons I think about Apache at the source code level is the business changes. As the business changes, we often need to develop new modules or modify existing modules based on the existing Apache modules when developing applications. For a simple example, many popular SNS games require clients to send requests to the server. My experience shows that many requests only require the server to return several bytes of results. However, we all understand that Apache uses the HTTP protocol. no matter whether the request or the returned result, there are basically three parts: the request line (return status), the header, and the data body. Even if you only return the processing result of one byte, it also returns a large data stream. For previous webpage-based applications, the header information is negligible for CSS styles, images, and other information on the webpage. However, you need to carefully consider this type of SNS. Many popular SNS games are facing a lot of pressure on servers. When we set up an SNS server, we customized the Apache module based on our application, this will greatly reduce the application pressure on the server.
Through the article, we understand a lot of truth. The LAMP Apache module is very useful, but it needs to be improved!