出站TCP端口用尽时,消费计划中的Azure函数将如何工作,端口限制是什么? [英] How do Azure Functions on a Consumption Plan behave when outbound TCP ports are exhausted and what are the port limits?

查看:75
本文介绍了出站TCP端口用尽时,消费计划中的Azure函数将如何工作,端口限制是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在考虑在消费计划中使用Azure功能,而不是在App Service计划中在Azure WebJobs上实现某些功能.

I am thinking about Azure Functions on a Consumption Plan as an alternative to implementing something on Azure WebJobs on an App Service plan.

最近,在使用WebJobs时,我们一直在监视和识别负责导致App Service计划实例上的TCP端口耗尽的应用程序时遇到问题.当一个应用导致端口耗尽时,同一计划上的所有应用都将关闭,并且目前无法通过Azure门户或后端监视来诊断罪魁祸首.

Recently with WebJobs we have been experiencing problems monitoring and identifying the app responsible for causing TCP port exhaustion on an App Service plan instance. When one app causes the port exhaustion, all apps on the same plan go down, and there is presently no way of diagnosing the culprit either via Azure Portal or via backend monitoring.

我想知道Azure消费计划的功能在这方面有何区别,包括监控,扩展和影响同一计划中其他功能的机制,以及诊断此类事件的原因.

I am wondering how Azure Functions on a Consumption Plan differs in this regard, in terms of monitoring, mechanisms for scaling and impact on other functions on the same plan, and diagnosing the cause of such events.

推荐答案

简短的答案:如果您在编写函数代码时考虑了水平缩放,则应该发现端口耗尽对总体吞吐量的影响最小.

Short answer: if you write your function code with horizontal scale in mind, you should find that port exhaustion has minimal impact on your overall throughput.

Azure Functions的使用计划与专用的应用程序服务计划完全不同.您描述的一个应用程序影响其他应用程序性能的问题在专用上是有意义的,因为所有这些应用程序都在同一组VM上运行.对于消耗计划,您的功能应用程序将根据工作负载随时间在许多不同的VM上运行.您的功能应用程序的给定实例可能会遭受端口耗尽的影响,但这将导致该实例的吞吐量降低,从而导致更多的功能应用程序实例被激活.而且,基于同一计划的多个基于消耗的功能应用程序可以并且将在不同的VM上运行,因此它们不会争用资源.

The consumption plan for Azure Functions works very differently to a dedicated App Service Plan. The problem you describe of one app impacting the performance of other apps makes sense on dedicated because all of those apps are running on the same set of VMs. For the consumption plan, your function app will run on many different VMs over time, based on the workload. A given instance of your function app might suffer from port exhaustion, but that should result in decreased throughput for that instance which in turn will result in more instances of your function app being activated. Also, multiple consumption based function apps on the same plan can and will run on different VMs and so they won't be competing for resources.

当然,在某些情况下这将无法正常工作-如果您的计时器触发器正在创建数百个出站连接,则您绝对可能会遇到端口耗尽问题,因为计时器无法扩展到多个实例.在这种情况下,答案是让您的计时器将事件添加到轻松支持横向扩展的内容中,例如队列,主题或eventhub.

Of course there are situations where this wont work - if you have a timer trigger that is creating hundreds of outbound connections you could absolutely hit port exhaustion issues because timers don't scale out to multiple instances. The answer in this case is to have your timer add events to something that easily supports horizontal scale out such as a queue, topic or eventhub.

就监视/诊断而言,情况基本上与专用情况相同(即困难).但是,正如我上面概述的那样,在消费计划中应大大减少对此的需求.如果您发现任何相反的行为,请告诉我们!

In terms of monitoring/diagnosis, the situation is basically the same as it is for dedicated (i.e. its difficult). But as I've outlined above, the need for this should be significantly diminished in the consumption plan. If you observe any behavior to the contrary, please let us know!

这篇关于出站TCP端口用尽时,消费计划中的Azure函数将如何工作,端口限制是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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