简体   繁体   中英

Azure function app billing, cost and performance depending on the number of functions

I see Azure functions are billed based on ( https://azure.microsoft.com/en-us/pricing/details/functions/ ) :

  • time of execution (GB/s)
  • number of executions

And they are scalable in terms of real-time load.

Would there be any performance, cost or benefit/difference in the following two scenarios:

  • 1 Azure function receiving all the traffic requests R performing action X and returning result Y
  • N Azure functions receiving R/N requests each performing action X and returning result Y

In other words will the distributed balanced load over multiple azure function will increase/decrease the cost/performance of this service? Based on the documentation above I cannot see any potential difference.

I assume we are talking HTTP Functions on Consumption Plan.

In theory, the results should be the same.

In practice, you might spot some difference:

  • N Function Apps will probably lead to more cold starts (when a new instance is brought to life), especially for low load

  • A single Function App is reported to perform below expectations for some HTTP scenarios (see eg this post: part 1 , part 2 ). External load balancer might mitigate some of those issues, or it might not

The official recommendation would probably be to use just one App and rely on the runtime to solve your scaling problems. Multiple Apps are obviously bringing some management overhead.

In the short term, you need to run a test of your workloads and evaluate yourself if they are on satisfactory level.

Performance directly translates into price. You don't pay extra for running multiple Apps on Consumption Plan.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM