Event Grid

7/3/2018 – 4 minutes to read – Edit Online

Azure Event Grid provides serverless infrastructure for event-based applications. You can publish to Event Grid from any source and consume messages from any platform. Event Grid also has built-in support for events from Azure resources to streamline integration with your applications. For example, you can subscribe to blob storage events to notify your app when a file is uploaded. Your application can then publish a custom event grid message that is consumed by other cloud or on-premises applications. Event Grid was built to reliably handle massive scale. You get the benefits of publishing and subscribing to messages without the overhead of setting up the necessary infrastructure.

Image

The major features of event grid include:

Scenarios

Event Grid addresses several different scenarios. This section covers three of the most common ones.

Ops automation

Image

Event Grid can help speed automation and simplify policy enforcement by notifying Azure Automation when infrastructure is provisioned. Application integration

Image

You can use Event Grid to connect your app to other services. Using standard HTTP protocols, even legacy apps can be easily modified to publish Event Grid messages. Web hooks are available for other services and platforms to consume Event Grid messages.

Serverless apps

Image

Event Grid can trigger Azure Functions, Logic Apps, or your own custom code. A major benefit of using Event Grid is that it uses a push mechanism to send messages when events occur. The push architecture consumes fewer resources and scales better than polling mechanisms. Polling must check for updates on a regular interval.

Event Grid vs. other Azure messaging services

Azure provides several messaging services, including Event Hubs and Service Bus. Each is designed to address a specific set of use cases. The following diagram provides a high-level overview of the differences between the services.

Image

 

 

For a more in-depth comparison, see Compare messaging services.

Performance targets

Using Event Grid you can take advantage of the following performance guarantees:

Event Grid schema

ImageEvent Grid uses a standard schema to wrap custom events. The schema is like an envelope that wraps your custom data element. Here is an example Event Grid message:

 

Everything about the message is standard except the data property.

You can inspect the message and use the eventType and dataVersion to de-serialize the custom portion of the payload.

 

Azure resources

A major benefit of using Event Grid is the automatic messages produced by Azure. In Azure, resources automatically publish to a topic that allows you to subscribe for various events. The following table lists the resource types, message types, and events that are available automatically.

Image

For more information, see Azure Event Grid event schema.

You can access Event Grid from any type of application, even one that runs on-premises.

Conclusion

In this chapter you learned about the Azure serverless platform that is composed of Azure Functions, Logic Apps, and Event Grid. You can use these resources to build an entirely serverless app architecture, or create a hybrid solution that interacts with other cloud resources and on-premises servers. Combined with a serverless data platform such as Azure SQL or CosmosDB, you can build fully managed cloud native applications.

Recommended resources