Tutorial Highlights & Transcript
00:00 - Introduction
01:03 - Compute Options on AWS
02:00 - What is a Spot Instance?
02:36 - Why Spot?
03:40 - What’s the catch?
04:32 - What can we use Spot Instances for?
06:32 - Demo - Spot Instance Console
Alright, so I got to two instances that I want to check. Let’s load the placement scores. In these two instances, you get a chance to do one to 10. If I make some changes, now I can see that I have a likely score and that my instances are likely to be successful. Not a lot, but it’s still better than on the lower end, but there’s still a chance that my instances will be requested and I can get these two instances. There’s also a Spot blueprint section that they’ve added recently and these are just quick and easy templates based on Terraform or CloudFormation that you can use to set up a Spot instance requirement pretty easily. You can use the EC2 Auto Scaling group and it will give you templates to download like Terraform template or CloudFormation that uses the default, a Spot, and EC2 instance a combination to provide this. This is pretty neat and you can also create your own blueprints that if you want, you can go and use in the future. Here, you go back and if you want to create a Spot instance, you just click Request Spot Instances. And it will take you to this panel where you can give some parameters for the launch. Here you have a couple of different options. You can select one or two instances and set the maximum costs for a Spot instance. Here, you can set in pricing that you see fit. You can go with the average price for the past week, or you can play smart and use a much larger price than hits down on your savings but ensures that your instances most likely won’t go away or get reclaimed. Here’s one thing that you can set. You can click this and it gives you a lot of different options, which is something that is new. You have interruption behavior and give you three options. You can either have AWS terminate your instances, which was how it was done in legacy and default. You can actually have AWS stop these instances. You can have some automation script set up in the back where Lambda can pull the Spot price. If the instances are now available, again, you can start them up. You can also hibernate them, which is an AWS EC2 option where in hibernation EC2 actually saves all the operations that are being done in memory, and it shuts down. When it is brought back up, it has all those operations. It acts like the instance didn’t terminate, it can revert back to the work that is doing. These are a couple of different options. Also, capacity rebalance is also a new feature. This gives you a couple of ways to decide how AWS will rebalance the EC2 instances. There are two options. Launch only. When AWS gives that two-minute warning that an instance might be reclaimed, it will launch a new instance of the replacement but will not terminate the instance that receives the AWS recommendation. Now, either the AWS instance that got the two-minute warning gets reclaimed by AWS or it does not. Essentially, you create a high availability backup solution for your loss. For instance, where you bring up a replacement and have the option that the original instance may or may not go down. The second one is launched before termination, where you essentially say that if an instance gets a reclaim signal from AWS, it will launch a replacement. Once the new instance comes up, it will terminate the original one. These are a couple of different ways that AWS has provided a lot more value on Spot Instances, how you can decide. That gives Spot Instances a lot more credibility in being actually useful in a lot of working environments. For the capacity fleet that I requested, which is two target instances,I have a strong option to get these instances and the estimated hourly price for these two is $0.067, which is on default, like a 72% savings, which is incredible. We all know that this is possible for Spot Instances, but due to the new features that AWS has provided with Spot, as well as some improvements on how Spots were reclaimed. This is now a much better approach to actually being used with development and product testing workloads, and also in a combination with on-demand on a lot of different container iced options in production environments, as well. I think these Spot Instances are pretty underrated. With some clever engineering, you can potentially bring down your AWS cost by half. At least in the couple of POCs that I’ve done on my own projects, and with some clients in the early phases of the testing, we can definitely see savings of 40-50% just by making some smart changes to their dev and staging environment. So yep, pretty excited about Spot Instances. I’m using them now in my own development POCs and I hope you guys also do some testing on it, see how you can utilize it, and use it going forward.
Senior Solutions Architect
Saad joined nClouds in 2018 as a Senior Solutions Architect. He holds several AWS Certifications including Big Data - Specialty, Solution Architect - Associate, Developer - Associate, and Cloud Practitioner.