在消耗模式下运行的Azure功能是否适合于变化很大但时间紧迫的负载? [英] Is Azure Functions running in Consumption mode appropriate for massively varying, yet time critical Load?

查看:78
本文介绍了在消耗模式下运行的Azure功能是否适合于变化很大但时间紧迫的负载?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我将开始使用一个API,该API实际上将从0 RPS变为数十万 HTTP RPS,并以该速率运行〜2分钟。这3000万个请求的所有处理都必须在2分钟内结束。这将在周内发生7次。



在消费计划宿主模式下使用Azure功能进行无服务器访问听起来很有吸引力。 此文件描述了存在一个用于协调的比例控制器应用实例,但并没有真正讨论我对HTTP触发器的期望。我找不到任何表明秤控制器能够在我需要的时间范围内做出响应的信息。



我能找到的最佳信息是此信息表示,花了将近8分钟的时间才能扩展测试范围。



这是使用模式下Azure功能的不好用例吗?



很显然,建立一个能够在2分钟内发出3000万个请求的测试工具是一项艰巨的任务,而且费用昂贵。我想向其他这样做的人学习。

解决方案

根据我的经验,这种情况并未得到适当介绍。按消费计划。它们可以扩展到许多实例,但速度不是很快。 2分钟太快了,无法依靠。



我主要是在处理队列,而不是HTTP,但是由于扩展速度慢,我最多延迟了40分钟



如果您可以预测哪2分钟将会很繁重,那么最好的选择就是使用脚本(或其他函数)来配置容量。 / p>

I’m about to start work on an API that will literally go from 0 RPS to a couple hundred thousand HTTP RPS at the same time and run at that rate for ~2 mins. All processing of those 30 million requests must finish by the end of that 2 min period. This would happen 7 times a WEEK.

Going serverless with Azure Functions in Consumption Plan Hosting Mode sounds appealing. This document describes that a scale controller exists to coordinate app instances, but doesn't really discuss what I can expect from it for HTTP triggers. I can’t find any info that says the scale controller will be able to respond in the time frame I'd need.

The best info I could find was this info saying it took nearly 8 mins to scale up for his tests.

Is this a bad use case for Azure Functions in consumption mode?

Obviously, spinning up a testing harness that is capable of issuing 30 million requests within 2 minutes is an undertaking of its own, and an expensive one. I'd like to learn from others who have already done so.

解决方案

Based on my experience, this scenario is not properly covered by Consumption Plan. They can scale up to many instances, but not very rapidly. 2 minutes is way too fast to rely on.

I was mostly working with queues, not HTTP, but I got delays up to 40 minutes caused by low pace of scaling up.

If you can predict which 2 minutes are going to be heavy-loaded, your best bet could be to provision the capacity with a script (or another Function).

这篇关于在消耗模式下运行的Azure功能是否适合于变化很大但时间紧迫的负载?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆