Inspired by https://github.com/coreos/elb-presence