The following figure shows the architecture of Cosminexus HTTP Server process.
Figure 4-4 Cosminexus HTTP Server process architecture (Windows Version)
When you start Cosminexus HTTP Server, the control process starts. The control process starts the server process and monitors the server process operations. When the server process starts, the main thread also starts simultaneously. The main thread starts an accept thread to receive requests and starts the request processing server threads equal to the number specified in the ThreadsPerChild directive.
The OS accepts TCP connection of a client, through the IP address and port specified in the Listen directive, and reserves the connection in the Listen queue of OS. You can specify the size of Listen queue in the ListenBacklog directive. The TCP connection that cannot be stored in the Listen queue is not established. The accept thread accepts the TCP connection from the Listen queue and registers the connection in the request queue with the size specified in the HWSMaxQueueSize directive. One of the server threads picks up this connection, and then receives and processes the HTTP request. If the TCP connection cannot be stored in the request queue as the TCP connection exceeds the HWSMaxQueueSize directive value, the accept thread closes the TCP connection.
You cannot increase or decrease the number of server threads.