Keep socket open indefinitely

Hello, Modem firmware is 1.3.5 and SDK version is 2.5.0. 

I am using Nrf9160 DK to evaluate a cellular network to control, for example, LED remotely.

At the moment I am trying to achieve this using a simple socket. Nrf91 connects to the server through a socket and listens for data. This works fine, but after some time (1h or more) socket stops working. As I understand someone in the network drops the connection due to inactivity. I tried simple RCC idle mode and eDRX mode, both cases had similar behavior.

What could be the industry standard approach to this problem while trying to minimize power consumption? How for example smart light bulbs keep connection with the server?

Do I need to send periodic keep-alive messages? Or use some different protocol?

Related