(gears whirring)
- Coming up, I'll show you how to use Azure and Azure Stack
to dynamically scale applications between your data center
and the public cloud while keeping all of your data
on premises and handling massive,
unexpected increases in traffic.
Azure Stack is Microsoft's hybrid cloud platform
that gives you the flexibility to run some
or all of your Azure-based infrastructure
within your data center.
The user and developer experience are consistent
across Azure and Azure Stack.
From the portal, to a consistent DevOps model,
so that the same application and infrastructure can run
on either cloud without changing any code.
Now, a core advantage to using the cloud,
is that you get access to scalable resources
that can rapidly match fluctuations and demand.
Especially when coupled with
cloud native container orchestrators like Kubernetes,
which provide us with a consistent deployment framework,
access to cloud-first development paradigms
and efficient use of cloud resources.
With on-premises infrastructure,
we typically have to plan capacity
around known peaks in demand.
When demand exceeds capacity
you're left with service disruptions
because on-premises infrastructure
takes time to deploy and integrate
leaving it unable to react to changes in customer demand.
You may have to put up with decreased customer satisfaction
and lost business to keep cost in line.
A hybrid application deployed across Azure and Azure Stack
gives you the best of both worlds.
Using local infrastructure to handle normal traffic
and taking advantage of the public cloud
for instant scale when traffic spikes.
To show this in action we have a fictitious company,
Northwind Health Insurance.
They need to account for two types of spikes in demand.
They handle an expected increase in traffic in December
for health care enrollment.
But there's always unexpected peaks
in health insurance claims that are hard to predict
due to bad weather events or illness outbreaks
such as measles or the flu.
To better withstand unexpected claim events
we have migrated Northwind's claim management system
from an on-premises application to a hybrid application
that meets Northwind's corporate policies.
Here's a look at the application infrastructure.
You'll see that we've split the app
across Azure and Azure Stack and are running
the web layer on Kubernetes Clusters.
Automatic scale from Azure Stack to Azure
is made possible using Azure Traffic Manager,
Azure App Insights and an Azure Function.
We also have a hybrid network in place
using site-to-site VPN to keep data secure in transit.
Here you can see our application in Azure on the left
and in Azure Stack on the right.
In Azure, I've deployed my AKS Cluster, Traffic Manager,
Application Insights Workplace
and an Azure Container Registry
to store my container images.
I've also got a jumpbox to inspect resources
in the hybrid network.
In Azure Stack, I've deployed its SQL Server
to handle the data layer for this application
and to keep customer data on-premises.
I've also deployed a Kubernetes Cluster
using the Kubernetes marketplace item,
as well as a specially structured
Virtual Network to bridge the two clouds.
The Kubernetes marketplace item is available in preview
and is consistent with Kubernetes Clusters and Azure
since it's generated by the Azure Container Service Engine.
The resulting cluster will run
the same containers as AKS and Azure.
You can learn more about Kubernetes
on Azure Stack at the link shown.
Now using Application Insights' live metrics
with my claims management system
I can see app performance data across Azure and Azure Stack.
Application Insights is natively integrated
into my application through the .NET Core SDK.
We can see that traffic right now is low and pretty steady,
and I have three Kubernetes Pods running.
Two in Azure Stack and one in Azure.
Now, to test scaling from Azure Stack to Azure
here I have an application that will simulate
a large number of users attempting to file
a claim on Northwind's site.
Let's kick this off.
And in a few seconds you'll start to see traffic spike.
We'll return to this in a second to see the outcome.
In the meantime, let me explain what's going on
behind the scenes to make sure
all of these users can file their claims.
Applications Insights allows us to aggregate telemetry
from both on-premises and cloud-based infrastructure.
We can set up alerts for any number of metrics.
In this case, we're gonna use an alert
based on the number of requests per second
to determine when to scale to Azure.
The App Insights alert allows you to configure
a condition and an action group.
This particular action group uses an Azure function
to direct Azure Traffic Manager to route
new claim sessions to the Kubernetes Cluster in Azure.
We've managed to implement this functionality
with a minimum of code.
This Azure function uses an Azure service principle
to enable or disable the Azure Endpoint
based on the scale action chosen.
So let's switch back to see how our app is doing.
Back on the App Insights dashboard
you can see the majority of traffic
is being routed to the Azure Kubernetes Cluster.
Additional pods in Azure have been added
to support the increase in traffic.
In addition to adding pods
we can use the cluster auto scaler in Azure
to add or remove additional nodes
from the Azure Kubernetes Cluster, as needed.
You can learn more on how to enable this at the link shown.
This combination of App Insights telemetry,
Azure functions and Azure Traffic Manager,
as well as Kubernetes scaling,
allows our web application to handle all kinds
of changes in traffic patterns.
Now remember, to comply with Northwind's corporate policies
all of our customer data has to remain on-premises.
To allow the Azure Kubernetes Cluster
access to our database on Azure Stack
we've created a VPN tunnel between Azure and Azure Stack
and planned out our virtual networks so nothing overlaps.
To prove that data does indeed flow
to the on-premises SQL server
I'm gonna go to Northwind's website
that's running on the Azure instance and file a claim.
You can see the green bar that says,
this page is running in Azure.
This form's already been prefilled for me.
I'll go ahead and submit my claim.
I can see that my claim was submitted successfully,
and sure enough, I've been given a confirmation number.
To show you how my data is stored on-premises
I'm gonna go over to SQL server Management Studio
hosted in a jumpbox since my SQL server
isn't accessible outside of the hybrid virtual network.
We're connecting to the database server
with a locally routable IP address on-premises.
I'll write a query with recent claims.
My recently submitted claim is right on top.
Even though my claim was submitted
through the Azure portion of the application
I was able to securely route my data
to a SQL server on Azure Stack.
So what we saw was that Northwind was able to create
a new, hybrid application that was able to scale
across clouds while keeping their customer data
in their data center.
Through this process we were able to use
Azure Traffic Manager, Azure App Insights,
and Kubernetes to adapt to spikes in demand
all while keeping our data on-premises
to comply with corporate policies.
We were able to efficiently use our on-premises resources
and scale to Azure to meet customer demand.
To learn more about Azure Stack, AKS,
and your hybrid options check out the links shown.
Thanks for watching. (upbeat techno music)