From c0fccb2bcfeff05d136723e4e2591429a0d56455 Mon Sep 17 00:00:00 2001 From: Bilgin Ibryam Date: Wed, 4 Dec 2024 20:50:57 +0000 Subject: [PATCH 1/3] Reworded concurency control doc --- .../en/operations/configuration/control-concurrency.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/daprdocs/content/en/operations/configuration/control-concurrency.md b/daprdocs/content/en/operations/configuration/control-concurrency.md index 976b78ab980..8bfdc044cd4 100644 --- a/daprdocs/content/en/operations/configuration/control-concurrency.md +++ b/daprdocs/content/en/operations/configuration/control-concurrency.md @@ -8,14 +8,14 @@ description: "Learn how to control how many requests and events can invoke your Typically, in distributed computing, you may only want to allow for a given number of requests to execute concurrently. Using Dapr's `app-max-concurrency`, you can control how many requests and events can invoke your application simultaneously. -Default `app-max-concurreny` is set to `-1`, meaning no concurrency. +Default `app-max-concurreny` is set to `-1`, meaning no concurrency limit is enforced. ## Different approaches While this guide focuses on `app-max-concurrency`, you can also limit request rate per second using the **`middleware.http.ratelimit`** middleware. However, it's important to understand the difference between the two approaches: - `middleware.http.ratelimit`: Time bound and limits the number of requests per second -- `app-max-concurrency`: Specifies the number of concurrent requests (and events) at any point of time. +- `app-max-concurrency`: Specifies the max number of concurrent requests (and events) at any point of time. See [Rate limit middleware]({{< ref middleware-rate-limit.md >}}) for more information about that approach. @@ -46,7 +46,7 @@ To set concurrency limits with the Dapr CLI for running on your local dev machin dapr run --app-max-concurrency 1 --app-port 5000 python ./app.py ``` -The above example effectively turns your app into a single concurrent service. +The above example effectively turns your app into a sequential processing service. {{% /codetab %}} From 7bc95b5a53c95680e31638b6cc09ddd459f32a5a Mon Sep 17 00:00:00 2001 From: Whit Waldo Date: Fri, 6 Dec 2024 00:50:50 -0600 Subject: [PATCH 2/3] Crypto is still in alpha, so the URLs shouldn't point to v1.0 values Signed-off-by: Whit Waldo --- daprdocs/content/en/reference/api/cryptography_api.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/daprdocs/content/en/reference/api/cryptography_api.md b/daprdocs/content/en/reference/api/cryptography_api.md index 336088f23e3..c0c4824277b 100644 --- a/daprdocs/content/en/reference/api/cryptography_api.md +++ b/daprdocs/content/en/reference/api/cryptography_api.md @@ -20,7 +20,7 @@ This endpoint lets you encrypt a value provided as a byte array using a specifie ### HTTP Request ``` -PUT http://localhost:/v1.0/crypto//encrypt +PUT http://localhost:/v1.0-alpha1/crypto//encrypt ``` #### URL Parameters @@ -59,7 +59,7 @@ returns an array of bytes with the encrypted payload. ### Examples ```shell -curl http://localhost:3500/v1.0/crypto/myAzureKeyVault/encrypt \ +curl http://localhost:3500/v1.0-alpha1/crypto/myAzureKeyVault/encrypt \ -X PUT \ -H "dapr-key-name: myCryptoKey" \ -H "dapr-key-wrap-algorithm: aes-gcm" \ @@ -81,7 +81,7 @@ This endpoint lets you decrypt a value provided as a byte array using a specifie #### HTTP Request ``` -PUT curl http://localhost:3500/v1.0/crypto//decrypt +PUT curl http://localhost:3500/v1.0-alpha1/crypto//decrypt ``` #### URL Parameters @@ -116,7 +116,7 @@ returns an array of bytes representing the decrypted payload. ### Examples ```bash -curl http://localhost:3500/v1.0/crypto/myAzureKeyVault/decrypt \ +curl http://localhost:3500/v1.0-alpha1/crypto/myAzureKeyVault/decrypt \ -X PUT -H "dapr-key-name: myCryptoKey"\ -H "Content-Type: application/octet-stream" \ From c13e6d9cc918fef42dca66ba3c074445a7899df1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gustavo=20Cha=C3=ADn?= Date: Thu, 12 Dec 2024 23:38:16 +0100 Subject: [PATCH 3/3] Update setup-aws-snssqs.md (#4437) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Update setup-aws-snssqs.md Add `concurrencyLimit` parameter description. Signed-off-by: Gustavo Chaín * Update daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Signed-off-by: Gustavo Chaín * Update setup-aws-snssqs.md Added # - name: concurrencyLimit into example Signed-off-by: Mark Fussell --------- Signed-off-by: Gustavo Chaín Signed-off-by: Mark Fussell Co-authored-by: Hannah Hunter <94493363+hhunter-ms@users.noreply.github.com> Co-authored-by: Mark Fussell --- .../components-reference/supported-pubsub/setup-aws-snssqs.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md index 360bd6ef3e3..86865de5b30 100644 --- a/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md +++ b/daprdocs/content/en/reference/components-reference/supported-pubsub/setup-aws-snssqs.md @@ -68,7 +68,8 @@ spec: # value: 5 # - name: concurrencyMode # Optional # value: "single" - + # - name: concurrencyLimit # Optional + # value: "0" ``` @@ -98,6 +99,7 @@ The above example uses secrets as plain strings. It is recommended to use [a sec | disableDeleteOnRetryLimit | N | When set to true, after retrying and failing of `messageRetryLimit` times processing a message, reset the message visibility timeout so that other consumers can try processing, instead of deleting the message from SQS (the default behvior). Default: `"false"` | `"true"`, `"false"` | assetsManagementTimeoutSeconds | N | Amount of time in seconds, for an AWS asset management operation, before it times out and cancelled. Asset management operations are any operations performed on STS, SNS and SQS, except message publish and consume operations that implement the default Dapr component retry behavior. The value can be set to any non-negative float/integer. Default: `5` | `0.5`, `10` | concurrencyMode | N | When messages are received in bulk from SQS, call the subscriber sequentially (“single” message at a time), or concurrently (in “parallel”). Default: `"parallel"` | `"single"`, `"parallel"` +| concurrencyLimit | N | Defines the maximum number of concurrent workers handling messages. This value is ignored when concurrencyMode is set to `"single"`. To avoid limiting the number of concurrent workers, set this to `0`. Default: `0` | `100` ### Additional info