Handler Selection Strategies
Handler selection controls how container instances are selected from a handler’s pool when processing a task. This is configured per-handler inhandlers.toml.
Available Strategies
Round-Robin (Default)
Cycles through container slots sequentially. Each acquisition starts from the next slot in sequence.handlers.toml
First-Available
Always starts from slot 0 and takes the first available container.handlers.toml
Random
Starts from a random slot each time.handlers.toml
Configuration
Handler selection is configured inhandlers.toml for each handler:
handlers.toml
Performance Notes
Testing showed that round-robin provides the best overall performance for most workloads. The blocking lock creates natural backpressure - workers queue at slots rather than spinning, which improves throughput under load.
Comparison
Mixing Strategies
You can use different strategies for different handlers based on their characteristics:handlers.toml