Introduction to FastCGI technologies
Before we begin, you should know that (as the name suggests) FastCGI is actually a variation of Common Gateway Interface (CGI). Therefore, explaining CGI first is in order. The improvements introduced by FastCGI are detailed in the following sections.
Understanding the CGI mechanism
The original purpose of a web server was merely to respond to requests from clients by serving files located on a storage device. The client sends a request to download a file, and the server processes the request and sends the appropriate response: 200 OK if the file can be served normally, 404 if the file was not found, and other variants, as illustrated in the following diagram:
Figure 5.1: A diagram depicting standard HTTP requests
This mechanism has been in use since the beginning of the World Wide Web, and it still is. However, as stated before, static websites are being progressively abandoned at the expense of dynamic ones...