具有较少功能的多功能应用程序或具有大量功能的少数功能应用程序? [英] Multiple Function Apps with fewer Functions or few Function Apps with lots of Functions?

查看:76
本文介绍了具有较少功能的多功能应用程序或具有大量功能的少数功能应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们目前正在Azure中的每个环境/每个区域部署一个功能应用程序.这些功能应用程序内部包含许多功能.通过将Service Plan设置为消耗状态并使其动态化,我们对此感到非常满意,因为它减少了ARM模板中的操作复杂性.

We are currently deploying a single Function App per environment / per region in Azure. These Function Apps contain lots of Functions inside them. With the Service Plan set to consumption and therefore dynamic we are fairly happy with this as it reduces the operational complexity in our ARM templates.

但是,我们确实想知道,是否最好在每个环境中拥有更多的功能应用程序"并在其中分布我们的功能?

We do wonder though, if it would be best to have more "function apps" per environment and spread our functions across them?

这样做对我们有什么真正的好处,因为我们认为印象效果将由动态服务计划来扩展?

Is there any real benefit to doing this as we are under the impression performance will be scaled by the dynamic service plan?

推荐答案

乔丹,

这个问题的答案实际上取决于您使用函数处理的工作负载类型.

The answer to the question would really depend on the type of workloads you're handling with your functions.

尽管缩放控制器将处理缩放以满足需求,但Function App中的功能确实会在每个实例上共享资源,并且资源密集型(内存或CPU)可能会影响同一App中的其他功能.

Although the scale controller will handle scaling to meet demand, functions within a Function App do share resources on each instance, and a resource intensive (either memory or CPU) may impact other functions in the same app.

同一Function App中的功能之间也没有进程隔离.它们都以相同的过程(某些脚本语言(如Python,Batch等)除外)和相同的App Domain中运行.因此,如果隔离是一个因素(出于安全性,依赖性管理,共享状态等原因),则您可能需要考虑将功能拆分到不同的应用程序中.

There is also no process isolation between functions in the same Function App. They all run in the same process (except for some of the scripting languages like Python, Batch, etc) and in the same App Domain. So if isolation is a factor (for reasons like security, dependency management, shared state, ect.), you may want to consider splitting functions into different apps.

版本和部署是另一个值得考虑的因素,因为部署的单位是功能应用程序(而不是各个功能)

Versioning and deployment is another factor worth considering, as the unit of deployment is a Function App (and not the individual functions)

话虽如此,如果您没有遇到工作负载的资源消耗问题,并且如上所述,您不必担心上述问题,那么在单个功能应用程序中运行多个功能会大大简化管理,所以我不会如果没有必要,那就不要改变这种方法.

With that said, if you're not running into resource consumption issues with your workloads and the issues mentioned above are not a concern, as you pointed out, running multiple functions in a single function app significantly simplifies management, so I wouldn't change that approach if there's no need to do so.

我希望这会有所帮助!

这篇关于具有较少功能的多功能应用程序或具有大量功能的少数功能应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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