push_stream_wildcard_channel_max_qtd

Sets the maximum quantity of wildcard channels allowed in the NGINX Push Stream module.

Syntaxpush_stream_wildcard_channel_max_qtd number;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The push_stream_wildcard_channel_max_qtd directive specifies the maximum number of wildcard channels that can be created within the NGINX Push Stream environment. Wildcard channels allow for flexible channel subscription, where a subscriber can listen for multiple channels that match a certain pattern. This is particularly useful for applications that require dynamic channel handling based on certain criteria, such as user IDs or types of messages.

When configured, this directive controls the scalability of wildcard channels in your NGINX setup, helping to prevent overuse of server resources. If the limit is reached, further attempts to create a new wildcard channel will be rejected, thus maintaining performance and stability under heavy load conditions. It is important for users to balance the setting of this directive with their application's needs to ensure that they do not inadvertently restrict the capability expected from their pub/sub architecture.

The directive can be specified at the http, server, or location context, allowing for fine-grained control on a per-server or per-location basis, depending on the specific application requirements.

Config Example

http {
    push_stream_wildcard_channel_max_qtd 10;
}

Setting this directive too low may cause legitimate subscription requests to be denied, impacting application functionality.

Expect an increased load on shared memory when utilizing wildcard subscriptions, particularly if this limit is high.

Ensure that the server can handle increased resource usage if a large number of wildcard subscriptions are expected.

← Back to all directives