简体   繁体   English

Azure 消费计划功能是否使用多台服务器?

[英]Does Azure Functions on Consumption Plan utilize multiple servers?

When I run an Azure Function App on the Consumption Plan, does it then utilize multiple servers, or does every instance of the functions always run on the same server?当我在 Consumption Plan 上运行 Azure Function 应用程序时,它会使用多台服务器,还是函数的每个实例总是在同一台服务器上运行?

Access Tokens The background for the question is that I want to cache the access tokens for APIs that the functions are using.访问令牌问题的背景是我想缓存函数正在使用的 API 的访问令牌。 Right now I refresh the tokens when the initial timer triggered function starts - but it's no real solution.现在我在初始计时器触发 function 启动时刷新令牌 - 但这不是真正的解决方案。

Each function should try using the existing auth token and then ask for a new one if it fails.每个 function 都应该尝试使用现有的身份验证令牌,如果失败则请求一个新的。 Similar question here: authentication token cache for azure function with a comment saying the Consumption plan doesn't quarantee reuse of servers类似的问题在这里: azure function 的身份验证令牌缓存,并附有评论说消费计划不保证服务器的重用

Yes, it does utilise multiple servers, so in-memory caching will end up having multiple cache instances.是的,它确实使用了多个服务器,因此内存缓存最终将拥有多个缓存实例。 The filesystem is shared across servers though, so disk-based caching is an option, or you can just go for a distributed cache like Azure Cache for Redis.虽然文件系统在服务器之间共享,因此基于磁盘的缓存是一个选项,或者您可以只使用 go 来获得分布式缓存,例如 Azure 缓存用于 ZE111446745A1825B862F8727AE63BCE4。

Yes, We end up using Redis Cache to handle the same scenario.是的,我们最终使用 Redis 缓存来处理相同的场景。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 C#:使用计划上的Azure功能中不存在键集 - C#: Keyset does not exist in Azure Functions on consumption plan Azure 功能:定时器触发和消费计划问题 - Azure Functions: timer trigger and consumption plan issue Azure功能:我无法选择消费计划 - Azure-functions: I cannot choose consumption plan 消耗计划中的Azure函数执行会相互干扰 - Azure function executions in consumption plan interfere with eachother 为什么我的 Azure Function 在消耗计划上运行而不是扩展? - Why is my Azure Function running on a Consumption Plan not scaling? 如何在Azure门户中使用Azure功能的源代码管理 - How to utilize source control for Azure Functions in the Azure Portal GdPicture14 是否可以在使用消耗计划的 Azure 函数中工作? - Can GdPicture14 work within an Azure Function using Consumption Plan? 使用 Microsoft Playwright 在 Azure Function Linux 消费计划中创建本地 PDF 文件 - Creating a local PDF file in Azure Function Linux consumption plan with Microsoft Playwright 消费托管功能在Azure免费订阅上的性能 - Performance of Consumption-hosted Functions on Azure free subscriptions Azure Functions-Node.js和Dot Net Core 2.2内存消耗在回收之前一直在增长 - Azure Functions - nodejs and dot net core 2.2 memory consumption keeps growing until recycled
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM