nchan_redis_cluster_check_interval
Sets the interval for checking the health of Redis nodes in an Nchan Redis cluster.
Description
The nchan_redis_cluster_check_interval directive is used to define the frequency at which Nchan will check the health of Redis nodes when operating in clustered mode. This parameter accepts a time value which determines how often these health checks are performed. By configuring this interval, you can optimize the responsiveness and reliability of your Nchan instance when connected to a Redis cluster, ensuring that any failed nodes are detected and handled promptly.
When configured, Nginx will periodically send requests to each Redis node in the cluster at the specified interval to validate their availability. This check helps maintain the integrity and performance of the pub/sub messages flowing through Nchan. A too short interval might lead to excessive checks, potentially impacting performance, while a too long interval might delay the detection of a node failure, affecting the overall availability of your messaging system.
This directive is typically used in the context of an upstream block within your Nginx configuration file that is set up for connecting to a Redis cluster. It is crucial for setups that require high availability and low latency, especially in systems with many publishers and subscribers interfacing through Nchan.
Config Example
upstream redis_cluster {
server redis1.example.com;
server redis2.example.com;
nchan_redis_cluster_check_interval 5s;
}Setting the interval too low can cause excessive load on the Redis nodes due to frequent health checks.
Not specifying this directive defaults to the built-in default, which may not suit specific high availability needs.