See https://gerrit.wikimedia.org/r/#/c/187074/ and https://github.com/AaronSchulz/python-memcached-relay/blob/master/mcrelayd.py
Folding into T88492