什么是 Azure 事件网格?What is Azure Event Grid?

通过 Azure 事件网格,可使用基于事件的体系结构轻松生成应用程序。Azure Event Grid allows you to easily build applications with event-based architectures. 首先,选择要订阅的 Azure 资源,然后提供要向其发送事件的事件处理程序或 WebHook 终结点。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. 事件网格包含来自 Azure 服务对事件的内置支持,如存储 blob 和资源组。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.

可以使用筛选器将特定事件路由到不同的终结点,多播到多个终结点,并确保事件可靠传送。You can use filters to route specific events to different endpoints, multicast to multiple endpoints, and make sure your events are reliably delivered.

部署 Azure 事件网格是为了通过本机分布在每个区域中的多个容错域和可用性区域(在支持它们的区域中)来最大限度地提高可用性。Azure Event Grid is deployed to maximize availability by natively spreading across multiple fault domains in every region, and across availability zones (in regions that support them). 有关事件网格支持的区域列表,请参阅可用产品(按区域)For a list of regions that are supported by Event Grid, see Products available by region.

本文将对 Azure 事件网格进行简要概述。This article provides an overview of Azure Event Grid. 若要开始使用事件网格,请参阅使用 Azure 事件网格创建和路由自定义事件If you want to get started with Event Grid, see Create and route custom events with Azure Event Grid.



此图展示事件网格连接源和处理程序的方式,而不是支持的集成的完整列表。This image shows how Event Grid connects sources and handlers, and isn't a comprehensive list of supported integrations. 有关所有受支持的事件源的列表,请参阅下一部分。For a list of all supported event sources, see the following section.

事件源Event sources

目前,以下 Azure 服务支持将事件发送到事件网格。Currently, the following Azure services support sending events to Event Grid. 有关列表中某个源的详细信息,请选择相应链接。For more information about a source in the list, select the link.

事件处理程序Event handlers

有关每个处理程序的功能的完整详细信息及相关文章,请参阅事件处理程序For full details on the capabilities of each handler as well as related articles, see event handlers. 当前,以下 Azure 服务支持从事件网格处理事件:Currently, the following Azure services support handling events from Event Grid:


在可以开始进行操作的 Azure 事件网格中有五个概念:There are five concepts in Azure Event Grid that let you get going:

  • 事件 - 发生了什么。Events - What happened.
  • 事件源 - 事件发生的地点。Event sources - Where the event took place.
  • 主题 - 其中发布者发送事件的终结点。Topics - The endpoint where publishers send events.
  • 事件订阅 - 用于路由事件,有时用于多个处理程序的终结点或内置机制。Event subscriptions - The endpoint or built-in mechanism to route events, sometimes to more than one handler. 订阅还用于处理程序,以便智能地筛选传入事件。Subscriptions are also used by handlers to intelligently filter incoming events.
  • 事件处理程序 - 对事件作出反应的应用或服务。Event handlers - The app or service reacting to the event.

有关这些概念的详细信息,请参阅 Azure 事件网格中的概念For more information about these concepts, see Concepts in Azure Event Grid.


下面是 Azure 事件网格中的一些主要功能:Here are some of the key features of Azure Event Grid:

  • 简洁性 - 指向并单击从 Azure 资源到任何事件处理程序或终结点的目标事件。Simplicity - Point and click to aim events from your Azure resource to any event handler or endpoint.
  • 高级筛选 - 筛选事件类型或事件发布路径,以确保事件处理程序仅接收相关的事件。Advanced filtering - Filter on event type or event publish path to make sure event handlers only receive relevant events.
  • 扇出 - 订阅到相同事件的多个终结点,以将该事件的副本发送到所需的所有位置。Fan-out - Subscribe several endpoints to the same event to send copies of the event to as many places as needed.
  • 可靠性 - 使用指数退避算法在 24 小时内重试,以确保事件成功传送。Reliability - 24-hour retry with exponential backoff to make sure events are delivered.
  • 按事件支付 - 仅支付事件网格的使用量。Pay-per-event - Pay only for the amount you use Event Grid.
  • 高吞吐量 - 在事件网格上构建高容量工作负荷。High throughput - Build high-volume workloads on Event Grid.
  • 内置事件 - 使用资源定义的内置事件快速启动和运行。Built-in Events - Get up and running quickly with resource-defined built-in events.
  • 自定义事件 - 在应用中使用事件网格路由、筛选并可靠地传送自定义事件。Custom Events - Use Event Grid to route, filter, and reliably deliver custom events in your app.

有关事件网格、事件中心和服务总线之间的比较,请参阅在传送消息的 Azure 服务之间进行选择For a comparison of Event Grid, Event Hubs, and Service Bus, see Choose between Azure services that deliver messages.

使用事件网格可以做什么?What can I do with Event Grid?

Azure 事件网格提供多项功能,极大程度地改进了无服务器体系结构、运维自动化和集成工作:Azure Event Grid provides several features that vastly improve serverless, ops automation, and integration work:

无服务器应用程序体系结构Serverless application architectures


事件网格将数据源与事件处理程序连接。Event Grid connects data sources and event handlers. 例如,使用事件网格触发无服务器功能,该功能在添加到 blob 存储容器时分析图像。For example, use Event Grid to trigger a serverless function that analyzes images when added to a blob storage container.

运维自动化Ops Automation


使用事件网格,可以加快自动化,简化策略执行。Event Grid allows you to speed automation and simplify policy enforcement. 例如,使用事件网格在 Azure SQL 中创建虚拟机或 SQL 数据库时通知 Azure 自动化。For example, use Event Grid to notify Azure Automation when a virtual machine or database in Azure SQL is created. 使用事件自动检查服务配置是否符合要求、将元数据放入操作工具、标记虚拟机或提交工作项。Use the events to automatically check that service configurations are compliant, put metadata into operations tools, tag virtual machines, or file work items.

应用程序集成Application integration

将应用程序与 Azure 集成

事件网格将应用与其他服务连接。Event Grid connects your app with other services. 例如,创建一个自定义主题以将应用的事件数据发送到事件网格,并利用其可靠交付、高级路由和与 Azure 的直接集成。For example, create a custom topic to send your app's event data to Event Grid, and take advantage of its reliable delivery, advanced routing, and direct integration with Azure. 或者,可将事件网格与逻辑应用搭配使用,处理任何位置的数据,而无需编写代码。Or, you can use Event Grid with Logic Apps to process data anywhere, without writing code.

事件网格的费用是多少?How much does Event Grid cost?

Azure 事件网格使用按事件支付的定价模型,因此,你只需为你所使用的事件付费。Azure Event Grid uses a pay-per-event pricing model, so you only pay for what you use. 每月前 100,000 个操作是免费的。The first 100,000 operations per month are free. 操作定义为事件引入、订阅交付尝试、管理调用和按使用者后缀筛选。Operations are defined as event ingress, subscription delivery attempts, management calls, and filtering by subject suffix. 有关详细信息,请参阅定价页For details, see the pricing page.

后续步骤Next steps