Skip to content

Commit

Permalink
formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Aug 24, 2019
1 parent fcb7fff commit a316068
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions horizon.md
Expand Up @@ -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

Expand Down

0 comments on commit a316068

Please sign in to comment.