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.
To configure failover for a Data Source, follow the instructions on this page to enable failover on the Data Source configuration panel.
2. Enabling Failover
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.
Access the failover configuration by creating or editing a Database Data Source:
- On the Connect step click the Enable Failover toggle switch to the Yes position.
- This will display the Fail-over Connections list.
- 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.
- 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.
- Click "Add" in the "Fail-over Connections" panel. A "Secondary" connection label will be added to the list of "Fail-over Connections".
- 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.
- [optional] Click "Add". A "Tertiary" connection label will be added to the list of "Fail-over Connections".
- [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.
- [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:
3. Additional Information
3.1. 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.
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.
3.3. Testing Failover
Perform the following steps to test your failover configuration:
- Make sure your AppBoard server has connectivity to all of the data sources to be tested and confirm that they are all online.
- 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.
- 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.
- Configure failover as detailed above.
- Validate that the Data Collection is showing the data from the Primary data source.
- Disconnect the Primary data source from AppBoard.
- 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.
- Reconnect AppBoard to the Primary data source and disconnect the Secondary data source from AppBoard.
- 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.
- [optional] Disconnect the Primary and Secondary data sources from AppBoard.
- [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.