c# - 为什么微软说 Azure Functions 是针对小段代码的?

标签 c# azure-functions

Azure 文档说...

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud.

为什么本文中有限定词“小”?是否有任何数字可以详细说明这一说法?

最佳答案

Why is there the qualifier "small" in this text?

我认为他们试图告诉我们,Azure Functions 并非旨在取代大型、长时间运行的程序。还有其他 Azure 解决方案更适合运行高分辨率图形渲染器或程序来计算 Pi 到大量的地方。 Azure 函数旨在填补不同的利基市场,其中触发器导致某些代码运行,相当快速地计算结果,然后返回该结果并停止。

这并不是说 Azure Functions 不能(理论上)支持运行时间更长的代码,但这并不是它的优化目标。

Are there any numbers to elaborate on this claim?

Azure Functions scale and hosting页面指​​示消费计划上功能的默认超时为五分钟,最大值为十分钟。但是该页面还指出,无论超时值是多少,http 触发的函数都必须在 230 秒或更短的时间内做出响应。

App Service 计划中的功能可以有无限的最大超时时间 - 大概是因为无论我们是否使用它,我们都要付费(但这只是一个半有根据的猜测)。

关于c# - 为什么微软说 Azure Functions 是针对小段代码的?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58469907/

相关文章:

c# - Visual Studio Schema 比较问题

c# - 获取在 ASP.NET Identity 中使用 Microsoft 帐户进行身份验证的用户的电子邮件

c# - 替换 c# 中的 try...catch block

azure - 如何在 Azure Functions (v2) 中以帕斯卡大小写形式返回 JSON?

azure - 以编程方式为 Azure Functions 创建 Azure 服务总线队列和 Azure 服务总线触发器

c# - 如何解析不同类型服务的 IEnumerable

c# - Xamarin.Forms ListView 大小到内容

c# - (400) 错误请求 : Get AccessToken of Salesforce error :"invalid_grant"

c# - 将 JSON 数据发布到 Microsoft Graph API Azure Function

azure - 限制 Azure Function App 中的 Azure 存储队列处理