Web Servers Recipes
- The maximum concurrency variables (e.g.
MaxClients
for IHS) are the key tuning variables. Ensure such variables are not saturated through tools such asmpmstats
ormod_status
, while at the same time ensuring that the backend server resources (e.g. CPU, network) are not saturated (this can be done by scaling up the backend, sizing thread pools to queue, optimizing the backend to be faster, or limiting maximum concurrent incoming connections and the listen backlog). - Clusters of web servers are often used with IP sprayers or caching proxies balancing to the web servers. Ensure that such IP sprayers are doing "sticky SSL" balancing so that SSL Session ID reuse percentage is higher.
- Load should be balanced evenly into the web servers and back out to
the application servers. Compare access log hit rates for the former,
and use WAS plugin
STATS
trace to verify the latter. - Review snapshots of thread activity to find any bottlenecks. For
example, in IHS, increase the frequency of
mpmstats
and review the state of the largest number of threads. - Review the keep alive timeout. The ideal value is where server
resources (e.g. CPU, network) are not saturated, maximum concurrency is
not saturated, and the average number of keepalive requests has peaked
(in IHS, review with
mpmstats
ormod_status
). - Check the access logs for HTTP response codes (e.g.
%s
for IHS) >= 400. - Check the access logs for long response times (e.g.
%D
for IHS). - For the WebSphere Plugin, consider setting
ServerIOTimeoutRetry="0"
to avoid retrying requests that time out due toServerIOTimeout
(unlessServerIOTimeout
is very short). - Enable mod_logio and add
%^FB
to LogFormat for time until first bytes of the response - Review access and error logs for any errors, warnings, or high volumes of messages.
- Check http_plugin.log for
ERROR: ws_server: serverSetFailoverStatus: Marking .* down
- Use WAS plugin
DEBUG
orTRACE
logging to dive deeper into unusual requests such as slow requests, requests with errors, etc. Use an automated script for this analysis.
For details, see the Web Servers chapter. Also review the operating systems chapter.