Azure Functions still “Cold Start” in Consumption plan when keep alive request sent per 4 mins(每 4 分钟发送一次保持活动请求时,Azure Functions 在消费计划中仍然“冷启动)
问题描述
我已经阅读 了解无服务器冷启动|Azure 应用服务团队博客 文章.评论之一说您也可以通过每隔 4 分钟从 Azure Logic 应用调用函数来避免消费计划中的冷启动.
I already read Understanding Serverless Cold Start | Azure App Service Team Blog article. One the the comments said You can avoid cold start in consumption plan also by calling function from Azure Logic app in every 4 mins interval.
我试图每 4 分钟向我的应用程序的一项功能发出 1 个请求,但这并不总是有效.它有时仍然是冷启动.我知道这是一个黑客.有没有更好的方法来保证App在使用Consumption plan时始终运行?
I was trying to make 1 request per 4 minutes to one function of my app but this doesn’t always works. It sometimes still cold start. I know it's a hack. Is there any better way to ensure App always running when using Consumption plan?
推荐答案
我试图在我的文章中回答这个问题 Azure Functions 中的首次请求之外的冷启动.
I tried to answer this question in my article Cold Starts Beyond First Request in Azure Functions.
简而言之,似乎没有办法完全避免冷启动.保持活动调用将延长给定实例的生命周期,但不会无限期延长.
In short, there doesn't seem to be a way to avoid cold starts completely. Keep alive calls will make the life span of a given instance longer, but it won't make it indefinitely long.
目前,冷启动似乎是 FaaS 实施的真正问题,它们会随着时间的推移得到优化,但您可能无法将它们减少到 0.
For now, Cold Starts seem to be a genuine issues of FaaS implementations, they get optimized over time, but probably you won't be able to reduce them to 0.
这篇关于每 4 分钟发送一次保持活动请求时,Azure Functions 在消费计划中仍然“冷启动"的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:每 4 分钟发送一次保持活动请求时,Azure Functions 在消费计划中仍然“冷启动"


- 良好实践:如何重用 .csproj 和 .sln 文件来为 CI 创建 2022-01-01
- MoreLinq maxBy vs LINQ max + where 2022-01-01
- WebMatrix WebSecurity PasswordSalt 2022-01-01
- 带有服务/守护程序应用程序的 Microsoft Graph CSharp SDK 和 OneDrive for Business - 配额方面返回 null 2022-01-01
- C# 中多线程网络服务器的模式 2022-01-01
- 输入按键事件处理程序 2022-01-01
- Web Api 中的 Swagger .netcore 3.1,使用 swagger UI 设置日期时间格式 2022-01-01
- C#MongoDB使用Builders查找派生对象 2022-09-04
- 如何用自己压缩一个 IEnumerable 2022-01-01
- 在哪里可以找到使用中的C#/XML文档注释的好例子? 2022-01-01