NGINX RTMP supports push and pull relay models. Pull is quite simple and does not require any additional handling. However push until now suffered from a significant problem. It could not reconnect in case of failure. Now this feature is implemented. When pushed connection gets broken it's reconnected after specified timeout. The timeout is configured with the following directive: push_reconnect 1s;
Setting timeout to zero makes reconnection immediate but can obviously cause 100% CPU usage in case of network problem. Default timeout value is 3 seconds.