Skip to content

Commit 67e3ae1

Browse files
Merge pull request #268636 from davidmrdavid/dajusto/df-external-events-idempotency
Add notes on external event duplication for DF
2 parents 13b550e + a6eb35c commit 67e3ae1

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

articles/azure-functions/durable/durable-functions-best-practice-reference.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,13 @@ A single worker instance can execute multiple work items concurrently to increas
7171
> [!NOTE]
7272
> This is not a replacement for fine-tuning the performance and concurrency settings of your language runtime in Azure Functions. The Durable Functions concurrency settings only determine how much work can be assigned to a given VM at a time, but it does not determine the degree of parallelism in processing that work inside the VM. The latter requires fine-tuning the language runtime performance settings.
7373
74+
### Use unique names for your external events
75+
76+
As with activity functions, external events have an _at-least-once_ delivery guarantee. This means that, under certain _rare_ conditions (which may occur during restarts, scaling, crashes, etc.), your application may receive duplicates of the same external event. Therefore, we recommend that external events contain an ID that allows them to be manually de-duplicated in orchestrators.
77+
78+
> [!NOTE]
79+
> The [MSSQL](./durable-functions-storage-providers.md#mssql) storage provider consumes external events and updates orchestrator state transactionally, so in that backend there should be no risk of duplicate events, unlike with the default [Azure Storage storage provider](./durable-functions-storage-providers.md). That said, it is still recommended that external events have unique names so that code is portable across backends.
80+
7481
### Invest in stress testing
7582

7683
As with anything performance related, the ideal concurrency settings and architechture of your app ultimately depends on your application's workload. Therefore, it's recommended that users to invest in a performance testing harness that simulates their expected workload and to use it to run performance and reliability experiments for their app.

articles/azure-functions/durable/durable-functions-external-events.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,8 @@ The *"wait-for-external-event"* API waits indefinitely for some input. The func
329329
> [!NOTE]
330330
> If your function app uses the Consumption Plan, no billing charges are incurred while an orchestrator function is awaiting an external event task, no matter how long it waits.
331331
332+
As with Activity Functions, external events have an _at-least-once_ delivery guarantee. This means that, under certain conditions (like restarts, scaling, crashes, etc.), your application may receive duplicates of the same external event. Therefore, we recommend that external events contain some kind of ID that allows them to be manually de-duplicated in orchestrators.
333+
332334
## Send events
333335

334336
You can use the *"raise-event"* API defined by the [orchestration client](durable-functions-bindings.md#orchestration-client) binding to send an external event to an orchestration. You can also use the built-in [raise event HTTP API](durable-functions-http-api.md#raise-event) to send an external event to an orchestration.

0 commit comments

Comments
 (0)