nchan_benchmark_publisher_distribution

The nchan_benchmark_publisher_distribution directive controls the distribution of published messages across available publisher channels in an Nchan configuration.

Syntaxnchan_benchmark_publisher_distribution distribution_method;
Defaultnone
Contextlocation
Arguments1

Description

The nchan_benchmark_publisher_distribution directive is utilized within a specified location context to influence how messages are distributed to multiple publisher channels in a benchmark scenario. This capability is particularly useful for simulating various load scenarios and performance testing during development and optimization of Nchan-based applications.

When you define this directive, you specify a distribution method that the Nchan module will use while publishing messages. This can be crucial for understanding how well your application can handle increased numbers of messages or how effectively it distributes those messages among connected subscribers. Different distribution methods may prioritize certain aspects, such as uniform distribution or least connections, to evaluate the robustness of your application in high-throughput situations.

It takes a single argument which would denote the specific distribution strategy you wish to employ. This argument should correspond to one of the pre-defined strategies in the Nchan configuration. The selection of a suitable strategy can help in accurately reflecting the expected performance and load distribution across the publishers during the benchmarking process, leading to meaningful insights and optimization potentials for scaling your pub/sub system effectively.

Config Example

location /publish {
    nchan_benchmark_publisher_distribution round_robin;
}

Ensure that the specified distribution method is defined and supported in your version of Nchan.

Using an incorrect distribution method may result in unexpected behavior during message publishing or benchmarks.

← Back to all directives