When using Azure Functions based on a Consumption Based Plan that preform an async
task, are you billed at the same rate if you await
them vs. not awaiting
?
Asked
Active
Viewed 513 times
4

ansario
- 345
- 4
- 13
1 Answers
2
Yes, that does not affect the billing. Billing timer is simply based on the amount of time between the start and the end of the function.
However, writing proper async code is always preferable from a scaling standpoint.

David Ebbo
- 42,443
- 8
- 103
- 117
-
If async calls are sequential, why is it still preferable? In what way will it help scale a function? – Mikhail Shilkov Feb 27 '17 at 19:40
-
Azure Functions tries to run multiple instances of a Function App in the same instance (in addition to scaling to multiple instances). By using async code, you'll be able to run more in one instance, since it doesn't lock any threads. This will in turn reduce cold starts which happen when additional instances need to start. – David Ebbo Feb 27 '17 at 23:39