serf: implement key broadcast and response handling in reusable functions