uCosminexus Application Server, Web Container Functionality Guide
Distributing requests by the URL patterns included in the HTTP requests enables you to execute only the specific processes in the Web container and to distribute requests to multiple Web containers according to the processing contents. Note that, when you use 'Distributing requests by URL pattern' method, as a principle, the requests are distributed in the Web application. Define the URL pattern as an operation of the redirector.
To set the distribution of requests by the URL pattern:
The following figure shows the distribution of requests by the URL patterns.
Figure 4-6 Example of distribution of requests by the URL patterns
In this example, the Web application app1 is deployed on host A and the Web application app2 is deployed on host B. By including the name of the Web application you want to process in the URL pattern of the request, the request with the URL pattern /app1/* can be processed on the host A and the request with the URL pattern /app2/* can be processed on the host B. The worker name of host A is worker1 and the worker name of host B is worker2.
An example of the workers.properties file is shown below. To distribute the requests to multiple Web containers, specify the worker processes of multiple Web containers as the distribution destinations, in the redirector registered in the Web server.
worker.list=worker1, worker2 worker.worker1.port=8007 worker.worker1.host=hostA worker.worker1.type=ajp13 worker.worker1.cachesize=64 worker.worker2.port=8007 worker.worker2.host=hostB worker.worker2.type=ajp13 worker.worker2.cachesize=64
worker.list=worker1, worker2 worker.worker1.port=8007 worker.worker1.host=hostA worker.worker1.type=ajp13 worker.worker2.port=8007 worker.worker2.host=hostB worker.worker2.type=ajp13
Examples of the mod_jk.conf and uriworkermap.properties files are shown below. Here, the URL pattern /app1/* are mapped with worker1 and the URL pattern /app2/* are mapped with worker2.
JkMount /app1/* worker1 JkMount /app2/* worker2
/app1/*=worker1 /app2/*=worker2
All Rights Reserved. Copyright (C) 2013, Hitachi, Ltd.