Appboard/2.5/builder/data source failover

Revision as of 05:54, 29 May 2015 by imported>Jason.nicholls
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Overview

AppBoard Database Table and Database Query Data Adapters support configuring multiple connection end-points for failover purposes. This is to ensure clients are offered uninterrupted service even in the event of a database failure, or failure to reach a database.

The Failover Configuration Panel in AppBoard Builder

To configure failover for a Data Source, follow the instructions on this page to enable failover on the Data Source configuration panel.


Enabling Failover

Pre-Requisites

Before implementing failover on a Data Source, the AppBoard administrator must confirm the following:

  • The back-end databases must be configured such that the various available servers present a redundant and consistent view of the data (the same required tables must be available, the table structure should be consistent, and so on).
  • The back-end databases must be online and the AppBoard server must have permanent connectivity to all of the database servers.
  • The authentication credentials must be known for each database instance.

Configuration

Access the failover configuration by creating or editing a Database Data Source:

  1. On the Connect step click the Enable Failover toggle switch to the Yes position.
  2. This will display the Fail-over Connections list.
  3. Observe that the "Primary" connection is selected in the "Fail-over Connections" panel. A question mark icon indicates that AppBoard has not yet validated connectivity to the connection. The icon will be updated later to indicate updated connectivity status.
  4. On the main screen, enter the URL and all of the other basic connection and configuration values for the Primary connection just as you would for any standard Data Source.
  5. Click "Add" in the "Fail-over Connections" panel. A "Secondary" connection label will be added to the list of "Fail-over Connections".
  6. Enter the URL, Username, and Password for the data source that AppBoard should switch to if connectivity is lost to the Primary data source. Note that all of the other configuration settings are assumed to be the same as what you entered for the Primary connection.
  7. [optional] Click "Add". A "Tertiary" connection label will be added to the list of "Fail-over Connections".
  8. [optional] Enter the URL, Username, and Password for the data source that AppBoard should switch to if connectivity is lost to both the Primary and Secondary data sources. Note that all of the other configuration settings are set to be the same as what you entered for the Primary connection.
  9. [optional] Change the names of the connections by selecting each connection and clicking "Edit".

One of the following status icons will be displayed by AppBoard for each data source to indicate the current status of that connection:

Database Connection Status Icons in the Failover Configuration Panel

Additional Information

Manual Failover

Sometime for maintenance purposes, testing, or otherwise it may be necessary to manually failover, or disable one of the configured failover connections.

This can be done by editing the appropriate datasource, selecting the particular connection from the Fail-over Connections list, and un-checking the Enabled toggle box. The status icon for the particular connection will change to a wrench icon to indicate it is in maintenance mode.

Failback

AppBoard will attempt to re-establish communications with a higher priority connection at the configured Connection Retry Interval, which is part of the data source configuration. This value defaults to 300 seconds (5 minutes) so this means it may take up to 5 minutes for failback to occur once a higher priority database connection has been restored.

Template-note.png
It is important Connection Retry Interval is not set too low for a number of reasons, including interfering with other internal timeouts of the connection manager. However it's also important in a high-availability scenario where the primary database is having ongoing issues and flapping (up/down/up/down). Having this setting too low will result failing back too often, potentially to a service which is not working correctly.


Testing Failover

Perform the following steps to test your failover configuration:

  1. Make sure your AppBoard server has connectivity to all of the data sources to be tested and confirm that they are all online.
  2. Create individual Data Sources that access each of your Primary, Secondary, and [optional] Tertiary data sources. Identify or create a small distinction in the source data that will indicate which data source is being accessed when the data is viewed in a Data Collection.
  3. Validate that AppBoard can successfully connect to each of the data sources independently, by viewing data in each Data Collection and confirming that it matches the data in each raw data source.
  4. Configure failover as detailed above.
  5. Validate that the Data Collection is showing the data from the Primary data source.
  6. Disconnect the Primary data source from AppBoard.
  7. Validate that the Data Collection fails over to show the data from the Secondary data source. Note: you may need to wait for polling/caching settings to expire before the next update shows the change in the data.
  8. Reconnect AppBoard to the Primary data source and disconnect the Secondary data source from AppBoard.
  9. Validate that the Data Collection fails back to show the data from the Primary data source. Note: you may need to wait for polling/caching settings to expire before the next update shows the change in the data.
  10. [optional] Disconnect the Primary and Secondary data sources from AppBoard.
  11. [optional] Validate that the Data Collection fails over to show the data from the Tertiary data source. Note: you may need to wait for polling/caching settings to expire before the next update shows the change in the data.