Master Slave MCAT

From SRB

A SRB federation (zone) can be configured to run with a single Master MCAT plus zero or more Slave MCATs.

The purpose of the Slave MCAT is to improve responsiveness across a Wide-Area-Network. SRB functions that read from the MCAT, and do not update, can then query the Slave MCAT, which can be local. The decisions on which SRB calls go to a Slave (if defined) or Master MCAT is done by some of the SRB code which "knows" which calls are read only. It is up to the administrator to configure Slave MCATs to be local.

The Master/Slave MCAT architecture

1) All metadata insertion, deletion and modification are done in the Master MCAT

2) Synchronization of metadata from the Master MCAT to the Slave MCATs is achieved through the database replication capability of the database. Therefore, currently the Master/Slave MCAT capability is possible only if the MCAT database supports database replication (e.g., oracle). In the future, the SRB may provide its own metadata replication capability if there is demand for it.

3) The Slave MCATs are used for "read only" type queries. For example, they are used in commands such as Sls, Slscont and SgetR. In these commands, the Slave MCAT will be used by default. The -X option or the environment variable "masterMcat" can be used to force the query to be run on the Master MCAT instead. Currently, the following Scommands have been converted to use the Slave Mcat by default:

Scat, SgetColl, Sget, SgetD, SgetR, SgetU, Sls, Slscont and Stoken.

4) MCAT host failed over - If a server is configured to use a Slave MCAT and if the Slave MCAT enabled host is down, the server will log a warning message in the log file and automatically fail over to use the Master MCAT for all queries, including the "read only" type queries. It is recommanded the Slave MCAT should still be taken out of the configuration (from the data/mcatHost file, see below) since certain amount of overhead is needed to discover the Slave MCAT server has been down.

Slave MCAT configuration

Same as before, the data/mcatHost file on each SRB server is used to identify the Master MCAT server. The data/mcatHost file must contain info for the Master MCAT at a minimum.

1) Optionally, a line with key word "slaveMcatHost" can be added to the data/mcatHost file to configure a Slave MCAT. For example:

slaveMcatHost =

2) The Zone metadata in MCAT should only contain information for the Master MCAT only. No metadata is needed for the Slave MCAT.

3) A maximum of one Slave MCAT can be configured per SRB server.

4) Different Slave MCATs may be configured in different SRB servers.

5) If a Slave MCAT is configured for the MES (the server running the Master MCAT enabled server), a warning message will be printed out and and the Slave MCAT configuration will be ignored.

If a server is configured with a Slave MCAT, a user can trigger the use of the Slave MCAT by specifying SLAVE_CAT as the "catType" input in some of the SRB client APIs. All the SRB API calls in the Sls, Slscont and SgetR commands have been changed to SLAVE_CAT as the "catType" input. If a Slave MCAT is not configured on a server, the Master MCAT will be used even though a SLAVE_CAT value is used in the API call.