In the case of a cloud-based remote control system that enables users to control cloud-connected devices from anywhere at any time, costs tend to increase in proportion to the number of devices. Most of the costs are derived from a message broker, a key component of the system that keeps connections from devices and relays messages between users and devices. In this paper, we analyze the costs of the message broker under a typical remote-control workload and reveal that keepalive communication costs account for a non-negligible percentage of the total. Then, we present a novel method to reduce the costs. By using the message broker as an echo back server for NAT timeout measurements initiated from devices, the method allows each device to extend the keep-alive interval adaptively by itself while keeping availability of devices and without customizing the existing message broker. The method also keeps extra resource consumption caused by the measurements under control. Finally, we evaluate our proposal on a public cloud and confirm its cost-effectiveness quantitatively.