NexJ Logo

Reserving servers for specific functions

You can configure servers in a cluster to perform specific functions such as batch processing and Exchange synchronization. By isolating processes to specific servers, you can help to improve system stability and minimize impact to online users in the event that there is a performance issue with a process.

You reserve a server by specifying one or more node types for the server node. Each node type represents a set of functions that a server can perform. There are three default node types available:

batch
Specifies that the server node can participate in server side processes such as object queue processing.

exchange
Specifies that the server node can participate in Exchange synchronization processing.

web
Specifies that the server node can participate in HTTP session load balancing.

For example, in a server cluster with two nodes, if you specify the batch and web types for one node, and the exchange type for the other, Exchange synchronization work will be isolated to the second node. If an issue then occurs in the Exchange node, it will not affect batch and web processes in the other node. By default, every server in a cluster is configured with all three node types, meaning that all servers handle processes equally.

You can also create your own node types and specify what processes are associated with each type. To do this, you edit the Core.ntypes file to create your custom node types. Processes are grouped together into component, channel, metaclass files, which you can edit to specify which node type is associated with each set of processes.

For example, in the default configuration, session manager and HTTP channel processes are both associated with the web node type. If you want split the processes so that they can be run on separate servers, you can create a node type for each process, then edit their component and channel files to specify the new node types.

You configure a server's node types on the System page in NexJ Admin Console.

Specifying node types for servers

Specify a node type for a server in a cluster when you want to reserve the server for specific functions.

At minimum, the cluster must contain one server that you have configured with the batch node type. However, it is recommended that two servers have the batch node type in the event that one becomes unavailable.

To specify node types for a server:

  1. In NexJ Admin Console, navigate to the System page.
  2. In the Channel Administration area, select the server node that you want to configure.
    The current node types for the selected server are displayed in the Cluster Partitions area.
  3. In the list, add and remove node types to configure the server as desired.
    • To add a node type to the server, click the Select button. In the dialog that is displayed, select the desired node type in the left pane, then click Add to move it to the right pane. Click OK when you are finished.
    • To remove a node type from the list, select the desired node type and click the Delete button .

The server is reserved to handle processes for the specified node types.

Customizing node types

You can customize the list of node types that are available to use with servers. Customize node types when you want to associate processes with different node types than the default configuration offers.

You can create new node types, and rename or delete existing node types in order to fit the needs of your deployment.

To customize node types:

  1. In a text editor, open the Core.ntypes file.
    The contents should look similar to the following:

    <NodeTypes>
      <NodeType description="Allows a node to participate in HTTP session load
     balancing" name="web"/>
      <NodeType description="Allows a node to participate in server side processes
     e.g. object queues" name="batch"/>
      <NodeType description="Allows a node to participate in exchange sync
     processing" name="exchange"/>
    </NodeTypes>
  2. Add, edit, and delete <Node Type> tags to specify your desired node types.

    Info

    Ensure that you include a name and description property in each tag.

  3. When you are finished, save your changes to the file.

The list of node types is customized.

Before you can use your modified node types, you must associate them with the desired processes by editing the relevant component files.

Associating processes with node types

You can associate a process with a node type by editing the corresponding file for the process. Associating a process with a node type allows you to control what kind of node handles the process by default.

You can specify a node type in the following components:

System.ObjectQueueDispatcher
Runs the object queue dispatcher on the specified node type. Default value is batch.

System.SessionManager
Redirects all requests to the specified node type. Default value is web.

HTTP channels
Redirects and processes messages sent to HTTP channels on the specified node type. Default value is web.

Object queues
Redirects and processes messages sent to object queue channels on the specified node type. Default value is System.ObjectQueueDispatcher.comp.nodeType, which is the node type from the System.ObjectQueueDispatcher component.

Batch jobs
Processes batch jobs on the specified node type. Default value is System.ObjectQueueDispatcher.comp.nodeType, which is the node type from the System.ObjectQueueDispatcher component.
The procedure to associate a process with a node type varies for each component.

Specifying a node type for System.ObjectQueueDispatcher

The System.ObjectQueueDispatcher component runs the object queue dispatcher on the specified node type.

Before starting this task, ensure that you have configured your desired node types in the Core.ntypes file.

To specify a node type for System.ObjectQueueDispatcher:

  1. In NexJ Studio, navigate to the Components tab in the Resources layer.
  2. Open the System.ObjectQueueDispatcher component.
    You might need to customize the component before you can edit it. To do this, right-click the component and select Customize Using → Base.
  3. In the Source tab, add or edit the <Property name="nodeType"><nodeTypeName></Property> tag, where <nodeTypeName> is the name of the desired node type from the Core.ntypes file.
  4. When you are finished, click the Save button to save your changes to the component.

The component's node type is modified.

Before the component's processes can be handled by servers associated with the specified node type, you must assign the node type to one or more servers on the System page in NexJ Admin Console.

Specifying a node type for System.SessionManager

The System.SessionManager component redirects all requests to the specified node type.

Before starting this task, ensure that you have configured your desired node types in the Core.ntypes file.

To specify a node type for System.SessionManager:

  1. In NexJ Studio, navigate to the Components tab in the Resources layer.
  2. Open the System.SessionManager component.
    You might need to customize the component before you can edit it. To do this, right-click the component and select Customize Using → Base.
  3. In the Source tab, add or edit the <Property name="defaultNodeType"><nodeTypeName></Property> tag, where <nodeTypeName> is the name of the desired node type from the Core.ntypes file.
  4. When you are finished, click the Save button to save your changes to the component.

The component's node type is modified.

Before the component's processes can be handled by servers associated with the specified node type, you must assign the node type to one or more servers on the System screen in NexJ Admin Console.

Specifying node types for HTTP channels

HTTP channels redirect and process messages sent to them on the specified node type.

Before starting this task, ensure that you have configured your desired node types in the Core.ntypes file.

To specify a node type for an HTTP channel:

  1. In NexJ Studio, navigate to the Channels tab in the Integration layer.
  2. Open the HTTP channel in which you want to specify a node type.
    You might need to customize the channel before you can edit it. To do this, right-click the channel and select Customize Using → Base.
  3. In the Source tab, locate the <HTTP> tag and add or edit the attribute nodeType="<nodeTypeName>", where <nodeTypeName> is the name of the desired node type from the Core.ntypes file.
    After you edit the tag, it should look similar to the following:
    <HTTP contentType="text/xml; charset=utf-8" get="true" nodeType="exchange">
  4. When you are finished, click the Save button  to save your changes to the channel.
    The channel's node type is modified.

Before the channel's processes can be handled by servers associated with the specified node type, you must assign the node type to one or more servers on the System page in NexJ Admin Console.

Specifying node types for object queues

Object queue channels redirect and process messages sent to them on the specified node type.

Before starting this task, ensure that you have configured your desired node types in the Core.ntypes file.

To specify a node type for an object queue:

  1. In NexJ Studio, navigate to the Channels tab in the Integration layer.
  2. Open the object queue channel in which you want to specify a node type.
    You might need to customize the channel before you can edit it. To do this, right-click the channel and select Customize Using → Base.
  3. In the Source tab, locate the <ObjectQueue> tag and add or edit the attribute nodeType="<nodeTypeName>", where <nodeTypeName> is the name of the desired node type from the Core.ntypes file.
    After you edit the tag, it should look similar to the following:
    <ObjectQueue class="ObjectQueue" errorCount="3" errorQueue="ObjectErrorQueue" priority="10" nodeType="batch">
  4. When you are finished, click the Save button  to save your changes to the channel.

The channel's node type is modified.

Before the channel's processes can be handled by servers associated with the specified node type, you must assign the node type to one or more servers on the System page in NexJ Admin Console.

Specifying node types for batch jobs

Batch job classes process batch jobs on the specified node type.

Before starting this task, ensure that you have configured your desired node types in the Core.ntypes file.

To specify a node type for a batch job:

  1. In NexJ Studio, navigate to the Classes tab in the Business Model layer.
  2. Open the batch job class in which you want to specify a node type.
    You might need to customize the class before you can edit it. To do this, right-click the class and select Customize Using → Base.
  3. In the Source tab, add or edit the <Attribute name="nodeType" value="<nodeTypeName>"/> tag, where <nodeTypeName> is the name of the desired node type from the Core.ntypes file.
  4. Click the Save button to save your changes to the class.

The node type for the class is modified.

Before processes can be handled by servers associated with the specified node type, you must assign the node type to one or more servers on the System page in NexJ Admin Console.