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 four default node types available:
batch
Specifies that the server node can participate in server side processes such as object queue processing.
dispatcher
Specifies that the server node can dispatch object queue messages.
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, dispatcher, and web types for one node, and the exchange and dispatcher types 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 four node types. In this case, all servers handle the batch, web, and exchange functions equally, but the dispatching function is assigned to any one of the servers. If this node becomes unavailable, a different server from the cluster with the dispatcher node type takes over the function. The Dispatcher checkboxes in the Channel Administration section of the System page indicate which node is currently performing the dispatching function in the cluster.
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 System 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 and dispatcher node types. However, it is recommended that two servers have these node types in the event that one becomes unavailable.
To specify node types for a server:
- In NexJ System Admin Console, navigate to the System page.
- 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. - 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:
In a text editor, open the
Core.ntypes
file.
The contents should look similar to the following:CODE<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"/> <NodeType description="Allows a node to assume the object queue dispatcher role" name="dispatcher"/> </NodeTypes>
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.
- 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
:
- In NexJ Studio, navigate to the Components tab in the Resources layer.
- 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. - 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 theCore.ntypes
file. - 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 System 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:
- In NexJ Studio, navigate to the Components tab in the Resources layer.
- 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. - 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 theCore.ntypes
file. - 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 System 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:
- In NexJ Studio, navigate to the Channels tab in the Integration layer.
- 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. - In the Source tab, locate the
<HTTP>
tag and add or edit the attributenodeType="<nodeTypeName>"
, where<nodeTypeName>
is the name of the desired node type from theCore.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">
- 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 System 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:
- In NexJ Studio, navigate to the Channels tab in the Integration layer.
- 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. - In the Source tab, locate the
<ObjectQueue>
tag and add or edit the attributenodeType="<nodeTypeName>",
where <nodeTypeName>
is the name of the desired node type from theCore.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">
- 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 System 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:
- In NexJ Studio, navigate to the Classes tab in the Business Model layer.
- 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. - 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 theCore.ntypes
file. - 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 System Admin Console.