Configuring a Server for Datameer Failover
Introduction
Failover is an operational mode in which the functions of a system component (i.e. the server or database) are taken over by secondary system components when the primary component is unavailable - either through failure or scheduled downtime. This involves offloading tasks to a standby system component making the procedure as seamless as possible for the end user. You must be aware of the following when configuring Datameer X for failover.
Configuring a Server for High Availability
Use MySQL - High Availability and Scalability to find different possible solutions for configuring Datameer X for high availability.Â
Configuring a Server for Datameer X Failover
To configure Datameer X for failover, you need to prepare a backup server that has Datameer X installed. This backup server can be started-up whenever the regular Datameer X server shuts down. If both servers are configured to use the same MySQL database, the backup server can be started immediately after the primary server shuts down without any further configuration. You must ensure that only one Datameer X server is running at a time. Never start both servers at the same time.
Prerequisites
- You require an additional license file for the backup server
- The library and configuration files for both servers must be synchronized (
etc/das-env.sh
,etc/custom-jars/*
,etc/custom-plugins/*
andconf/*
)
Configuring a Server for MySQL Crashes
Backup the Datameer X MySQL database regularly (e.g. every 15 minutes):
mysqldump [-h <dbhost>] -u dap dap -p > <backup-folder>/das-backup.dmp
Delay deleting files from HDFS for a period longer than this backup interval, by setting this property in
conf/live.properties
:# To allow better failover in case of a crashed db deleted data should be kept longer than the configured # frequency of database backups housekeeping.keep-deleted-data=30m
How to recover after a MySQL crash:
Stop Datameer
bin/conductor.sh stop
Ensure that the Datameer X database is present on the MySQL failover machine or run the following command:
mysql [-h <dbhost>] -u root -p < bin/mysql-init.sql
Restore the database from the MySQL dump using the following command:
mysql -u dap -p dap < <path-to>/das-backup.dmp
- Direct Datameer X to the new database location (if it is different).
Start Datameer.
bin/conductor.sh startConfiguring a server for high availabity