notify_relay_redirect

The `notify_relay_redirect` directive specifies a new destination for all notifications related to a stream redirect in the NGINX RTMP module.

Syntaxnotify_relay_redirect URL;
Defaultnone
Context
Arguments1

Description

The notify_relay_redirect directive in the NGINX RTMP module is used to redirect notifications related to streaming activities. This is especially useful in scenarios where multiple instances of application servers are used for broadcasting. By setting this directive, one can specify a new URL where notifications will be sent after a stream is redirected, allowing for distributed streaming setups to notify corresponding endpoints or services accordingly. This helps maintain control over stream notifications in a highly available environment.

When a stream is published or played, the response and notifications are critical for updating various components in the streaming architecture. The directive requires a single argument which is the target URL to which the notifications will be redirected. It is vital to ensure that the server specified in the URL is capable of handling these redirected notifications so that the expected behavior is achieved consistently across the streaming setup. The directive's deployment can enhance the manageability of events triggered by stream activities, such as starting or stopping streams, and can also integrate seamlessly with external monitoring solutions.

To utilize this directive effectively, it can be placed within the server or application block of your NGINX configuration file where your streaming applications are defined. Be mindful of the URL provided so it points to a reliable handler that can process incoming notifications without issues, ensuring seamless operation and performance of the streaming service.

Config Example

application live {
    live on;
    notify_relay_redirect http://example.com/notify;
}

Ensure the URL provided is reachable and can handle incoming notifications.

Be cautious with server configurations to avoid cycles in notifications.

← Back to all directives