创建Azure功能的多个实例 [英] creating several instances of an Azure function

查看:98
本文介绍了创建Azure功能的多个实例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以创建相同功能的多个实例?

Is it possible to create several instances of the same function?

假设我想在新用户注册时启动应用程序功能,以便在注册后计划未来的交互。

Suppose that I want to start an app function whenever a new user registers, to time future interactions after registration.

我可以看到如何做到这一点但是当多个注册一个接一个地发生时建议的方法是什么?

I can visualize how to do that but what is the suggested approach for when there are multiple registrations that happen one after the other?

推荐答案

在消费计划中,缩放由azure本身处理。但我相信这并不是你所要求的。

On the consumption plan, scaling is taken care of by azure itself. But I believe that's not really what you are asking.

根据你的要求,我相信你有一个"有状态的"。每个用户的后端类型。如果是这样,那真的不是一个好的设计,这会大大增加复杂性和失败的原因。
我相信这不会得到支持大多数标准实施(除非您自己管理所有内容)。

Based on your ask, I believe you have a "stateful" back end of sorts for each user. If so, that really isn't good design which would drastically increase complexity and causes of failure.
I believe this isn't something that will be supported by most standard implementations (unless you are managing everything on your own).

您应该改为使用"无状态"。后端,它可以根据用户从外部数据源(如数据库或缓存(如Redis))进行调用来获取状态。

You should instead have a "stateless" back end which can fetch state based on the user making the call from an external data source like a database or a cache (like Redis).


这篇关于创建Azure功能的多个实例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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