TABLE 2–3
Keep-Alive Statistics
(Continued)
Connection Timeout
10
Both HTTP 1.0 and HTTP 1.1 support the ability to send multiple requests across a single
HTTP session. A web server can receive hundreds of new HTTP requests per second. If every
request was allowed to keep the connection open indefinitely, the server could become
overloaded with connections. On UNIX and Linux systems, this could lead to a file table
overflow very easily.
To deal with this problem, the server maintains a counter for the maximum number of waiting
keep-alive connections. A waiting keep-alive connection has fully completed processing the
previous request, and is now waiting for a new request to arrive on the same connection. If the
server has more than the maximum waiting connections open when a new connection waits for
a keep-alive request, the server closes the oldest connection. This algorithm keeps an upper
bound on the number of open waiting keep-alive connections that the server can maintain.
Sun Java System Web Server does not always honor a keep-alive request from a client. The
following conditions cause the server to close a connection, even if the client has requested a
keep-alive connection:
■
The keep alive timeout is set to 0.
■
The keep alive maximum connections count is exceeded.
■
Dynamic content, such as a CGI, does not have an HTTP
content-length
header set. This
applies only to HTTP 1.0 requests. If the request is HTTP 1.1, the server honors keep-alive
requests even if the
content-length
is not set. The server can use chunked encoding for
these requests if the client can handle them (indicated by the request header
transfer-encoding: chunked
).
■
The request is not
HTTP GET
or
HEAD
.
■
The request was determined to be bad. For example, if the client sends only headers with no
content.
The keep-alive subsystem in Web Server is designed to be massively scalable. The
out-of-the-box configuration can be less than optimal if the workload is non-persistent (that is,
HTTP 1.0 without the
KeepAlive
header), or for a lightly loaded system that’s primarily
servicing keep-alive connections.
Keep-Alive Count
This section in
perfdump
has two numbers:
■
Number of connections in keep-alive mode (total number of connections added)
■
Maximum number of connections allowed in keep-alive mode simultaneously (maximum
connection size)
Using Monitoring Data to Tune Your Server
Sun Java System Web Server 7.0 Update 1 Performance Tuning, Sizing, and Scaling Guide •
54
Содержание Sun Java System Web Server 7.0
Страница 9: ...Figures FIGURE 2 1 Web Server Connection Handling 40 9 ...
Страница 10: ...10 ...
Страница 18: ...18 ...
Страница 38: ...38 ...
Страница 84: ...84 ...
Страница 100: ...100 ...