Web server plug-in tuning tips
Balance workloads
To limit the number of connections that can be handled by an appserver...
- Go to...
Servers | Server Types | WebSphere application servers | server_name | Additional Properties | Web Server Plug-in properties
- Select...
Use maximum number of connections
...for the field...
Maximum number of connections that can be handled by the Application Server- Specify in the Connections field the maximum number of connections to allow.
- Click Apply and Save.
When this maximum number of connections is reached, the plug-in, when establishing connections, automatically skips that application server, and tries the next available appserver. If no application servers are available, an HTTP 503 response code will be returned to the client. This code indicates that the server is currently unable to handle the request because it is experiencing a temporary overloading or because maintenance is being performed.
The capacity of the appservers in the network determines the value you specify for the maximum number of connections. The ideal scenario is for all of the appservers in the network to be optimally utilized. For example, if we have the following environment:
- There are 10 appservers in a cluster.
- All of these appservers host the same applications (that is, App_1 and App_2).
- This cluster of appservers is fronted by five IBM HTTP Servers.
- The IBM HTTP Servers get requests through a load balancer.
- App_1 takes approximately 60 seconds to respond to a request
- App_2 takes approximately 1 second to respond to a request.
Depending on the request arrival pattern, all requests to App_1 might be forwarded to two of the appservers, say Appsvr_1 and Appsvr_2. If the arrival rate is faster than the processing rate, the number of pending requests to Appsvr_1 and Appsvr_2 can grow.
Eventually, Appsvr_1 and Appsvr_2 are busy and are not able to respond to future requests. It usually takes a long time to recover from this overloaded situation.
To maintain 2500 connections, and optimally utilize the appservers in this example, set the number of maximum connections allowed to 50. (This value is arrived at by dividing the number of connections by the result of multiplying the number of Application Servers by the number of Web servers; in this example, 2500/(10x5)=50.)
Limiting the number of connections that can be established with an appserver works best for Web servers that follow use a single, multithreaded process for serving requests.
[Windows] IHS uses a single, multithreaded process for serving requests. No configuration changes are required.
(UNIX) IHS typically uses multiple multithreaded processes for serving requests. Specify the following values for the properties in the Web server configuration file (httpd.conf) to prevent the IHS from using more than one process for serving requests.
ServerLimit 1 ThreadLimit 1024 StartServers 1 MaxClients 1024 MinSpareThreads 1 MaxSpareThreads 1024 ThreadsPerChild 1024 MaxRequestsPerChild 0
Improve performance in a high stress environment
(Windows) If we use the default settings for a Microsoft Windows operating system, we might encounter Web server plug-in performance problems if we are running in a high stress environment. To avoid these problems, consider tuning the TCP/IP setting for this operating system. Two of the keys setting to tune are TcpTimedWaitDelay and MaxUserPort.
To tune the TcpTimedWaitDelay setting, change the value of the tcp_time_wait_interval parameter from the default value of 240 seconds, to 30 seconds:
- Locate in the Windows Registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\TcpTimedWaitDelayIf this entry does not exist in the Windows Registry, create it by editing this entry as a new DWORD item.- Specify, in seconds, a value between 30 and 300 inclusive for this entry. (IBM recommends specified a value of 30. )
To tune the MaxUserPort setting:
- Locate in the Windows Registry:
HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\tcpip\Parameters\MaxUserPortIf this entry does not exist in the Windows Registry, create it by editing this entry as a new DWORD item.
- Set the maximum number of ports to a value between 5000 and 65534 ports, inclusive. (IBM recommends specified a value of 65534,)
See the Microsoft Web site for more information about these settings.
Related tasks
Communicating with Web servers