Re: Meaning of "service"

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 2006-04-22 at 16:44 +0200, Troels Arvin wrote:
> Hi,
> 
> Setup: Two-node RHEL 4-based fail-over cluster.
> 
> The cluster runs several daemons which are dependent on each other:
> 
> httpd:      serves static content, and acts as a front-end to Tomcat
> tomcat:     handles servlets, etc; depends on postgresql
> postgresql: database for servlets run by tomcat
> 
> The daemons all use a shared storage area (SCSI-box separate from the
> servers, connected by SCSI cables) for data and logging. The daemons have
> init-scripts which are specified in system-config-cluster.
>
> Should I set this up as
> a) one Cluster Service,
> b) as three different Cluster Services?
> 
I have a very similar setup for my cluster.  I recommend option b.  That
will allow you to balance the processor load from the different services
onto the cluster nodes.  In my setup, I keep my Tomcat and httpd
processes in the same service, since they work from a single file
system.

The downsides:
* You have to have IP addresses bound for each service to allow the
other services to connect no matter what node it's running on. 
* You need to partition your shared storage into at least one partition
for each different cluster service.  (I use CLVM to dynamically
partition mine, it's a wonderful thing)

> If a:
> How do I specify that the postgresql script should be run before the
> tomcat script?
> 
> If b:
> How do I specify that the postgresql service should be started before the
> tomcat service?
> 
In my experience, this isn't too much of a problem.  But if you list the
PostgreSQL service first in your cluster.conf file (or first in the
system-config-cluster) it "should" start first, there is no guarantee.

In practice, Tomcat JNDI connection pooling will handle making
connection to the database once it comes online.  Normally Tomcat's
startup time is much longer than PostgreSQL's so it should be up before
Tomcat tries to connect.  Connection pooling will also handle
re-connection upon server failover.  If you are not using connection
pooling, and are creating a connection to the database with each page
load, you still won't run into an issue.


Thanks, 
Eric Kerin
eric@xxxxxxxxxxx

--

Linux-cluster@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/linux-cluster

[Index of Archives]     [Corosync Cluster Engine]     [GFS]     [Linux Virtualization]     [Centos Virtualization]     [Centos]     [Linux RAID]     [Fedora Users]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite Camping]

  Powered by Linux