Welcome to Azure IaaS Day.
My name is Varun Shandilya.
I'm Principal Product Lead in Azure Compute.
I'm also joined by my colleague Rajeesh
who's Principal Program Manager in Azure,
and he will walk through some of the demos
for Spot VMs that we going to talk today.
We are really excited to talk to you
about how Spot VMs can help you to reduce costs
for your infrastructure.
Let's talk about what are Spot VMs.
Spot VMs use unused capacity for Azure,
which means if we have unused capacity,
Spot VMs can utilize that.
Because they are using unused capacity,
they are interruptible.
By interruptible what I mean is,
that they can be evicted at any given time,
either due to capacity reasons or price reasons.
For capacity, when Azure needs capacity back,
we will evict these Spot VMs,
we try very hard not to evict the Spot VMs,
but in certain cases, we would have too.
For price reasons, when the price for your Spot VMs
is lower than the Spot VM price,
that's when those VMs get evicted.
Because these VMs are evictable,
you get a deep discount of up to 90% over pay as you go.
This price can change by size or by region.
Let's look at some of the benefits for Spot VMs.
The prices for Spot VMs are capped,
which means that you never pay more than what you define.
If the Spot VM is priced at 50 cents,
you will be charged 50 cents,
even if you've defined the price as a dollar.
You can use all the existing deployment technologies
that Spot VMs have to offer.
So you have great flexibility
in how you deploy your Spot VMs.
You can use single VMs,
you can use VMSS or you can use AKS
as your deployment technology.
So you have variety of options
using which you can deploy that.
Spot VMs also offer great ways of saving cost,
in addition to the 90% discount you gain.
If your workload uses windows,
you can use unique Azure pricing
for deploying your Spot VMs
to save even more.
Let's get into some of the common use cases
that customers use on Spot VMs.
And some of the use cases
that we see developing in the market.
Spot VMs is interruptible,
so it fits very well for the workload
which can get interrupted and still be successful.
Some of the examples being batch processing,
where you can check point your workload
and then restart when VM comes back.
High performance computing,
video and visual rendering,
large scale data processing.
Let's talk about large scale data processing for a minute.
With large scale data processing,
generally customers have head nodes
and they have worker nodes.
Worker nodes are the scale units
and they can come and go.
So customers deploy Spot VMs for the worker nodes,
where if one worker node goes away,
it can still be successful,
and then they can add more capacity
and still reach the end of the workload
or successfully finish the job.
We've also seen customers take advantage
of Spot VMs in dev test and CI/CD
where you want to have a test case
that you want to run, and that is a short test case
and then you can use Spot VMs to run that,
and also scales.
The other interesting one is Large-scale stateless services.
We've seen a lot of customers use Spot VMs
and burst their capacity where they need scale out
and they scale out using Spot VMs opportunistically.
Customers use on demand VMs in conjunction
to Spot VMs so that they have availability
and they can save costs by bursting on Spot VMs.
This gives best of both worlds to customers.
Now let's look at some of the new features
and functionality that we're adding to Spot VMs
to give you better confidence in deployment.
The big factor that we've seen customers use
when they deploy or choose a Spot VM is price.
And how often do they get evicted?
As I said, price varies by size
and by the region.
So you could have same size in region A,
price differently than same size in region B.
So if you have region flexibility,
you can go to different regions.
We've also seen customers use different sizes
in the same region,
because they can not change the region.
So they are flexible on with size they don't want to use.
And looking at the price,
it gives you a better understanding
of which size fits better.
The Azure portal,
now you can look at the price history
and trends for Spot VMs.
Another big factor is evictions.
Customers want to know how often do my VM get evicted,
or how often does a particular size get evicted?
And if they have size flexibility,
they can choose a different size.
I'm happy to say that both of these features of price
and eviction history are available in Azure portal in GA.
Now let's look at how are we reducing operational overhead?
As you can imagine,
if a VM is coming in and VM is getting evicted,
it puts a lot of pressure on your workload
and puts a lot of pressure on your infrastructure
to maintain capacity.
We're introducing two new features
called, Simulate eviction API,
and Try and Restore to help with that.
With Simulate eviction API,
you can better prepare your application to handle evictions.
This API will help simulate an eviction.
So as you're developing your workload to be evictable,
or to handle evictions,
you can use this API and put code in place
to handle them gracefully,
So that it don't have to learn in production
and then fix it.
This is a great feature available in GA
and other great feature that we're introducing
is trying and restore for Spot VMS.
Try and Restore for Spot VMs always looks for the capacity
that you have in your scale set or VMSs.
And as it notices evictions for Spot VMs,
it will use ML models to try and restore Spot VM
back for you, without you doing any manual effort.
This is a great feature where,
it can automatically rebuild your capacity without
any operational overhead from your side.
These features help you to create your applications
such that they can gracefully handle evictions.
These features also help you to maintain capacity
in production or as your workload runs.
So you don't have to pay a lot of attention
and reduce your overhead cost.
Now let's dive into a demo where Rajeesh will show you
how easy it is for you to deploy Spot VMs,
how to find price,
look at eviction rates,
and also how to try and restore your Spot VMs
and how you can build your applications using
the eviction API.
Over to you to Rajeesh.
Thank you, Varun.
Well, this is fantastic, right?
To learn about Azure Spot virtual machines by default
helps us to optimize for cost
and reduces our cloud spending.
I'm Rajeesh Ramachandran,
Principal Product Manager,
on the Azure Compute Infrastructure team.
For the next few minutes,
I'm going to give you a demo on how to deploy
Azure Spot virtual machines,
and some of the key highlights that Varun was talking about.
So let's get started.
For the demo, I'm going to try deploying
Spot virtual machines using
virtual machines scale set.
In the interest of time, I have already filled out
the required details to create a virtual machine scale set.
Now let's go and configure Spot virtual machines
by enabling Azure Spot instances.
And when I do so,
we will notice two additional properties showing up;
eviction type and eviction policy.
Again, eviction type gives us two more options,
capacity only and price or capacity.
With option 1,
capacity only are Spot virtual machines
will only be evicted if Azure decides to reclaim
the capacity for a payer's go customer.
With option 2, price or capacity,
we will have another property in which we can specify
the maximum price you are willing to pay in US dollars.
In this scenario, our Spot Virtual machine will be evicted
only if the current Spot price as increased
and as higher than the maximum price we are willing to pay.
Or if Azure wants to reclaim the capacity back to fulfill
the request of a payer's go customer.
For the demo, I'm going to select the eviction type
as capacity only.
The next step is to set up the eviction policy.
And again, we will have a couple of options to choose,
stop, de allocate and delete.
With stop de allocate option, we will be able to stop
and de allocate our Spot Virtual machines.
All our existing resources like disc,
storage and the re-emitted data will not be deleted.
With the delete option, we will be deleting
our Spot Virtual machine,
this includes all the metadata stored,
and the other resources attached to the rear.
For the demo, I'm going to select stop de allocate.
I'm also going to enable the new feature.
We recently announced as generally available,
which is tried to restore instances.
This feature will allow me to automatically restore
the Spot VM if evicted,
with a maximum time to restore set as 60 minutes.
The goal is to have the restored Spot virtual machine
to run for a longer duration,
but lower probability of a repeated eviction.
Do remember enabling this feature will automatically set
your scaling policy to manual by default.
You will notice this when we move on to the scaling tab.
Now let's go ahead and select the Spot reemphasize.
You will have the option to select the VM size here,
but you can also do and view all the different sizes.
I am going to click select size and you will see
the lot more details about eviction rates
across different sizes,
along with the Spot Virtual machine price
and the discounts being offered.
I'm going back to my basic tab.
And now I'm going to click on compare prices
in nearby regions,
which will show the Spot pricing history
for the last three months in a separate blade,
along with eviction rates for the selected Spot VM.
You can compare the prices and the eviction rates
across nearby two regions,
to help you choose the best region.
The information can also be viewed
in a table format as well.
Now, let me move on to the scaling tab.
In this tab,
you will be able to set the initial instance count
that you may need while creating your
Spot virtual machine scale set request.
I'm going to set the initial instance count to six.
And like I said earlier,
that scaling policy is disabled because we enable
the try to restore function.
Now that we have set up all the configurations required
for Spot virtual machine,
let's go and click review and create.
This would go through a validation check before it attempts
to create and deploy the Spot Virtual machine scale set.
You can see the request is now being validated
and we will soon return success.
Now let's go and click create.
You will see the deployment is now in progress.
Now that our deployment is complete,
let's switch to the manage experience view.
In the manage experience view,
you will be able to find more details about the Spot virtual
machine scale set that just got created and deployed
successfully, like the Spot virtual machine scale set name,
the resource group that we used for creating the scale set,
the status of all the six spot instances
that we requested to be deployed.
The region, the size of the virtual machine
and the Spot configuration details.
As we move on to Spot specific details,
you will see your configuration details like Azure Spot
is enabled the eviction type of set to capacity.
The Spot eviction policy is set to stop de allocate.
And the try to restore is set to 60 minutes.
Now that we verified all the details about our Spot virtual
machine scale set,
let's go on to the instance view tab
and see if the instances are running up.
Well, we see all the six instances running,
so they are all up and running.
Now that we have the scale set created,
let's use Simulate eviction API to evict
a running Spot virtual machine,
and check out how try to restore function helps restore
the evicted Spot, which Virtual machine.
I'm, now going to switch my window
to show a demo on how we can simulate eviction
using the Stimulate eviction API.
I'm going to key in the details required to stimulate
the eviction, like the instance ID,
the name of the resource group,
the subscription ID and the Spot virtual machines scale set.
This will be all enough to simulate an eviction.
I will go and click run.
We should see the response code as 204.
This indicates the eviction was successful.
Let's move on to our manage experience view
and see what's happening to the instances.
As I click on the instant step.
I still see the Spot instances running.
That's fine. Let me click refresh and see what happens.
Now we see the instance ID five in stopped state.
This shows that we have successfully evicted
the instance ID 5.
Now that we have evicted the instance ID 5,
let's go and evict instance ID 4.
And see if both of these instances are restored successfully
by the tried to restore feature.
So I'm going to switch the window again to change
the instance ID from 5 to 4 and run Stimulate eviction API.
When I run it, I get 204,
which does indicate that the eviction was successful.
I'm going to move on to the manage experience view,
and click on refresh to see if the instance has stopped.
You will see here
the instance ID 4 has successfully stopped.
Now that we have two instances evicted.
Let's wait to see if try to restore is going to help
restore the instance ID 4 and instance ID 5 successfully.
It might take a little while for the restoration to happen,
but we should see that happening momentarily.
As we continue to monitor the status of the virtual machine
that are running, we noticed that the instance ID 5,
which wasn't stopped de allocate state
is back up and running right now.
This indicates that the tried to restore feature
has successfully restored the evicted VM,
which was instance ID 5 and was able to bring it
back up and running.
Now that we are waiting for the instance ID 4,
we should see that happening momentarily.
Let's wait and watch.
As we can see the instance ID 4 is up and running
now, this indicates that the tried to restore function
once again, was able to restore the evicted VM.
With all that, I wanted to hand it back to Varun.
Thank you.
Thank you to Rajeesh for a great demo.
Now let's look at some of the resources that you can use
to learn more about Spot VMs.
These are resources that you can use to get started,
or you can use these resources to further enhance
your infrastructure.
We want to thank you for taking the time to attend
the session and learn about Spot VMs.
We are really excited to see what you will build
with Spot VMs and how you can save more cost.