Skip to content

Commit 2b94673

Browse files
authored
incorporate perf feedback
1 parent d1986ff commit 2b94673

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,14 +59,21 @@ To mitigate the impact of large inputs and outputs to APIs, you may choose to de
5959

6060
That said the best practice for dealing with _large_ data is to keep it in external storage and to only materialize that data inside Activities, when needed. When taking this approach, instead of communicating the data itself as inputs and/or outputs of Durable Functions APIs, you can pass in some lightweight identifier that allows you to retrieve that data from external storage when needed in your Activities.
6161

62+
### Keep Entity data small
63+
64+
Just like for inputs and outputs to Durable Functions APIs, if an entity's explicit state is too large, you may run into memory issues. In particular, an Entity state needs to be serialized and de-serialized from storage on any request, so large states add serialization latency to each invocation. Therefore, if an Entity needs to track large data, it is recommended to offload the data to external storage and simply track some lightweight identifier in the entity that allows you to materialize the data from storage when needed.
65+
6266
### Fine tune your Durable Functions concurrency settings
6367

6468
A single worker instance can execute multiple work items concurrently to increase efficiency. However, processing too many work items concurrently risks exhausting resources like CPU capacity, network connections, etc. In many cases, this shouldn’t be a concern because scaling and limiting work items are handled automatically for you. That said, if you’re experiencing performance issues (such as orchestrators taking too long to finish, are stuck in pending, etc.) or are doing performance testing, you could [configure concurrency limits](durable-functions-perf-and-scale.md#configuration-of-throttles) in the host.json file.
6569

6670
> [!NOTE]
6771
> 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.
68-
69-
72+
73+
### Invest in stress testing
74+
75+
As with anything performance related, the ideal concurrency settings and architechture of your app ultimately depends on your application's workload. Therefore, it is 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.
76+
7077
## Diagnostic tools
7178

7279
There are several tools available to help you diagnose problems.

articles/azure-functions/durable/durable-functions-perf-and-scale.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,10 @@ The `partitionCount` parameter can be specified in the **host.json** file. The f
194194
}
195195
```
196196

197+
## Considerations to minimize invocation latencies
198+
199+
Under normal circumstances, invocation requests (to activities, orchestrators, entities, etc.) should be processed rather quickly. However, there's no guarantee on the maximum latency of any invocation request as it depends on factors such as: the type of scale behavior your App Service Plan, your concurrency settings, and the size of your application's backlog. As such, we recommend investing in [stress testing](./durable-functions-best-practice-reference.md#invest-in-stress-testing) to measure and optimize your application's tail latencies.
200+
197201
## Performance targets
198202

199203
When planning to use Durable Functions for a production application, it is important to consider the performance requirements early in the planning process. Some basic usage scenarios include:

0 commit comments

Comments
 (0)