diff --git a/horizon.md b/horizon.md index 6ce8e1e3ab..126147a706 100644 --- a/horizon.md +++ b/horizon.md @@ -65,12 +65,20 @@ Horizon allows you to choose from three balancing strategies: `simple`, `auto`, The `auto` strategy adjusts the number of worker processes per queue based on the current workload of the queue. For example, if your `notifications` queue has 1,000 waiting jobs while your `render` queue is empty, Horizon will allocate more workers to your `notifications` queue until it is empty. When the `balance` option is set to `false`, the default Laravel behavior will be used, which processes queues in the order they are listed in your configuration. -#### Min/Max processes Options - -The `horizon` configuration file allows you to configure the max and min processes. The queue will now autoscale up to the maximum of processes. - - 'minProcesses' => 1, - 'maxProcesses' => 5, +When using the `auto` strategy, you may define the `minProcesses` and `maxProcesses` configuration options to control the minimum and maximum number of processes Horizon should scale up and down to: + + 'environments' => [ + 'production' => [ + 'supervisor-1' => [ + 'connection' => 'redis', + 'queue' => ['default'], + 'balance' => 'auto', + 'minProcesses' => 1, + 'maxProcesses' => 10, + 'tries' => 3, + ], + ], + ], #### Job Trimming