为什么要使用事件网格来实现 http 触发功能?

Why to use Event grid for http trigger function?

我正在设计Http触发功能。此函数将用于验证和调用外部 API。然后获取响应并将其传递给调用者(~在本例中为 Web 应用程序)。 这个函数可以调用 thousandtime/min(~during peak load).

我正在浏览事件网格并且很难决定为什么要使用它。 微软表示,为了保护您的事件,以免它因任何原因丢失,我应该将它与我的 http 触发器 azure 功能一起使用。

我可以很好地设计一个队列触发器函数来处理队列中的这些请求。

我指的是 MS 的这篇文章,其中说使用事件网格来获得对无服务器功能的更多控制,例如: MS Event Grid

如果您想对消息服务进行比较研究,可以参考:https://tsuyoshiushio.medium.com/azure-messaging-service-in-a-picture-f8113cec54cd

https://hackernoon.com/azure-functions-choosing-between-queues-and-event-hubs-dac4157eee1c

对于事件网格,Azure 事件网格是云的事件服务。 Azure Functions 是受支持的事件处理程序之一。

Azure Event Grid allows you to easily build applications with event-based architectures. First, select the Azure resource you would like to subscribe to, and then give the event handler or WebHook endpoint to send the event to. Event Grid has built-in support for events coming from Azure services, like storage blobs and resource groups. Event Grid also has support for your own events, using custom topics. reference

I am going through event grids and having hard time deciding why to use it.

I can very well design a queue trigger function which will process these requests in queue.

我觉得这个需要根据你的需求来定。事件网格基于事件触发器是离散的。并且事件网格具有更高的可扩展性。

如果您使用队列触发器,它不会根据事件触发,是吗?总而言之,没有必要使用事件网格。具体使用请参考您的用例。