Edge HA & Alerting

From Datonis
Jump to: navigation, search

Introduction

Fail-over HA for Datonis Edge is achieved by mounting a Network shared drive and using it for the Data folder of Edge.

Data folder of Edge contains all the contextual information of the Edge.

HA.jpg

Typical life cycle of 2 HA Edge Instances

HA instances flow.jpg

Configuration

Configuring Edge failover to support high availability use case

Datonis Edge now natively provides failover mechanism. It uses master/slave topology where one instance is active and others are in standby. More than one slaves can be configured for failover.

Edge provides failover capability using a lock file from the shared data directory. The shared data directory holds the persistent state. As failover relies on the file system lock, the file system storing the data directory has to be accessible across  instances(using SAN, NFS, …​). Refer: https://en.wikipedia.org/wiki/Clustered_file_system.

When a first instance starts, if the lock is available, it takes the lock and becomes the master. Whenever a second instance starts, it tries to acquire the lock. As the lock is already held by the master, the instance becomes a slave, in standby mode (not active).

Configuring failover in traditional installation

In the install/upgrade scripts (e.g. install_edge_service.sh/upgrade_edge_service.sh), add a new option --datadirpath that will point to the shared data directory across instances e.g. --datadirpath "/shared-vol/datonis-edge-data".  After this step, install or upgrade edge service on all instances and edge services will start in failover mode, the first service to start will become master node.

Configuring failover in docker installation

In the Docker command line, edit option --mount to point the source volume to the shared data directory e.g.  --mount type=bind,source=/shared-vol/datonis-edge-data,target=/opt/datonis-edge-data. The Docker containers started with shared mounts will configure edge program to run in failover mode. The first started docker container will become master node.

Mounting Shared Folder

SHARING THE DATA FOLDER ON WINDOWS:

  • Control panel -> Programs -> Programs and Features -> Turn windows features on or off
  • Turn on features related to cifs (server and client) and nfs
  • Create folder which has to be shared.
  • Right click and turn network sharing on and give permissions and add users.
  • You will see the network address.

MOUNTING THE NETWORK SHARED DIRECTORY ON WINDOWS:

  • Win + r -> \\servername\sharedFolder
  • Map the shared folder to a drive using UI (This PC -> Computer -> Map network drive)
  • In command Prompt, create a symlink for the shared Folder.
mklink /D C:\myLink \\127.0.0.1\share

This will allow the Edge Service to access the shared folder at C:\myLink

SHARING THE DATA FOLDER ON UBUNTU:

  • Install samba
  • Create a directory for Edge data
  • Right click -> properties -> Local share network : enable sharing and also change permissions to create and delete for users.

MOUNTING THE NETWORK SHARED DIRECTORY ON UBUNTU:

  • Example:
  • sudo mount -t cifs //192.168.0.145/share /home/yash/Altizon/sharedData -o username='yash',domain='WORKGROUP'