The Azure Load Balancer has a default idle timeout of 4 minutes for both TCP and UDP connections. This means that if there is no activity on the connection for 4 minutes, the load balancer will close the connection.
You can adjust the idle timeout value for your load balancer by using the Azure portal, Azure PowerShell, or the Azure CLI. To do this, you'll need to create a load balancer rule and specify the desired idle timeout value in the rule configuration.
In your case, you'll want to set the idle timeout value to a value that is appropriate for your COAP server and the refresh rate of your observable resources. This will depend on your specific requirements and the nature of your application. You may want to experiment with different values to find the optimal setting for your needs.
It's worth noting that you should also consider the idle timeout value on the client side. If the client has a shorter idle timeout value than the load balancer, the connection may be closed by the client before the load balancer has a chance to close it. This can lead to unexpected behavior and may require additional handling in your application.
I hope this helps!