Build environment: Redhat 5.8 httpd-2.2.3-63.el5.i386
HTTP protocol Simple introduction: Http:hyper Text Transfer Protocol: Hypertext Transfer Protocol, is a TCP based transmission mode, TCP transmission mode is 3 times handshake to establish the connection, four times disconnected. To resolve the slow connection speed, the local caching mechanism is added. Browser caching is the speed at which Web pages are accessed.
The way the Web server handles concurrent connection requests is as follows
1, single-threaded Web server (single-threaded Web servers)
In this schema, the Web server processes one request at a time and reads and processes the next request at the end. All other requests are ignored during a request processing, so there will be serious problems in scenarios where concurrent requests are more numerous.
2, multi-process/multi-threaded Web server
In this architectural approach, the Web server generates multiple processes or threads to process multiple user requests in parallel, and processes or threads can be generated on demand or in advance. Some Web server applications generate a separate process or thread to respond to each user request, but multiple simultaneous processes or threads will consume a significant amount of system resources once the number of concurrent requests reaches tens of thousands.
3. I/O multiplexing Web server
To be able to support more concurrent user requests, more and more Web servers are using multiple reusable architectures-synchronizing monitoring of the active state of all connection requests, and performing a series of specific actions for a connection when the state of a join changes (such as when data is ready or an error occurs); The connection is reset back to the temporary stable state and returned to the Open connections list until the next state change. Because of its multiplexing nature, processes or threads are not occupied by idle connections, thus providing an efficient mode of operation.
4. Multiplexing multi-threaded Web server
A Web server architecture that combines the functions of multiple processes and multiplexing to avoid allowing a process to serve too many user requests and to take full advantage of the computing power provided by multiple CPU hosts.
The following basic installation, testing of the Web server
1. Installation httpd
Yum Install httpd
Start a service
Service httpd Start
You can see the test page