Responsibilities for Azure Event Grid event handlers

Azure Event Grid brings together Event Publishers and Event Handlers in a loosely coupled manner, by providing a serverless and event-based routing service.  This blog describes some of the main characteristics an event handler should have in order to fit into this communication model.

Requirements

Availability

Data is pushed towards the event handlers, so they need to obtain a minimum level of availability.  The event handler must expose an HTTP endpoint that can be consumed by Azure Event Grid.  If the endpoint is not reachable, a back-off retry kicks in that lasts for 24 hours, which weakens the high availability requirement a little bit.

Scalability

The event publishers determine the pace in which events need to be processed, because Azure Event Grid immediately forwards these events with minimal latency.  This means that event handlers need to dynamically scale their processing power, in order to handle peak loads without interruptions.

Intelligence

Event handlers should be rather smart endpoints.  For example, they need to be capable of dealing with out-of-order messages.  They must understand the sequencer event fields to determine the right order of events on any particular object.  Azure Event Grid doesn’t care about ordering between event messages!

Serverless Façades

A highly available, highly scalable and intelligent application: this smells like serverless technology, which is a perfect fit for event handlers!

But… What if your final backend application / service does not meet these requirements?  Are you doomed not to use Azure Event Grid at all in such scenarios?  No!  In these cases, you can put a serverless event handler façade in front of the actual event handler.  This façade can fulfil one or more requirements that the backend system does not support:

  • Availability: the façade can transform the message exchange into an asynchronous protocol (e.g. Azure queues or FILE/FTP), which does not require the event handler to be available all the time.
  • Scalability: the façade can transform the message exchange into an asynchronous protocol (e.g. Azure queues or FILE/FTP), which load-levels high peaks and allows the event handler to process events at its own pace.
  • Intelligence: the façade can deal with the sequencing requirements and offer the events in the correct order to the final event handler.

Event Handler Facades

Conclusion

Event handlers preferably need to be available, scalable and intelligent.  Serverless event handler façades can overcome potential shortcomings of your final backend application.  If the majority of your backend event handlers does not meet these requirements, you might consider other solutions.

Don’t hesitate to share your vision on this!  It’s recent technology, so looking forward to new insights!

Cheers,
Toon

Advertisements

4 thoughts on “Responsibilities for Azure Event Grid event handlers

    • Completely agree. The scenario is about using Event Grid with appropriate event handlers, but having a small percentage with limited capabilties. Via this setup with facade, you can also plug in those more legacy applications. As my conclusion states: “If the majority of your backend event handlers does not meet these requirements, you might consider other solutions.” > which, indeed, mainly refers to Service Bus Topics. Thanks for your feedback!

      Liked by 1 person

  1. Ah yes, I see your point – this is a solution to help continue to support legacy components.
    Thanks – great article! 🙂

    Like

  2. Pingback: Microsoft Integration Weekly Update: Sep 11 | Hooking Stuffs Together

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s