The content of this article is from 《Precautions for jexus web server running in multi-process modeBy default, jexus web server runs in single-process mode. When JWS is modified. in the config configuration file, when the number of worker processes is set to a number greater than 1, JWS will work concurrently as per the specified number. Running jexus in multi-process mode is equivalent to the Web Garden of IIS 6. Configuring multiple worker processes can improve the performance of the application pool to process requests. However, before you configure multiple worker processes, consider the following:
- Every working process consumes system resources and CPU usage. Too many working processes will lead to a sharp consumption of system resources and CPU usage;
- Each worker process has its own status data. If a web application depends on a worker process to save status data, multiple worker processes may not be supported.
In multi-process mode, you need to consider the application in the cache and Session ):
1. Do not save the session in the process. That is, the sessionstate in Web. config cannot be configured as inproc. You should use a third-party session state server to save the session information. For example, you can set it to <sessionstate mode = "StateServer" stateconnectionstring = "TCPIP = myserver: 42424" timeout = "20"/> ".
2. You need to configure the machinekey. When jexus multi-process is run in parallel, the machinekey must be configured in the web. config file because the multi-host cluster works. Without this configuration, the website will encounter problems such as "unverifiable data errors. The following is a reference configuration for machinekey:
<Machinekey validationkey = "3ff1e929bc0534950b0920a7b59fa698bd02dfe8" decryptionkey = "encrypt" decryption = "3DES" validation = "sha1"/>
Machinekey can be generated through online tools: http://aspnetresources.com/tools/machineKey
References:
Website Optimization-IIS and web. config Configuration Optimization
IIS Tuner