Get an overview of Event Grid, and find out how it fits in the overall architecture.
- [Instructor] Let's start by understanding the basics of what is the Azure Event Grid. The Azure Event Grid is a fully managed, intelligent event routing service that allows for uniform event consumption using a publish-subscribe model. So, the important over here is that some resource in Azure, and for that matter, even our site of Azure, can publish an event, and somebody else entrusted in that event can react to that event, somebody else is informed, like a tap on your shoulder that something happened, you need to react to it.
Now, you can imagine that this opens a number of possibilities for us, let's find out. So, at a high level you can think of this as a bunch of event sources, and through the Event Grid they can interact, or inform, multiple event handlers. Now, in this process there are some keywords that we need to get familiarized with, starting with events. Event, well, what happened? That is the definition of an event. Event sources, where did this event take place? Topics, generally speaking, publishers send events on a particular endpoint.
A publisher can decide to have one topic, or more complicated publishers can have many topics, and event subscription, which is the endpoint, or the builtin mechanism to root events, sometimes to multiple handlers. Remember that subscriptions are also used by handlers to intelligently filter incoming events, all capabilities of the Event Grid, and finally, event handlers. Event handlers, that's the app, or the service, that is entrusted in the event and is reacting to the event.
Now, I choose not to read this entire list, but I think the takeaway over here is that Azure Event Grid supports a number of event sources. Perhaps the motion trusting one is on number three, custom topics, so you have a number of Azure resources that can act as an event source, but you can also add your own custom topics in there, isn't that amazing? Similarly, you can have a number of event handlers, people that are entrusted in reacting to an event, logic app, for instance.
So, one of the event sources was, let's say, a virtual machine, right, it spins up. That can act as an event source, and a logic app can act as a handler to that, and then we can perhaps apply some policies to that virtual machine through a logic app, imagine that. Focus on the last one, the webhooks. That means a custom webhook that you write, some piece of code that you write, can act as an event handler, so the extensibility model here is quite amazing.
At a high level, remember that the Event Grid is simple and powerful. You have point-and-click configuration, you have the ability to do some advanced filtering, you have one endpoint that can subscribe to many topics, or the same event can be sent to many handlers, and you have the ability to have high throughput, millions per second. Most interestingly, you pay for what you use, so we no longer have that polling problem where, you know, we had entrusted in something, but if an event never shows up we're still paying for it, not so in the Event Grid.
In the Event Grid, you pay for an event that you receive, and the costs are, well, relatively minimal anyway. As I said, it's pay per event, and it's reliable delivery with a 24 retry and an exponential backoff feature. I'll talk more about the details of this in this course. There are lots of builtin event types, and also the flexibility to create custom events. So, a number of interesting architectural patterns open up for you.
For instance, we can do entrusting serverless applications now. For instance, I can react to a blob storage event to, say, resize an uploaded picture, or convert a document format. I can have ops automation, so when a new virtual machine gets created I want to make sure that our custom policies, let's say, are applied to that particular virtual machine, or if a new SQL database is spun up, or a new Docker image gets created.
Let's say that we want to perform some basic task on those, all of that is possible with the help of the Event Grid, and certainly, via reliable delivery, advanced routing, you get a lot of power and tools to create compelling applications, and with things like logic apps, you can even do this with zero code.
- What is Azure Event Grid?
- Security and authentication
- Delivery and retry
- Using Event Grid with Azure Blog Storage