nchan_redis_cluster_check_interval_min

Sets the minimum interval for health checks in a Redis cluster within the Nchan module.

Syntaxnchan_redis_cluster_check_interval_min seconds;
Default1s
Contextupstream
Arguments1

Description

The nchan_redis_cluster_check_interval_min directive is utilized within the Nchan module for configuring the minimum interval at which health checks are performed on the Redis cluster connection. This directive is particularly important for maintaining the responsiveness and reliability of message delivery in a pub/sub architecture. The interval defined is measured in seconds, and it allows the server to detect failed nodes in the Redis cluster efficiently.

When health checks are performed at intervals longer than the defined minimum, the Nchan module may potentially delay detecting any issues, resulting in slower failover in the event of a node failure. Conversely, if the interval is set too low, it may lead to unnecessary load on the Redis servers, especially if many nodes are being checked frequently. Therefore, finding an appropriate balance is crucial for optimal performance. The value assigned should take into account the size of the Redis cluster and how critical message timeliness is in your application.

This directive is placed in the upstream context, which means it affects how Nchan connects to its upstream Redis nodes. Increasing the check interval beyond the default can help minimize performance impacts, but it could also increase the risk of using a failed connection if the interval is too long. Monitoring and adjusting this setting can lead to a robust and high-performing messaging service.

Config Example

upstream redis_cluster {
    server 10.0.0.1:6379;
    server 10.0.0.2:6379;
    nchan_redis_cluster_check_interval_min 5s;
}

Setting the interval too low can cause increased load on Redis servers.

If the interval is too high, you may experience delayed detection of node failures.

← Back to all directives