uCosminexus Application Server, Web Container Functionality Guide
By defining the list of workers that act as the distribution destinations in the POST request-distributing worker, requests are distributed to the workers by the POST data size.
Set the upper limit for the POST data size and define the request distribution destination in the POST request-forwarding worker that acts as the distribution destination. As a result, request processing of very long POST data size with a long processing time is distributed to a specific host. The redirector distributes the requests to each HTTP request with the upper limit of the POST data size, so you can avoid the decrease in throughput of requests other than the very long POST data requests and can avoid the decrease in response time. Note that when the upper limit of the POST data size is specified, the value of the POST data size is given priority even if the HTTP request belongs to the same session.
To specify settings for distributing requests by the POST data size, use the following procedure:
Define the settings for distributing requests by the POST data size in workers.properties and mod_jk.conf. The following table lists the keys defined in workers.properties and mod_jk.conf.
Table 4-10 Keys defined in workers.properties and mod_jk.conf (When distributing requests by the POST data size)
Types of files | Key name | Description |
---|---|---|
workers.properties | worker.list | Specifies a list of one or multiple worker names. |
worker.worker-name.host | Specifies the worker host name or IP address. | |
worker.worker-name.port | Specifies the worker port number. | |
worker.worker-name.type | Specifies the worker type. Specify post_size_lb in the POST request-distributing worker and ajp13 in the POST request-forwarding worker that forms the target for distribution. | |
worker.worker-name.post_size_workers | Specifies the list of workers that form the target of distribution by the POST data size. | |
worker.worker-name.post_data | Specifies the upper limit (bytes) of the POST data size for the request. | |
worker.worker-name.default_worker | Specifies the worker (default worker) for forwarding the requests if the worker applicable to the request distribution destination is not in the POST request-forwarding worker within the cluster configuration. | |
worker.worker-name.cachesize | Specifies the number of worker connections that are reused in the redirector. This key can only be specified in Windows. |
|
worker.worker-name.receive_timeout | Specifies the communication timeout value. | |
worker.worker-name.delegate_error_code | Specifies the error status code used when the creation of the error page is entrusted to the Web server. | |
mod_jk.conf | JkMount | Specifies some combination of workers specified in the URL pattern and worker.list. |
The following table lists the keys that you can specify for each worker type:
Table 4-11 Keys that can be specified for each worker type
Key name | Worker type (value specified in worker.worker-name.type key) | |
---|---|---|
POST request-distributing worker (Specify post_size_lb) | POST request-forwarding worker (Specify ajp13) | |
worker.worker-name.host | -- | Y |
worker.worker-name.port | -- | Y |
worker.worker-name.type | Y | Y |
worker.worker-name.post_size_workers | Y | -- |
worker.worker-name.post_data | -- | Y |
worker.worker-name.default_worker | O | -- |
worker.worker-name.cachesize | -- | O |
worker.worker-name.receive_timeout | -- | O |
worker.worker-name.delegate_error_code | -- | O |
The figure below shows the distribution of requests by POST data size. This figure shows an example when the requests cannot be limited:
Figure 4-13 Example of distribution of requests by the POST data size
In this example, among the requests under /examples, the requests with POST data size of less than 100 MB are distributed to host A and the requests with POST data size between 100 MB and 200 MB are distributed to host B. The requests that do not fulfill the request distribution conditions are distributed to the host A that is set as the default worker. The worker name of the host A is worker1 and the worker name of the host B is worker2. For details on the request distribution conditions, see 4.5.3 Request distribution conditions.
An example of the workers.properties file is described here. The POST request-distributing worker, POST request-forwarding worker, and default worker is defined here. As the upper limit of POST data size, 100m is specified for worker1 and 2048m is specified for worker2 (maximum value of the upper limit for POST data size). In the default worker, worker1 is specified.
worker.list=postsizelb1 worker.postsizelb1.post_size_workers=worker1, worker2 worker.postsizelb1.type=post_size_lb worker.postsizelb1.default_worker=worker1 worker.worker1.port=8007 worker.worker1.host=hostA worker.worker1.type=ajp13 worker.worker1.cachesize=64 worker.worker1.post_data=100m worker.worker2.port=8007 worker.worker2.host=hostB worker.worker2.type=ajp13 worker.worker2.cachesize=64 worker.worker2.post_data=2048m
worker.list=postsizelb1 worker.postsizelb1.post_size_workers=worker1, worker2 worker.postsizelb1.type=post_size_lb worker.postsizelb1.default_worker=worker1 worker.worker1.port=8007 worker.worker1.host=hostA worker.worker1.type=ajp13 worker.worker1.post_data=100m worker.worker2.port=8007 worker.worker2.host=hostB worker.worker2.type=ajp13 worker.worker2.post_data=2048m
An example of the mod_jk.conf file is shown below. POST request-distributing worker postsizelb1 is specified here.
JkMount /examples/* postsizelb1
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.