nchan_redis_storage_mode

The 'nchan_redis_storage_mode' directive configures the data storage mode for Nchan's integration with Redis for pub/sub operations.

Syntaxnchan_redis_storage_mode mode;
Defaultnone
Contexthttp, server, location, upstream
Arguments1

Description

The 'nchan_redis_storage_mode' directive allows users to specify how Nchan should interact with Redis for storing messages in a publish/subscribe architecture. This directive can be set to different modes based on the desired storage behavior in Redis, ensuring that messages can be handled either in a transient manner or more persistently.

When configured, this directive affects both the performance and reliability of message delivery. For example, if set to a transient mode, messages may be stored without persistence, which can lead to faster operations but risks message loss. Conversely, persistent storage can ensure that messages are not lost even if the Redis server is restarted, at the cost of potentially higher latency.

The flexibility provided by the 'nchan_redis_storage_mode' directive is particularly beneficial in scalable applications where performance and data integrity are critical. Depending on the choices made here, system administrators can optimize for speed, reliability, or a balance of both, tailoring their Nchan setup to fit specific application needs.

Config Example

nchan_redis_storage_mode transient;

Ensure Redis is properly configured and reachable to prevent message delivery failures.

Choosing an inappropriate storage mode can lead to unintentional message loss or delays.

Test the effects of changing storage modes under load to understand performance implications.

← Back to all directives