Distribution Server Failover
By Gerry Snyder
Enterprise applications require backup components to avoid system failures. Information Builders has introduced just such a feature for ReportCaster, which we call Distribution Server Failover.
Distribution Server Failover is the ability to install a second Distribution Server that acts as a backup to the primary Distribution Server. If the primary Distribution Server goes down, the failover server takes over and insures uninterrupted delivery of scheduled report output. This also allows the machine hosting the primary server to be taken down for maintenance without interruption of scheduled jobs.
Failover was introduced in release 7.6.7 for the command line version of the Distribution Server. In 7.6.8 we added the ability for the Distribution Server running as a Windows service to have a failover server. In 7.6.9 we are adding a management console to allow administrators to monitor the servers from an online application and stop, restart and switch the servers.
Let’s walk through the steps of setting up a failover server. This is documented in the installation and configuration guide of ReportCaster. Before going through the steps, it should be noted that between 7.6.7 and 7.6.8 a new table was added to the ReportCaster repository as part of the failover feature. Customers that do a full installation of 7.6.8 and create repository tables will automatically have this table. But if you are upgrading from release 7.6.7 or earlier to release 7.6.8, you must create this file manually. A utility named createfodb and located in the ibi\ReportCaster76\bin directory creates this table for you.
The first thing you do is install a second version of the Distribution Server on another machine that you want to be the backup for the primary machine.
Then, on the original installation of the Distribution Server, you enable failover through the ReportCaster configuration tool by turning failover on and providing the host and port of the failover machine.
Then, you configure failover in both the WebFOCUS and ReportCaster web applications. That is, you tell the applications about the second instance of the Distribution Server by providing the host and port of the failover machine.
Then, to eliminate the need to configure the second distribution server to match the settings established in the primary server you copy the ReportCaster configuration file from the primary server to the failover server.
And finally, you stop the primary Distribution Server and start it up again, start the failover Distribution Server and restart both the WebFOCUS and ReportCaster applications. And you’re up and running.

Let’s examine this in a little more detail. Screen 1 shows you where to set the failover settings in the ReportCaster configuration tool.
These are the Failover Configuration Settings:
Primary Console Host: The host name of the Primary Distribution Server
Failover Console Host: The host name of the failover Distribution Server
Failover Console Port: The port number of the failover Distribution Server
Failover Enabled: Set this to yes to enables failover
Next, the failover host and port need to be added to the web.xml file of the ReportCaster web application as shown here:
<context-param>
<param-name>agent_node</param-name>
<param-value>host1:host2</param-value>
</context-param>
<context-param>
<param-name>agent_port</param-name>
<param-value>port1:port2</param-value>
</context-param>
Depending upon you application server and method of deployment you may have to redeploy the ReportCaster application.

Next, the failover host and port have to be added to the ReportCaster settings in the WebFOCUS Administration Console under Configuration/ReportCaster (Screen 2).
Save the changes in the WebFOCUS Administration Console and restart the application server.
Now start the Primary Distribution Server. This server will start in Full Function mode.
Actually, whichever Distribution Server is started first becomes the Primary Server.
After the primary started has started, then you start the Failover Distribution Server. This server will start in Failover Mode. It will ping the primary server every minute (by default) to see if it is still running. If there is no response, the failover server goes into Full Function mode and becomes the primary server.
Screen 3 is an example of two distribution servers running. The primary server is in Full Function mode, polling the repository and dispatching jobs. The other server at the bottom is in failover mode.

In Screen 4 the primary server has been brought down and the failover server has taken over. Then the primary server has been brought back up. Since a full-function server is already available, the primary server has gone into failover mode.
The value of the Recovery setting is important in determining what happens to a job that is running at the time between a primary server going down and a failover server taking over.
If Recovery is on, any jobs that did not complete will be rerun when the failover server takes over.
If Recovery is off, any jobs that did not complete will not be rerun when the failover server takes over.
Recovery does not apply to on-demand jobs -- jobs submitted using the run button -- so these jobs need to be resubmitted if they have not completed when a primary server goes down.

Screen 5 provides an early look at the Failover Management Console being added in release 7.6.9.