Azure Function App todo
计费
Azure 提供了多种计费方案, 详见官方文档 Azure Function Pricing.
这里只记录其中的 Pay as you go 计费方案.
| Meter | Free Grant (Per Month) | Pay as you go |
|---|---|---|
| Execution Time* | 400,000 GB-s | $0.000016/GB-s |
| Total Executions* | 1 million executions | $0.20 per million executions |
"Memory used by a function is measured by rounding up to the nearest 128 MB, up to the maximum memory size of 1,536 MB, with execution time calculated by rounding up to the nearest 1 ms. The minimum execution time and memory for a single function execution is 100 ms and 128 mb respectively."
单次执行的最低资源开销为 100 ms 和 128 mb 内存, 也就是 0.0125 GB-s.
若按照每月免费额度中的资源, 100 万次请求平均执行时间如果是 3.2 s, 则刚好达到 400.000 GB-s.
如果 Function App 的内存消耗比较低, 执行时间短, 那么在价格方面是有好处的.
只是如果内存消耗小于 128 mb, 执行时间小于 100 ms, 则没有进一步优化的必要.