Chapter 6 Clusters and Synchronization


Synchronization

Synchronization replicates application files and configuration information between servers. If you are using clusters, synchronization ensures that logical servers in a cluster share the same application files and configuration. Synchronization is also a useful alternative to importing and exporting packages.

For example, as Figure 6-2 illustrates, you can replicate new components from a testing or development server to one or more production servers. As long as you can connect to both servers, synchronization is quicker and easier than exporting and importing package files.

Figure 6-2: Syncronization example

If you are using clusters and make configuration changes to the primary server, jagadmin (or any user with the Admin role) can synchronize those changes to participating nonprimary servers.

To synchronize a cluster, you must be connected to the primary server for the cluster unless the primary server is down and cannot be restarted. In this case, you can connect to another server within the cluster and designate it as the new primary server.

You can use the synchronization option to move repository information between servers that are not part of a cluster. For example, you may want to move a development server's repository to a test server. In this case, the synchronization command is similar to EAServer's export/import options without the JAR file; instead of moving packages from one server to another, you are moving repository information.

You can synchronize at the cluster, server, servlet, package, or component level. The level you choose determines the available synchronization options. Options that are not available are dimmed, and cannot be selected.

Note   Before you synchronize a cluster, shut down any services that are running. If you do not, some files required for synchronization may be locked.

Component synchronization

The items that are synchronized for a component are the same in a Java archive (JAR) file, as for a package when using EAServer's Export feature, and include:

Note   When you synchronize DLLs (or shared libraries), remote servers must all run on the same operating system and hardware. If you are synchronizing Java or PowerBuilder components, this restriction does not apply.

Package synchronization

When you synchronize an EAServer package, these items are distributed to the remote servers:

Servlet synchronization

When you synchronize an EAServer servlet, the following items are distributed to the remote servers:

Application synchronization

When you synchronize an EAServer application, the following items are distributed to the remote servers:

Web application synchronization

When you synchronize an EAServer Web application, the following items are distributed to the remote servers:

Steps Synchronizing a cluster from Jaguar Manager

  1. Use Jaguar Manager to connect to the source (primary) server.
  2. Depending on the level of the sync operation, highlight a cluster, server, package, servlet, or component.
  3. Select File | Synchronize.
  4. Supply the synchronization information in the Synchronization dialog and click Start Sync. Table 6-1 describes the synchronization properties.

    A server is in Admin mode if it is running and accepting connections from Jaguar Manager, but not accepting ordinary client connections. A server in Admin mode can be the target of synchronization, since this is often the appropriate way to get it out of Admin mode. Jaguar Manager warns you if you connect to a server that is running in Admin mode. You can use the "Set Ready" option in Jaguar Manager to force a server into Ready mode, but you should understand why the server is in Admin mode before you use this option.

Steps Overriding synchronization operations

You may want to manually configure properties on individual servers in a cluster to override properties from the logical server definition. For example, you may want to:

  1. Increase the size of a connection cache on a machine that has more memory than other machines.
  2. Establish a process for making manual updates after each Jaguar Manager synchronization.

Table 6-1: Synchronization properties
Property Description Comments
Username The user name used to log in to the remote server(s). The user must belong to the Admin Role to use the synchronize option.
Password The password for the user name on the remote server(s). When synchronizing to multiple remote servers, including cluster members, all remote servers must use the same password to allow connection to those servers.
Cluster Click the Cluster check box and select a cluster from the drop-down list to synchronize the entire cluster. If you are synchronizing a server, package, component, or servlets, you can specify that the changes be replicated to all servers in a cluster. Use this option only when connected to the cluster's primary server, or when connected to a nonprimary server that becomes the primary after synchronization.
Servers Click the Servers check box and supply a list of one or more URLs to be targets of synchronization if you want to synchronize a subset of the cluster. The URLs must be separated by a comma, and of the form iiop://hostname:port .
All Cluster Files When this option is selected, all of the cluster files are distributed to the remote servers. Cluster files contain a set of properties needed to replicate repository information, including:

  • All security profiles, and
  • These EAServer /Repository directories:
    • ConnCache
    • Role
    • Security
    • Server
All Package Files When this option is selected, all of the package files are distributed to the remote server(s). Package files refers to all user-defined IDL files, property files, and implementation files (Java .class, .dll, .so, .pbd) based on component definitions. Selecting this option may result in the synchronization taking a long time, depending on the number of files being transferred to the remote server(s). Consider using component-level synchronization if only a few components have been changed.

See "Component synchronization" and "Package synchronization" for more information.
All Servlet Files When this option is selected, all servlet files are distributed to the remote server(s). See "Servlet synchronization" for more information.
All App Files When this option is selected, all application files are distributed to the remote server(s). See "Application synchronization" for more information.
All Web App Files When this option is selected, all Web application files are distributed to the remote server(s). See "Web application synchronization" for more information.
Verbose Select this check box if you want maximum information regarding the progress of the synchronization sent to the server_name.log file of the primary server.
New Primary When a cluster is synchronized, the primary is defined as the URL of the server from which the synchronization was initiated. Subsequently, if you want to synchronize the cluster from a different source, you must select the New Primary option in the Synchronize dialog. This option is only appropriate when synchronizing a cluster.

Note   This option is intended as a safeguard to prevent synchronization of a cluster from the wrong source and should be used only if the source has changed.
New Version When this option is selected, a new cluster version number is generated. When a cluster server restarts, it checks if the cluster version number in its local repository matches the version number in the primary server's repository. If not, the server does not allow ordinary client connections until the situation is rectified (the server in this case is said to be "out of sync"). If the primary server is not available, the restarting server waits until the primary becomes available. If other problems are found with the cluster definition, or a previous synchronization failed, the server stays in Admin mode.

You may want to keep the primary server in Admin mode all of the time so clients never run components on it, and it becomes a staging area for changes.

This option is appropriate only when you are synchronizing a cluster.
Refresh This option specifies that a component-, package-, or server-level refresh be performed at the end of synchronization. This has the same effect as using Jaguar Manager to connect to each of the remote servers and performing a refresh at the respective level.
Restart If you select this option, the servers you are synchronizing restart when synchronization completes. A timeout is used so that if a remote server does not restart, the synchronization moves to the next server.
Then Wait This is the amount of time that the primary waits for a server to restart if you have selected the Restart option.

Note   Synchronization is enabled for servers, packages, and components for any EAServer edition. Cluster synchronization is enabled only for the Enterprise edition. The cluster options show up in the Synchronize dialog for any object, but are disabled if the Enterprise edition is not licensed.

Steps Switching a server from Admin mode to Ready mode

  1. Double-click the Servers icon.
  2. Highlight the server for which you want to change the mode.
  3. Select File | Set Ready.

 


Copyright © 2002 Sybase, Inc. All rights reserved.