5.5.6 Execution environment settings (When the Smart Composer functionality is not used)
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 the 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.
- Important note
-
When integrating with Microsoft IIS, you cannot specify settings for distributing requests by the POST data size.
- Organization of this subsection
(1) Setup procedure
To specify settings for distributing requests by the POST data size, you use the following procedure:
-
Define the POST request-distributing worker and POST request-forwarding worker in workers.properties.
- Definitions for POST request-distributing worker
-
Specify the list of worker names, worker types (specify post_size_lb), and list of workers for distribution by the POST data size. As needed, set the default worker.
- Definitions for each POST request-forwarding worker
-
Specify the worker types (specify ajp13), port number, host name, and the upper limit of the POST data size.
The default value is defined in workers.properties that is provided by default. To use the default definition defined as a comment, delete the hash mark (#) at the beginning of the applicable line.
For details on workers.properties (worker definition file), see 14.2.4 workers.properties (Worker definition file).
-
Define the mapping between the URL pattern and worker in mod_jk.conf.
If a mapping is already defined, delete the definition or replace the mapping.
For details on mod_jk.conf (redirector operation definition file for HTTP Server), see 14.2.2 mod_jk.conf (Redirector action definition file for Cosminexus HTTP Server).
-
Set up the Web server environment and restart the Web server.
For details on the Web server settings, see , Appendix D Precautions related to Cosminexus HTTP Server Settings.
(2) Example settings
The figure below shows the distribution of requests by POST data size. This figure shows an example for the case when request is not limited:
|
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 5.5.3 Request distribution conditions.
An example of the workers.properties file is shown below. The POST request-distributing worker, POST request-forwarding worker, and default worker are 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.
- Example of workers.properties (In Windows)
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
- Example of workers.properties (In UNIX)
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 will be specified here.
- Example of mod_jk.conf
JkMount /examples/* postsizelb1
- Reference note
-
You can also set the upper limit for the POST data size in the LimitRequestBody directive of httpsd.conf (Cosminexus HTTP Server definition file). For details on the LimitRequestBody directive, see the uCosminexus Application Server HTTP Server User Guide.