Oracle Audio Technologies A86828-01 User Manual
Page 60
Optimizing Servlet Performance
5-6
Oracle HTTP Server powered by Apache Performance Guide
ApJServHost JServ2 ajpv12://127.0.0.1:8002
ApJServRoute JS1 JServ1
ApJServRoute JS2 JServ2
ApJServShmFile /usr/local/apache/logs/jserv_shm
*
The
ApJServMount
directive, with
/servlets
balance://set/root
, now balances requests for servlets in /servlets
between JServ1 and JServ2.
*
The
ApJServBalance
directive identifies JServ1 and JServ2 as the
processes that share the load. The ’2’ following JServ2 is a weight value.
It specifies that twice as many requests will be sent to JServ2 as would
be otherwise, i.e., that JServ2 will get about 2/3 of all incoming
requests. See
"Distribution of JServ Requests"
below for details.
*
The
ApJServHost
directive identifies the host and port on which the
processes are listening.
*
The
ApJServRoute
directive associates JServ processes with sessions.
JServ uses this information to keep all of a session’s requests together in
one process. The JServ session mechanism sends the process route
information back to the user (generally in a cookie). You need only
modify it if your application uses sessions.
*
The
ApJServShmFile
directive specifies a shared memory file that the
httpd processes may use to track the state of the JServ processes.
Distribution of JServ Requests
mod_jserv selects the JServ engine to handle a request using the process outlined
below:
1.
An httpd process is started.
2.
mod_jserv creates a list of available JServs, with extra entries for JServs with a
weight value greater than 1 (for example, JServ2 in our example above, as
specified by
ApJServBalance set JServ2 2
).
3.
An httpd daemon receives a servlet request and hands it to mod_jserv.
4.
mod_jserv selects the JServ engine that will handle the request.
a.
mod_jserv checks to see if the request is part of a current session. If so, it
uses the
ApJServRoute
directives to find the JServ that handled the other
requests for that session.