Skip to content

Commit

Permalink
Clarify queueLength parameter of queue-based scalers (kedacore#346)
Browse files Browse the repository at this point in the history
  • Loading branch information
basduineveld authored Jan 18, 2021
1 parent e15232f commit bca2052
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion content/docs/2.0/scalers/artemis.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ triggers:
- `queueName` - Name of the queue to check for the number of messages available.
- `brokerName` - Name of the broker as defined in Artemis.
- `brokerAddress` - Address of the broker.
- `queueLength` - Average target value to trigger scaling actions. (default: 10)
- `queueLength` - Target value for queue length passed to the scaler. Example: if one pod can handle 10 messages, set the queue length target to 10. If the actual number of messages in the queue is 30, the scaler scales to 3 pods. (default: 10)
- `restApiTemplate` - Template to build REST API url to get queue size.
- Default - `"http://<<managementEndpoint>>/console/jolokia/read/org.apache.activemq.artemis:broker=\"<<brokerName>>\",component=addresses,address=\"<<brokerAddress>>\",subcomponent=queues,routing-type=\"anycast\",queue=\"<<queueName>>\"/MessageCount"`. In this example, `<<managementEndpoint>>`, `<<brokerName>>`, `<<brokerAddress>>` and `<<queueName>>` will be replaced automatically during runtime by values from metadata of YAML definition: `managementEndpoint`, `brokerName`, `brokerAddress`, `queueName`.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.0/scalers/aws-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ triggers:
**Parameter list:**
- `queueURL` - Full URL for the SQS Queue
- `queueLength` - Target value for `ApproximateNumberOfMessages` in the SQS Queue
- `queueLength` - Target value for queue length passed to the scaler. Example: if one pod can handle 10 messages, set the queue length target to 10. If the actual `ApproximateNumberOfMessages` in the SQS Queue is 30, the scaler scales to 3 pods. (default: 5)
- `awsRegion` - AWS Region for the SQS Queue
- `identityOwner` - Receive permissions on the SQS Queue via Pod Identity or from the KEDA operator itself (see below).

Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.0/scalers/azure-storage-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ triggers:
**Parameter list:**
- `queueName` - Name of the queue.
- `queueLength` - Average target value to trigger scaling actions. (default: 5)
- `queueLength` - Target value for queue length passed to the scaler. Example: if one pod can handle 10 messages, set the queue length target to 10. If the actual number of messages in the queue is 30, the scaler scales to 3 pods. (default: 5)
- `connectionFromEnv` - Name of the environment variable your deployment uses to get the connection string.

### Authentication Parameters
Expand Down
4 changes: 2 additions & 2 deletions content/docs/2.0/scalers/rabbitmq-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ triggers:
`http://guest:password@localhost:15672/vhostname`. When using a username/password consider using `hostFromEnv` or a TriggerAuthentication.

- `queueName`: Name of the queue to read message from. Required.
- `queueLength`: Queue length target for HPA. Default is 20. Optional.
- `queueLength`: Target value for queue length passed to the scaler. Example: if one pod can handle 10 messages, set the queue length target to 10. If the actual number of messages in the queue is 30, the scaler scales to 3 pods. Default is 20. Optional.
- `protocol`: Protocol to be used for communication. Either `http` or `amqp`. It should correspond with the `host` value.

Some parameters could be provided using environmental variables, instead of setting them directly in metadata. Here is a list of parameters you can use to retrieve values from environment variables:

- `hostFromEnv`: The connection string of the RabbitMQ server, similar to `host`, but reads it from an environment variable on the scale target.`
- `hostFromEnv`: The connection string of the RabbitMQ server, similar to `host`, but reads it from an environment variable on the scale target.

> 💡 **Note:** `host`/`hostFromEnv` has an optional vhost name after the host slash which will be used to scope API request.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.1/scalers/artemis.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ triggers:
- `queueName` - Name of the queue to check for the number of messages available.
- `brokerName` - Name of the broker as defined in Artemis.
- `brokerAddress` - Address of the broker.
- `queueLength` - Average target value to trigger scaling actions. (default: 10)
- `queueLength` - Target value for queue length passed to the scaler. Example: if one pod can handle 10 messages, set the queue length target to 10. If the actual number of messages in the queue is 30, the scaler scales to 3 pods. (default: 10)
- `restApiTemplate` - Template to build REST API url to get queue size.
- Default - `"http://<<managementEndpoint>>/console/jolokia/read/org.apache.activemq.artemis:broker=\"<<brokerName>>\",component=addresses,address=\"<<brokerAddress>>\",subcomponent=queues,routing-type=\"anycast\",queue=\"<<queueName>>\"/MessageCount"`. In this example, `<<managementEndpoint>>`, `<<brokerName>>`, `<<brokerAddress>>` and `<<queueName>>` will be replaced automatically during runtime by values from metadata of YAML definition: `managementEndpoint`, `brokerName`, `brokerAddress`, `queueName`.

Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.1/scalers/aws-sqs.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ triggers:
**Parameter list:**
- `queueURL` - Full URL for the SQS Queue
- `queueLength` - Target value for `ApproximateNumberOfMessages` in the SQS Queue
- `queueLength` - Target value for queue length passed to the scaler. Example: if one pod can handle 10 messages, set the queue length target to 10. If the actual `ApproximateNumberOfMessages` in the SQS Queue is 30, the scaler scales to 3 pods. (default: 5)
- `awsRegion` - AWS Region for the SQS Queue
- `identityOwner` - Receive permissions on the SQS Queue via Pod Identity or from the KEDA operator itself (see below).

Expand Down
2 changes: 1 addition & 1 deletion content/docs/2.1/scalers/azure-storage-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ triggers:
**Parameter list:**
- `queueName` - Name of the queue.
- `queueLength` - Average target value to trigger scaling actions. (default: 5)
- `queueLength` - Target value for queue length passed to the scaler. Example: if one pod can handle 10 messages, set the queue length target to 10. If the actual number of messages in the queue is 30, the scaler scales to 3 pods. (default: 5)
- `connectionFromEnv` - Name of the environment variable your deployment uses to get the connection string.

### Authentication Parameters
Expand Down
4 changes: 2 additions & 2 deletions content/docs/2.1/scalers/rabbitmq-queue.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,14 @@ triggers:
`http://guest:password@localhost:15672/vhostname`. When using a username/password consider using `hostFromEnv` or a TriggerAuthentication.

- `queueName`: Name of the queue to read message from. Required.
- `queueLength`: Queue length target for HPA. Default is 20. Optional.
- `queueLength`: Target value for queue length passed to the scaler. Example: if one pod can handle 10 messages, set the queue length target to 10. If the actual number of messages in the queue is 30, the scaler scales to 3 pods. Default is 20. Optional.
- `protocol`: Protocol to be used for communication. Either `auto`, `http`, or `amqp`. It should correspond with the `host` value. Optional, will autodetect based on the `host` URL if possible.
- `vhostName`: Vhost to use for the connection, overrides any vhost set in the connection string from `host`/`hostFromEnv`.


Some parameters could be provided using environmental variables, instead of setting them directly in metadata. Here is a list of parameters you can use to retrieve values from environment variables:

- `hostFromEnv`: The host and port of the Redis server, similar to `host`, but reads it from an environment variable on the scale target.`
- `hostFromEnv`: The host and port of the Redis server, similar to `host`, but reads it from an environment variable on the scale target.

> 💡 **Note:** `host`/`hostFromEnv` has an optional vhost name after the host slash which will be used to scope API request.

Expand Down

0 comments on commit bca2052

Please sign in to comment.