Conclusion


Reliability Options

Most of our discussion so far has been based on the assumption that multiple servers were available. The multiple servers provide not only load balancing but also reliability. We can further increase reliability through multiple servlet engines on the same machine. In this section, we assume you have only a single server but still want to provide reliability through multiple servlet threads.

Figure 19.6 shows an example of how we want to configure a server.

click to expand
Figure 19.6: A single machine with multiple servlet threads.

The basic idea is if a JVM fails during its execution of one Resin servlet engine, another one will be available to take its place. To achieve this, you need a configuration that uses the <srun-backup> element. For example:

 <server>   <cluster>     <srun  host="localhost" port="6802" index="1"/>     <srun  host="localhost" port="6803" index="2" backup="true"/>   </cluster> </server> 

The configuration file is used to start two servers on the same box using the following commands. In Unix:

 unix> httpd.sh -pid srun1.pid -server resina start unix> httpd.sh -pid srun2.pid -server resinb start 

In Windows:

 c:\resin3.0.2> bin/httpd -install-as resina -server resina c:\resin3.0.2> bin/httpd -install-as resinb -server resinb 

This setup assumes that an Apache server passes the servlet requests to the appropriate server instance. See Chapter 16 for more details on setting up Apache with Resin.




Mastering Resin
Mastering Resin
ISBN: 0471431036
EAN: 2147483647
Year: 2002
Pages: 180

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net