Solutions
Edge Failover
27 min
edge failover user guide what does this solution do? this docker container provides an automated backup system for edge computing devices think of it as a "smart switch" that automatically activates a backup device when your primary device stops working the problem it solves in industrial or remote environments, edge devices are critical for operations when the main device fails, you need a backup to take over immediately to avoid downtime manually switching to a backup device can be slow and requires someone to be available 24/7 how it works (simple version) if you have two identical edge devices parent edge device (primary) handles your normal operations child edge device (backup) sits idle, ready to help this service acts like a "watchdog" that continuously monitors parent edge device via either ping or some equivalent api call to make sure it's working copies the settings from parent edge device regularly (like backing up your phone contacts) when parent edge device fails automatically configures child edge device with the same settings and puts it to work when parent edge device comes back switches back to monitoring parent edge device and cleans up child edge device what you need to provide to run this container, you need to tell it where is parent edge device? ( https //{parent edge device url} ) where is child edge device? ( https //{child edge device url} ) how to connect to both edge devices (api keys) ping interval aka how often to check if parent edge device is working (optional, defaults to every 30 seconds) setting up the container step 1 prepare your information parent edge device's web address child edge device's web address parent edge device's access token child edge device's access token step 2 run the container use docker to start the container with your information (please contact your litmus representative for the docker image) docker run d \\ e edge url parent=https //{parent device url} \\ e edge url child=https //{child device url} \\ e edge api token parent=parent device api key \\ e edge api token child=child device api key \\ e ping interval=30 \\ {docker image name} {latest} what happens next once running, the container will normal operation (both edge devices working) check parent edge device every 30 seconds "are you okay?" parent edge device responds "yes, i'm working fine" copy parent edge device's current settings every few minutes keep child edge device on standby when parent edge device fails check parent edge device "are you okay?" no response from parent edge device alert "parent edge device is down! activating backup!" copy all of parent edge device's settings to child edge device child edge device starts handling the work when parent edge device recovers check parent edge device "are you okay?" parent edge device responds "yes, i'm back!" switch back "parent edge device is healthy again!" clean up child edge device (remove the copied settings) parent edge device takes over the work again what you'll see in the logs the container will show you messages like "parent is healthy" everything is normal "parent is down applying template to child" backup is activating "parent is back online cleaning up child" switching back to main "successfully fetched template with x keys" settings copied successfully important notes data storage the container saves parent edge device's settings to disk if the container restarts, it can still use the saved settings you can optionally mount a folder to preserve these settings network requirements the container needs internet access to reach both edge devices both edge devices need to be accessible via web addresses (https) the container acts as a "middle man" between your two edge devices security all communication uses secure https connections your access tokens are kept private within the container no sensitive information is logged to the console common scenarios scenario 1 planned maintenance you need to update parent edge device turn off parent edge device container automatically switches to child edge device do your maintenance on parent edge device turn parent edge device back on container automatically switches back scenario 2 unexpected failure parent edge device crashes or loses network connection within 30 seconds, container detects the problem container activates child edge device immediately your operations continue without manual intervention when parent edge device is fixed, switching back happens automatically scenario 3 network issues if the container can't reach parent edge device due to network problems it assumes parent edge device is down and activates child edge device when network is restored, it switches back to parent edge device troubleshooting if something isn't working check the logs the container will tell you what's happening verify addresses make sure both edge device addresses are correct and reachable check tokens ensure access tokens are valid and have proper permissions network connectivity confirm the container can reach both edge devices changelog v1 3 0 introduce cross compatibilty of integrations across multiple versions of le v1 2 1 added general purpose documentation fixed logs being too noisy fixes for more issues with devices not cleaned properly to the child device v1 2 0 fixed corner case logical issues with cleanup of devices extracted from template fixes for cc template application due to discrepancy in get template call and post template call v1 1 1 force default ping interval to be minimum 30 seconds v1 1 0 added default directory as /data/ instead of /tmp for storing template from parent device clean up methods for extracting parent and child urls add skip components mechanism for any component other than integrations and devicehub for a faster template application v1 0 1 fix issues with http timeouts to parent device when downloading template added longer default timeout v1 0 0 initial application ready basic functionality of fetch and store template, apply template, logic for when to apply templates