- Coming up, I'm gonna walk you
through the new Azure Event Grid service,
which is now generally available.
Event Grid is a managed event routing platform
which enables you to react in real time
to changes happening in Azure resources
or your own application.
Today, in order to discover a state change in a resource
such as a new database entry or VM creation,
we typically perform scheduled or continuous polling.
That means that you're continuously consuming CPU
and network resources.
Using Event Grid, applications can now send events
when state changes occur
using push semantics just like push notifications.
Those are only engaged
once actionable events are sent.
Anyone interested in acting on those events
can subscribe and be notified without polling,
reducing your required compute resources.
Event Grid handles built-in Azure events
from Azure services,
as well as custom events from your apps
and publishes them in real time.
It can dynamically scale
to handle millions of events every second.
And we offer financially backed four-nine SLA
for your production workload.
As events are received,
Event Grid facilitates the triggering
of programmatic actions
via event handlers such as Azure Automation,
Event Hubs, Azure Functions,
Logic Apps, or Custom Web Hooks.
Because everything is based on HTTP,
Event Grid can integrate with virtually any service or app.
Where this becomes powerful is in
simplifying ops and security automation
through easier policy enforcement,
expanding serverless compute scenarios
with no eventing sources
and in enabling better communication and integration
between your event-based services and apps.
Starting with operations here,
you can see that I have a number of event subscriptions
set up to trigger programmatic actions
for everyday management
so that you can automate specific operations
and simplify policy enforcement without polling.
In the Azure portal,
we can write a script for Azure Automation
so that any time a specific event is fired,
it will trigger a specific action.
In this case, I want to properly tag all new VMs
and send a notification to my team's channel,
letting everyone know.
I could also do other things
like check for open ports or OS version.
Every time a VM is spun up,
Event Grid will automatically trigger a script
checking for these things.
Let's go ahead and create a VM to try it out.
Now, I already have one set up, so I'll just hit Create.
Here's what's going on behind the scenes.
In this case, we're publishing events
from Azure Resource Manager
every time a VM is created.
When I told the portal to spin up a new VM for me,
Azure Resource Manager kicked off a VM create job.
Once it finished,
it published the event to Event Grid
with information about what happened
with what resource and where.
Event Grid looks for all event subscriptions
that are filtering to match the set of information
and efficiently routes, filters, and delivers it
to the subscribing endpoints.
In this case, the Azure Automation to trigger the script.
So we just got a notification in Microsoft Teams,
and if we check it out,
we can see that the new VM has been created,
which means that the automation script ran,
tagged the VM, and notified us
that the deployment has happened.
I've also sent a copy of the event
to a service called RequestBin,
where we can see a copy of the raw JSON event.
You can see that the event type
is Microsoft.Resources.ResourceWriteSuccess,
and the subject is the path to the specific virtual machine
that was just created.
So beyond the operations, let me show you
how we're expanding serverless and integration scenarios.
We now enable serverless applications
to react to more events and faster.
You can also integrate with your custom applications
all without polling.
Here's how it works.
Event Grid connects a data source or application
to specific event handlers
allowing you to integrate systems
and simultaneously trigger serverless functions.
In this example, I have an HR application
that automatically processes
the onboarding of new employees.
Here, back in Azure,
you can see the event subscriptions I've created
in order to trigger actions such as equipment orders
like business card orders and ordering a laptop,
payroll updates, and welcome emails.
We can also add filters to make sure this only happens
when an employee is added and not when one leaves.
So what happens is,
every time I enter a new employee record,
we will order them business cards,
add them to our payroll database,
and then send them a welcome email.
I have a simple console app here
running our HR application.
And as you can see,
the app uses our SDK to publish a custom event to Event Grid
when a new employee is added.
And if we go back to the portal,
you'll see that the event is being sent to three places.
The first part of our system is our serverless function.
When triggered by Event Grid,
it will add equipment orders to a queue
to let our operation department know
that we need to order new business cards
and a laptop for our new hire.
Next, Event Grid will send that event to Azure Relay,
which will act as our web hook endpoint,
allowing us to access our on-prem employee database
so we can add our new employee to payroll
without punching holes in our firewall.
Finally, we have our logic app,
which is simply going to send a welcome email
to our new employee.
If we open up our on-prem event handler
and run our HR application,
we can see the new employee hire event
instantly gets fired off to event grid
and received by our on-prem handler
to be added to the payroll database.
At the same time, we can open up our function log
and see that the function has also received the event
and added an equipment order to the queue.
Finally, if we switch over to Outlook,
we can see that we've been sent an email
welcoming us to Contoso.
Again, all of this has been accomplished with zero polling.
So that was a quick overview of Event Grid.
You'll see us deliver many more event publishers
and handlers, including Azure Active Directory,
Azure Container Registry, and more.
Azure Event Grid has a pay-per-event pricing model
so that you only pay for what you use.
And to help you get started quickly,
the first 100,000 operations per month are free,
and 60 cents per million operations after that.
Also, you can take advantage of our management
and runtime SDKs to publish and subscribe to events.
And learn more by trying our quick starts.
Thank you for watching.