Previous | Home | Next


System management in a distributed server environment


  1. Centralized changes to configuration and application data
  2. Application data files
  3. Configuration file location during application installation
  4. Variable scoped files
  5. Rules for process startup
  6. Distributed process discovery
  7. File synchronization in distributed server environments
  8. Synchronization scheduling
  9. How files are identified for synchronization
  10. Ensure that manual changes are synchronized
  11. Reset the master cell repository
  12. Reset the master node repository
  13. Explicit or forced synchronization
  14. Advanced system management of multiple stand-alone servers
  15. Advanced management of distributed and stand-alone servers

To build a distributed server environment...

  1. Create a deployment manager profile.

    The deployment manager is responsible for administering the entire cell. A deployment manager administers one cell only.

  2. Create a custom profile, which creates a second cell (defaultCell), a node, and a node agent.

    At this point, we do not have a functioning application server environment, just the beginnings of one.

  3. Federate the node to the deployment manager's cell using the addNode command.

    After being federated, NodeA is no longer part of the defaultCell, but rather is part of the deployment manager's cell (dmgrCell).

  4. After the federation is complete, all administration of NodeA is delegated to the deployment manager, and new application servers can be created on the node using the administrative tools for the deployment manager.


Centralized changes to configuration and application data

The deployment manager maintains a master repository of all the configuration files for nodes and servers in the cell. When configuration changes are made with the deployment manager, the changes are first stored in the master repository. After that, automatic or manual synchronization pushes the changes down to the affected nodes.

The configuration and application data repository is a collection of files containing all of the information necessary to configure and execute servers and their applications. Configuration files are stored in XML format, while application data is stored as EAR files and deployment descriptors.

Each node containing a deployment manager, application server, administrative agent, or job manager has its own profile directory under the directory...

The repository files are arranged in a set of cascading directories within each profile directory structure, with each directory containing a number of files relating to different components of the cell.

The PROFILE_HOME/config directory is the root of the repository for each profile. It contains the following directory structure:


Application data files

The PROFILE_HOME/config directory of the master repository contains the following directory structure that holds application binaries and deployment settings:

See also:


Configuration file location during application installation

Several things occur upon installation of an application onto WAS:

  1. The application binaries and deployment descriptors are stored within the master repository.

  2. The application binaries and deployment descriptors are published to each node that will host the application. These files are stored in the local copy of the repository on each node.

  3. Each node then installs the applications that are ready for execution by exploding the EARs under...

    • PROFILE_HOME/installedApps/cellname/

    Contains a subdirectory for each application deployed to the local node.

  4. PROFILE_HOME/installedApps/cellname/appname.ear/

    Each application-specific directory contains the contents of the original EAR used to install the application, including:

    • The deployment descriptors from the original EAR (which do not contain any of the bindings specified during application deployment)
    • All application binaries (JARs, classes, and JSPs)


Variable scoped files

Identically named files that exist at different levels of the configuration hierarchy are called variable scoped files. There are two uses for variable scoped files:


Rules for process startup

When a managed server is starting up, it sends a discovery request message that allows other processes to discover its existence and establish communication channels with it. This action makes it possible to start the processes in a distributed server environment without following a strict order for startup, for example, a node agent can be running while the deployment manager is not active, and vice versa. When the stopped process is started, discovery occurs automatically:

  1. The deployment manager can be running while a managed server is not active and vice versa.

    For example, if the node agent is not running when the deployment manager starts, the deployment manager tries to determine if the node agent is running but fails to set up the communication channel. When the node agent is started later, it contacts the deployment manager, creates a communication channel, and synchronizes data.

    The execution of a managed server is not dependent on the presence of a running deployment manager. The deployment manager is only required when permanent configuration changes need to be written to the master repository.

  2. The node agent starts but no managed servers are started.

    The node agent is aware of its managed servers and checks whether they are started. If so, it creates communication channels to these processes. Then, after a managed server starts, it checks whether the node agent is started and then creates a communication channel to it.

    The node agent must be started before any application servers on that node are started. The node agent contains the Location Service Daemon (LSD) in which each application server registers on startup. The node agent is purely an administrative agent and is not involved in application serving functions.


Distributed process discovery

Each node agent and deployment manager maintains status and configuration information using discovery addresses or ports. On startup, processes use these discovery addresses to discover other running components and to create communication channels between them.

In this example, both node agents use ports 7272 and 5000, which assumes they reside on separate physical machines. If nodes are located on the same machine, configure to use non-conflicting ports.

During discovery, the following actions occur:

  1. The master repository located on the deployment manager installation contains serverindex.xml for each node.

    The deployment manager reads this file on startup to determine the host name and IP port of each node agent's NODE_DISCOVERY_ADDRESS. The default port is 7272. We can display this port from the dmgr console by selecting System Administration | Node agents. Then select each node agent and expand Ports under the Additional Properties section. We can also verify this port by looking at the NODE_AGENT section in serverindex.xml of each node...

      dmgr_PROFILE_HOME/config/cells/cellname/nodes/nodename/serverindex.xml

  2. The copy of the configuration repository located on each node contains serverindex.xml for the deployment manager.

    The node agent reads this file on startup to determine the host name and IP port of the deployment manager's CELL_DISCOVERY_ADDRESS. The default port is 7277. We can display this port from the dmgr console by selecting System Administration | Deployment manager. Then expand Ports under the Additional Properties section. We can verify this port by looking at the DEPLOYMENT_MANAGER section in serverindex.xml for the deployment manager node...

      PROFILE_HOME/config/cells/cellname/nodes/dmgr_nodename/serverindex.xml

  3. The copy of the configuration repository located on each node also contains serverindex.xml for the node.

    Each managed server reads this file on startup to determine the host name and IP port of the node agent's...

      NODE_MULTICAST_DISCOVERY_ADDRESS

    A multicast address helps you avoid using too many IP ports for managed server-to-node agent discovery requests. Using multicast, a node agent can listen on a single IP port for any number of local servers. The default port is 5000. We can display this port from the dmgr console by selecting...

      System Administration | Node agents | node_agent | Additional Properties | Ports

    We can also verify this port by looking at the NODE_AGENT stanza in serverindex.xml of the node...

      PROFILE_HOME/config/cells/cellname/nodes/nodename/serverindex.xml


File synchronization in distributed server environments

The file synchronization service is the administrative service responsible for keeping the configuration and application data files that are distributed across the cell up to date. The service runs in the deployment manager and node agents, and ensures that changes made to the master repository are propagated out to the nodes, as necessary. The file transfer system application is used for the synchronization process. File synchronization can be forced from an administration client, or can be scheduled to happen automatically.

During the synchronization operation, the node agent checks with the deployment manager to see if any files that apply to the node were updated in the master repository. New or updated files are sent to the node, while any files that were deleted from the master repository are also deleted from the node.

Synchronization is a one-way process. The changes are sent from the deployment manager to the node agent. No changes are sent from the node agent back to the deployment manager.


Synchronization scheduling

We can schedule file synchronization using the dmgr console...

...to choose from the available options.

Details of each option are:

Enable synchronization at server startup Synchronization occurs before the node agent starts a server. Note that if you start a server using the startServer command, this setting has no effect.
Automatic synchronization Synchronization can be made to operate automatically by configuring the file synchronization service of the node agent. The setting allows you to enable periodic synchronization to occur at a specified time interval. By default, this option is enabled with an interval of one minute.
Startup synchronization The node agent attempts to synchronize the node configuration with the latest configurations in the master repository prior to starting an application server. The default is to not synchronize files prior to starting an application server.
Exclusions specifies files or patterns that must not be part of the synchronization of configuration data. Files in this list are not copied from the master configuration repository to the node and are not deleted from the repository at the node.

In a production environment, the automatic synchronization interval must be increased from the one-minute default setting so that processing and network impact is reduced.


How files are identified for synchronization

As part of synchronization, WAS must be able to identify the files that changed and therefore must be synchronized. To do this, it uses the following scheme:

  1. A calculated digest is kept by both the node agent and the deployment manager for each file in the configuration they manage.

    These digest values are stored in memory. If the digest for a file is recalculated and it does not match the digest stored in memory, this indicates the file changed.

  2. An epoch for each folder in the repository and one for the overall repository are stored in memory.

    These epochs are used to determine whether any files in the directory changed. When a configuration file is altered through one of the WAS administration interfaces, the overall repository epoch and the epoch for the folder in which that file resides are modified.

During configuration synchronization operations, if the repository epoch changed since the previous synchronize operation, individual folder epochs are compared. If the epochs for corresponding node and cell directories do not match, the digests for all files in the directory are recalculated, including the changed file.

Manually updating a configuration file does not cause the digest to change. Only files updated with administration tools are marked as changed. Manually updating the files is not recommended, but if we do, a forced synchronization will include any manually updated files.


Ensure that manual changes are synchronized

Manually changing configuration files is not recommended. It must only be done as a diagnostic measure or on the rare occasion that modify a configuration setting not exposed by the administration clients.

Manual editing is not recommended for these reasons:


Reset the master cell repository

To perform a reset of the master cell repository:

  1. Start the dmgr.

  2. Run...

      cd dmgr_PROFILE_HOME\bin
      ./wsadmin.sh

  3. Enter the following statements:

      wsadmin>set config [$AdminControl queryNames *:*,type=ConfigRepository,process=dmgr]
      wsadmin>$AdminControl invoke $config refreshRepositoryEpoch

  4. If the commands can be executed successfully, we can see a number returned by the refreshRepositoryEpoch operation.


Reset the master node repository

To perform a reset of the master node repository:

  1. Start the dmgr.

  2. Open a command prompt and run...

      cd PROFILE_HOME\bin
      wsadmin

  3. Enter the following statements:

      wsadmin>set config [$AdminControl queryNames *:*,type=ConfigRepository,process=nodeagent]
      wsadmin>$AdminControl invoke $config refreshRepositoryEpoch

  4. If the commands can be executed successfully, we can see a number returned by the refreshRepositoryEpoch operation.

We can also use the explicit node synchronization process to complete the node repository reset and synchronization.


Explicit or forced synchronization

Synchronization can be explicitly forced at any time using the dmgr console, the syncNode command, or the wsadmin scripting tool.


Advanced system management of multiple stand-alone servers

Based on business requirements, an organization can have multiple stand-alone application servers installed on the same system or on multiple systems. These servers might be used for development, testing, staging, and so on.

A multiple stand-alone server environment can offer advantages when compared to a stand-alone server:

Isolation for critical applications Critical applications can be deployed on their own server to prevent negative impacts that can be caused by other, faulty applications on the same server.
Dedicated resources To help customize tuning, each profile has a unique JVM and unique applications, configuration settings, data, and log files.
Enhanced serviceability Profiles share a single set of product core files. When the product is updated, all of the profiles are updated, too.

There are two options for administering the application servers in a multiple stand-alone server environment:


Independent administration Administrative agent
Centralized control point No. An administrator has to juggle multiple consoles. Yes. An administrator can use an administrative agent as the central control point.
System resources used for administrative functions Each application server runs its own administrative service and the dmgr console application. After a node containing a stand-alone server is registered with the administrative agent, the dmgr console application and administrative service are stopped on that application server. The administrative agent is responsible for managing all of the servers on the registered node. System resources are dedicated to running applications.
Management capabilities when server is not running The administrative application and administrative service are not available if the server is not running. An administrator must start the server locally. The administrative agent modifies the stand-alone server's configuration repository directly using the administrative service. The administrative agent can also start, stop, and create new servers within the managed node.

Combining the administrative agent with multiple stand-alone servers is a great starting point for simplifying administration. However, features, such as failover, workload management, session data replication, and many other features, cannot be configured in anything except a distributed server environment.


Multiple stand-alone servers with independent administration


Multiple stand-alone servers managed with the administrative agent


Advanced management of distributed and stand-alone servers

The job manager can be used to administer multiple distributed environments and stand-alone servers. The job manager administers the environment asynchronously using the concept of jobs. Because jobs are submitted asynchronously, a low-latency network is sufficient, which can be useful when the environment is distributed over distant geographical areas.

The job manager is available only with the Websphere Application Server Network Deployment (ND) offering and with WAS for z/OS.

The job manager administers the registered environments by submitting jobs that perform tasks, for example:

To administer a distributed environment, the deployment manager is registered with the job manager. To administer stand-alone servers, the nodes managed by the administrative agent are registered with the job manager.

The job manager has a repository for its own configuration files, which are related to security, administration of the job manager, configurations, and so on. However, unlike a deployment manager, the job manager does not maintain a master repository. Instead, it allows the administrative agents and deployment managers to continue managing their environments as they if they were not registered with the job manager. The job manager can administer multiple administrative agents and deployment managers, and each administrative agent and deployment manager can be registered with multiple job managers.