What is a Network Server?

Network server [1] is the core component of computer local area network. The network operating system runs on a network server, and the efficiency of the network server directly affects the efficiency of the entire network. Therefore, a high-end computer or a dedicated server computer is generally used as the network server. The web server has the following four functions:

In a standard C / S mode computer network, the network server [2]
Generally, the network server can adopt the following four implementation technologies:
1) "Instant creation, immediate destruction strategy", that is, the server connects with each client that makes a request, and creates a child process for each client request to process.
After the concurrent server is started, the system daemon listens on a fixed port to see if a client initiates a connection request. If a client request is received, the server daemon creates a child process to handle the client's request, while the daemon continues to listen for connection requests from other clients on the original port. After the child process finishes serving the client, it closes the connection, releases the resources it holds, and exits automatically.
Obviously, this kind of concurrent server has the following shortcomings: (1). Time extension. Before serving the client process, the server parent process needs to create a new child process, so the client process must wait at least for the delay of creating a child process. For some network applications that require high real-time performance, such delays cannot be tolerated; (2) source failures are expensive. For each client process request, the server parent process creates a new child process. Each child process consumes almost the same resources as the parent process. Therefore, the number of creation processes is limited in many systems; (3) the utilization rate of the source is low. The lack of an effective inter-process communication mechanism between the parent process and the child process makes the parent process unable to effectively control the child process. At the same time, the child process will terminate itself after completing the service to the client process and cannot be reused. Cannot continue to be Its sleeve customer lecture service.
2) The server creates multiple child processes in advance, and the child processes process client requests. This method is called "pre-creation".
The server based on the "pre-created" technology solves the latency problem of the client process, but also has the following problems: (1) The server always maintains a fixed number of child processes, so that even if there is no connection request from the client process, the system also These idle processes will be kept, causing waste of system resources; (2) The civil server only provides a fixed number of child processes. If the number of client connection requests exceeds the number of child processes, the client process must wait for the services of other client processes Termination, which may cause greater delay; (3 If a child process exits abnormally, the number of client process connections that the server can support at the same time will be reduced by 1, which will weaken the server's concurrent processing capabilities.
In order to overcome the above problems, dynamic "pre-creation" technology can be adopted, that is, the parent process of the server creates a certain number of child processes according to the system's resource status or the number of user requests, and then puts them into a "pool" to form a "process" Pool. " When a client request arrives, instead of creating a new process to serve it, a free process is selected from the "pool" to serve it. After the service is completed, the process enters the idle state. If the number of concurrently requested customers is greater than the number of processes in the process pool, the system can increase the number of "in the pool" processes according to the status of system resources, or queue or simply discard client requests, depending on the situation . By adopting this technology, the response time of the server is accelerated, the utilization efficiency of resources is improved, and the server crash problem caused by excessive client requests is effectively prevented.
3) The server uses the function select to implement I / O multiplexing for multiple client connections;
In addition to using multiple processes or threads to implement concurrent servers, you can also use I / O multiplexing technology. Through this technology, the system kernel buffers I / O data. When some I / O is ready, the system will notify the application that the I / O is readable or writable, so that the application can complete the corresponding I / O operation immediately. Instead of waiting for the system to complete the corresponding I / O operation, the application does not have to be blocked by waiting for the I / O operation.
Compared with multi-process or multi-thread, the biggest advantage of I / O multiplexing technology is that the system overhead is small. The system does not have to create processes and threads, and does not have to maintain these processes and threads, which greatly reduces the system overhead.
4) The strategy of the super server activating the auxiliary server.
Servers in this mode require multiple servers, one of which (super server) is waiting for a request from a client on a well-known port. Once the super server receives the client's request, it immediately activates a slave server and transfers the user's request to the activated slave server. The slave server then maintains a connection with the client program to complete the processing of the client's request, while the super server continues to listen to the client's request on the original port.
In this server model, each slave server is still a concurrent server, so the system's concurrency capability is significantly improved. However, the use of this server model requires an increase in the number of servers, which increases the cost of the system, and is usually used for some access Larger number of web servers.
Sometimes we see another concept different from web server
(1) Make a backup of the server system for timely recovery.
(2) Close unnecessary service ports and open only the required ports.
(3) abnormal process
Major search engines are choosing some websites with better user experience to make better rankings. The PV value of a website directly affects the ranking of the website. Then, if you choose the products of such a high-quality server renter, each visitor will visit your website very quickly, and the PV value will naturally be high. Then the experience on your website will naturally be good. If every visitor is like this, the search engine's friendliness will gradually improve. Then naturally give better weight. Therefore, high-quality network storage space is the basis for improving customer experience.

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?