vidforward: setup as a systemd service

Issue #387 resolved
Saxon Milton created an issue

To increase robustness of the vidforward service, we should register the process with systemd. This will involve writing a systemd service file and incorporating the appropriate setup commands into a Makefile. This service should have Restart=on-failure and WantedBy=multi-user.target fields so that it restarts on crashes and system reboots. It’s also proposed that we work out how to employ the systemd watchdog i.e. send pings from the vidforward service on regular intervals to indicate process health. This will allows us to respond by service restart to any hangs that might occur.

Vidforward Design Doc

Comments (3)

  1. Saxon Milton reporter

    This is a great guide on integration of a go based service with systemd using the github.com/coreos/go-systemd/daemon package.

    To enable watchdog, we just need to add the following to the [Service] section of the .service file:

    WatchDog=30s
    

    (Replace 30s with whatever we’d like our watchdog time to be i.e. if there’s no keep alive signal from the service within this time, the service is restarted)

  2. Log in to comment