本文介绍了每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. I试图每4分钟向我的应用程序的一项功能发出1个请求,但这并不总是有效。有时还是冷启动。我知道这是骇客。有没有更好的方法来确保使用消费计划时App始终运行?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函数中冷启动超出第一个请求。 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仍在消耗计划中“冷启动”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-26 02:12