You can use skydns[1] to implement service discovery based on DNS. It has etcd as a backend and creating/updating a DNS entry is done by creating an entry in etcd with a TTL. Then, you can use DNS the same way you are already doing without service discovery.