Serverless application architectures using Event Grid

Event Grid
Blob Storage

Solution Idea

If you'd like to see us expand this article with more information, such as potential use cases, alternative services, implementation considerations, or pricing guidance, let us know with GitHub Feedback!

This solution idea publishes Azure Blob storage events using Azure Event Grid. Then Azure Functions receives the event with built-in Event Grid support and processes the data in Azure Blob storage. Using this solution, developers only need to focus on implementing the business logic in Azure Functions. Event Grid provides a reliable near-real-time notifications system, for the event-driven integration between Blob storage and Azure Functions.

The core design concept uses Event Grid to connect data sources and event handlers. Event Grid decouples event publishers from event subscribers, by using a pub/sub model and a simple HTTP-based event delivery. This process allows the system to build scalable serverless applications. For example, Event Grid instantly triggers a serverless function to run an image process (such as to shrink an image), whenever someone adds a new photo to a Blob storage container.

Architecture

Diagram of the serverless application architecture. Download an SVG of this architecture.

Data flow

  1. A user uploads a photo to a Blob storage container.
  2. Blob storage publishes storage object events to Event Grid.
  3. Event Grid triggers an Azure Function, based on the event criteria that the Function subscribed.
  4. The function retrieves the photo and runs the image process on it (such as to shrink an image). Then it saves the new image to another Blob storage container.

Components

Next steps

Learn more about the component technologies:

Explore related architectures: