Shared State


The primary server and backup server must share the same state. Server state includes three categories of information:

During a failover, the backup server re-reads all shared state information.

Implementing Shared State

We recommend that you implement shared state using shared storage devices. The shared state must be accessible to both the primary and backup servers.

Support Criteria

Several options are available for implementing shared storage using a combination of hardware and software. EMS requires that your storage solution guarantees all four criteria in Table 45.

Always consult your shared storage vendor and your operating system vendor to ascertain that the storage solution you select satisfies all four criteria.

Table 45 Shared Storage Criteria for Fault Tolerance (Sheet 1 of 2)
Criterion
Description
Write Order
The storage solution must write data blocks to shared storage in the same order as they occur in the data buffer.
(Solutions that write data blocks in any other order (for example, to enhance disk efficiency) do not satisfy this requirement.)
Synchronous Write Persistence
Upon return from a synchronous write call, the storage solution guarantees that all the data have been written to durable, persistent storage.
Distributed File Locking
The EMS servers must be able to request and obtain an exclusive lock on the shared storage. The storage solution must not assign the locks to two servers simultaneously. (See Software Options.)
EMS servers use this lock to determine the primary server.
Unique Write Ownership
The EMS server process that has the file lock must be the only server process that can write to the file. Once the system transfers the lock to another server, pending writes queued by the previous owner must fail.

Hardware Options

Consider these examples of commonly-sold hardware options for shared storage:

SCSI and SAN

Dual-port SCSI and SAN solutions generally satisfy the Write Order and Synchronous Write Persistence criteria. (The clustering software must satisfy the remaining two criteria.) As always, you must confirm all four requirements with your vendors.

NAS

NAS solutions require a CS (rather than a CFS) to satisfy the Distributed File Locking criterion (see below).

Some NAS solutions satisfy the criteria, and some do not; you must confirm all four requirements with your vendors.

NAS with NFS

When NAS hardware uses NFS as its file system, it is particularly difficult to determine whether the solution meets the criteria. Our research indicates the following conclusions:

Software Options

Consider these examples of commonly-sold software options:

With dual-port SCSI or SAN hardware, either a CS or a CFS might satisfy the Distributed File Locking criterion. With NAS hardware, only a CS can satisfy this criterion (CFS software generally does not). Of course, you must confirm all four requirements with your vendors.

Messages Stored in Shared State

Messages with PERSISTENT delivery mode are stored, and are available in the event of primary server failure. Messages with NON_PERSISTENT delivery mode are not available if the primary server fails.

For more information about recovery of messages during failover, see Message Redelivery.

Storage Files

The tibemsd server creates three files to store shared state.

Table 46 Shared State Files
File Name
Description
meta.db
This file records durable subscribers, fault-tolerant connections, and other metadata.
sync-msgs.db
When a queue or topic definition (in a configuration file) specifies that the destination is failsafe, then the server stores its messages in this file (using synchronous I/O calls).
async-msgs.db
When a queue or topic definition (in a configuration file) does not specify that the destination is failsafe, then the server stores its messages in this file (using asynchronous I/O calls).

For more information about the failsafe destination property, see failsafe.

For more information about configuration files, see Chapter 7, Using the Configuration Files.33

Storage Parameters

Several configuration parameters apply to EMS storage files (even when fault-tolerant operation is not configured); see Storage Files.


TIBCO Enterprise Message Service™ User’s Guide
Software Release 4.3, February 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com