notify_no_resolve
The `notify_no_resolve` directive disables DNS resolution for server names, allowing the use of raw IP addresses during RTMP stream notifications.
Description
The notify_no_resolve directive is utilized within the context of NGINX's RTMP module, particularly in configurations for streaming applications. This directive allows the server to prevent DNS resolution for 'notify' requests, meaning that if clients notify the server of certain events (like stream publishing), the server will not attempt to resolve any domain names provided in those notifications. Instead, it can directly utilize raw IP addresses, which can improve performance and reduce dependency on DNS, especially in environments where DNS resolution may introduce latency or failures.
When this directive is enabled, it is essential to ensure that clients correctly specify the server with either an IP address or a resolvable hostname. Therefore, while this approach can lead to better performance in some scenarios, it also requires careful management of client configurations to avoid potential connectivity issues. The directive is beneficial in media streaming setups where clients frequently connect and disconnect, reducing the need for DNS lookups, which can become a bottleneck under high-load conditions.
Additionally, since notify_no_resolve is about stream notifications, it mainly affects how server notifications are processed rather than the actual streaming data flow or connectivity methods between clients and the server.
Config Example
rtmp {
server {
application live {
notify_no_resolve;
}
}
}Ensure that clients provide a valid IP address if DNS resolution is disabled; otherwise, they may encounter connectivity issues.
This directive applies only to notifications; it does not affect the main streaming data path.
Domain names provided in stream notifications will not be resolved, which may lead to confusion if misconfigured.