Hitachi

uCosminexus Application Server Compatibility Guide


5.5.5 Execution environment settings (When the Smart Composer functionality is 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 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.

Organization of this subsection

(1) Setup procedure

To specify settings for distributing requests by the POST data size, use the following procedure:

  1. 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).

  2. Define the mapping between the URL pattern and worker in mod_jk.conf.

    If a mapping is 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).

  3. 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) Settings in workers.properties and mod_jk.conf

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 5‒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.

Note:

In worker-name, define the worker name specified in the worker.list key or worker.worker-name.post_size_workers key.

The following table lists the keys that you can specify for each worker type:

Table 5‒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

Legend:

Y: Can be specified

--: Cannot be specified

O: Can be optionally specified

(3) Example settings

The figure below shows the distribution of requests by POST data size. This figure shows an example when the requests cannot be limited:

Figure 5‒13: Example of distribution of requests by the POST data size

[Figure]

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 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.

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 is 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.