nchan_redis_retry_commands_max_wait
The 'nchan_redis_retry_commands_max_wait' directive sets the maximum wait time for retrying Redis commands in Nchan's pub/sub messaging system.
Description
The 'nchan_redis_retry_commands_max_wait' directive is used to control the maximum duration that Nchan will wait when attempting to retry commands to a Redis backend. This is particularly useful in scenarios where Redis might be temporarily down or experiencing latency issues. When a command fails, the system will automatically retry it up to the specified limit until it either succeeds or exceeds this maximum wait time.
The value specified for this directive should be a time span (duration) and it is defined in seconds or in a shorthand notation (like '1s', '500ms'). This directive represents an important aspect of resilience in the pub/sub architecture, ensuring that transient errors with Redis do not lead to permanent failures or loss of message delivery. If the wait time threshold is exceeded, Nchan will log an error and may abort the operation.
Using this directive optimally requires understanding the normal latency and performance characteristics of your Redis backend, allowing you to set an appropriate timeout value that balances between resilience and preventing excessive delays in message processing.
Config Example
upstream backend {
nchan_redis_retry_commands_max_wait 1s;
server 127.0.0.1:6379;
}Setting this value too high might cause long delays during peak times, impacting message delivery performance.
Not specifying a value or using a non-standard format may lead to syntax errors during the configuration reload.