首页 > 其他分享 >【Azure Function & Application Insights】在Azure Function的日志中,发现DrainMode mode enabled Traces。它是什么意思呢?

【Azure Function & Application Insights】在Azure Function的日志中,发现DrainMode mode enabled Traces。它是什么意思呢?

时间:2024-04-02 20:12:24浏览次数:28  
标签:Function 缩放 enabled mode Azure DrainMode

问题描述

Applicaiton Insights收集了Azure Function的日志,定期发现有” DrainMode mode enabled Traces“。

DrainMode 是什么意思呢?

 

问题解答

排出模式(Drain mode) 属于Function App 缩放机制中的一部分,当后台检测到Function App请求量不再需要当前的instance时会停止对该instance 的监听并额外等待一段时间使当前instance 上正在执行的请求完成执行,等待时间结束后就会移除当前的instance。所以这个操作的日志被Application Insights记录为DrainMode mode enabled traces.

 

该机制属于平台层面的一部分, 官方文档中有提到:  

Scale-in behaviors

Event-driven scaling automatically reduces capacity when demand for your functions is reduced.

对函数的需求减少时,事件驱动的缩放会自动减少容量。

It does this by draining instances of their current function executions and then removes those instances. This behavior is logged as drain mode.

它通过清空其当前函数执行的实例,然后删除这些实例来执行此操作。 系统会将此行为记录为排出模式

The grace period for functions that are currently executing can extend up to 10 minutes for Consumption plan apps and up to 60 minutes for Premium plan apps. Event-driven scaling and this behavior don't apply to Dedicated plan apps.

当前正在执行的函数的宽限期可以扩展到消耗计划应用最多 10 分钟,高级版计划应用最多可以延长 60 分钟。 事件驱动的缩放和此行为不适用于专用计划应用。

 

参考资料

Azure Functions 中的事件驱动缩放  : https://learn.microsoft.com/zh-cn/azure/azure-functions/event-driven-scaling?tabs=azure-cli#scale-in-behaviors

 

 

[END]

标签:Function,缩放,enabled,mode,Azure,DrainMode
From: https://www.cnblogs.com/lulight/p/18111403

相关文章

  • vue xxx.find is not a function;
    错误:1.后端获取数据集合,存到 vuex store 中和本地 window.localStorage;2.因为要解决刷新丢失问题在routeconfig中路由拦截重新 拿到本地数据window.localStorage 保存到store中;3.界面刷新报错:vuexxx.findisnotafunction分析:1.xxx类型确实不是数组;......
  • 【Azure Function & Application Insights】调用Function上传和下载文件,有时候遇见大
    问题描述在FunctionApp中配置了无代码模式的ApplicationInsights,但有时候发现,超过1MB的文件上传/下载操作成功。但是在ApplicationInsights中,却没有发现请求日志?这是一种什么情况呢? 问题解答ApplicationInsights 是具有采样功能的,当传入执行的速率超过指定的阈值时,Appl......
  • 当你遇到layer.alert is not a function怎么办
    下面我们来解决layer.alertisnotafunction的方法之一,下面来看一个GIS的例子,在登录之后,地图是加载出来的,当你点击区域定位是出现layer.alertisnotafunction。而我们的代码是没有bug,但是它还是报错。那是因为我们的url的地图出问题了,这是因为切图后的数据没有我们要的数......
  • std::function
    std::functional 是C++标准库中的一个模板类,它是对可调用对象的一种通用包装器。std::functional 允许你将任何可调用对象(包括函数、函数对象、lambda表达式、以及其他 std::functional 对象)当作一个统一的对象来处理。它通常与C++的算法库、容器库以及某些需要可调用对......
  • vuex.esm.js:135 Uncaught Error: [vuex] getters should be function but “getters.
    报错vuex.esm.js:135UncaughtError:[vuex]gettersshouldbefunctionbut"getters.mode"inmodule"userModule"is"dark".atassert(vuex.esm.js:135:1)原因:在使用vuex的moulds时index.js中已创建了一个vue实例newVuex.Store,在模块文件中又再创建了一个,导致报......
  • 【平台开发】MTK6833——add harware command queue function in lk
    CQE实现主要步骤(参考协议)Hostsystem结构commandqueue任务结构:2.TheoryofOperation(操作理论)init(初始化)初始化,enableCQ配置CQCFGTaskDescriptorsize配置CQTDLBA(CommandQueuingTaskDescriptorListBaseAddress)和CQTDLBAU(CommandQueuingTaskDe......
  • How to use the smb function of Babyfile App (connect Mac computer)
    1.Mac computer "SystemSettings"->"General"->"Sharing" reachthepagebelow(ordirectlysearchfor"FileSharing"onthesystemsettingspagetoreachthepage).Thenclickthebuttonshownin①2.Then......
  • 【Azure Cloud Service】部署云服务时候遇见 Last exit code: 0. Last role exception
    问题描述部署云服务时候遇见Lastexitcode:0.Lastroleexception:(System.IO.FileNotFoundException)错误,提示无法加载System.Runtime。Recoveringrole...Applicationstartuptask0finishedsuccessfully.Lastexittime:[2024/03/27,20:23:31.142].Lastexit......
  • 【Azure Service Bus】启用诊断日志来获取客户端访问Azure Service Bus的IP地址 [2024
    问题描述在使用ServiceBus中,遇见了莫名奇妙,不知来源的访问,但是又不敢直接修改AccessKey(担心影响正常业务),所以想通过访问服务的客户端IP地址来分析,到底是那里的客户端在访问ServiceBus服务? 问题解答经过调查,可以通过开启AzureServiceBus的诊断日志来实现此目的。......
  • Z_Function
    defz_func(s:str)->list:n=len(s)z=[0]*(n)l,r=0,0foriinrange(1,n):ifi<r:z[i]=min(r-i,z[i-l])whilei+z[i]<nands[z[i]]==s[i+z[i]]:z[i]+=1ifi+z[i]......