Basic Failover Setup

A basic failover system requires two servers with EnterMedia installed on each. If one server goes down, the other "failover" server will automatically start up.

This is an ideal arrangement for any production environment that has a requirement of 99.9+% uptime.

1) (Optional, but recommended) Mount a shared data drive between two servers with EnterMedia installed on each (e.g. Production server and Failover server), and symbolically link the /WEB-INF/data directory to the shared location on both servers. Note: If you don't do this, you will need to set PULL_DATA=true in step 4.

2) Use git to download our custom failover scripts to your "Failover" server git git:// installer_centos

3) Copy the "failover" sub-folder to a convenient place, e.g. /opt/entermedia/

4) Configure


PROD_SERVER: The IP of the production server 
PULL_DATA: Do you want to sync the data from production to the failover when the production server goes down? This should be used if you aren't using a shared location.
EMAIL_NOTIFICATION: If enabled, an email notification is sent to EMAIL_ADDRESS every time failover occurs.
EMAIL_ADDRESS: The email address failover notifcations are sent to. 

5) Setup crontab to run script periodically. Run: crontab -e Add the following line to the file:

#check production every 5 minutes */5 * * * * /opt/entermedia/failover/ >/dev/null 2>&1 Modify the first parameters to run as frequently as desired.

6) Test basic failover system Begin test with the production server tomcat process running and the failover server tomcat process not running. Shutdown the tomcat process on the production server. Run: service tomcat stop Wait the amount of time specified in the crontab line from step 5. Check to see if the tomcat process on the failover server started. Verify that EM site is running on the server and the data reflects that of production.

7) Get back to normal operation if failover occurs Shutdown the "failover" tomcat server. The production server should automatically start back up.

NOTE: If the data directory is the only shared directory between the two servers, then EnterMedia upgrades will be handled independently on each server.