implement zero downtime restarts & let systemd manage the socket

Authored by sitter on Mar 13 2019, 2:16 PM.

Description

implement zero downtime restarts & let systemd manage the socket

socket is now managed by systemd and passed to the server, the server
then takes over. on receiving INT, TERM or QUIT the server tries to finish
all pending calls and then detaches from the socket again, so it gets
traffic queued, and quits.
if/when traffic is queued systemd will (re)start the service to begin
the dance from the top

the server no longer has builtin listening capabilities. it must always
be started through the service or manually via systemd-socket-activate

code cheekily borrowed from my geoip service

Details

Committed
sitterMar 13 2019, 2:16 PM
Parents
R843:e217f1caaede: use master instead of milonia name
Branches
Unknown
Tags
Unknown