Skip to content
Related Articles

Related Articles

Amazon Web Services – Introduction to EC2 Spot Instances

View Discussion
Improve Article
Save Article
Like Article
  • Last Updated : 16 Mar, 2022

In this article, we will look into the process of profiling your applications and workloads to confirm if they can take advantage of Amazon EC2 spot instances.

Spot instances are spare compute capacity available to you at steep discounts(often as much as 90% cheaper) compared to on-demand prices. The reason you need to qualify for the spot is that the spot is unused easy to capacity and spot instances can be interrupted by EC2 with a two-minute notification when EC2 needs that capacity back.

So while this doesn’t happen all that frequently you do need to be able to handle interruption in order to use the spot effectively. But before moving ahead, we should keep in mind the good practices of the cloud such as:

  1. Scalability
  2. Disposable resources
  3. Automation
  4. Loosely coupled applications
  5. No single point of failure  

If you’re in a great position to start using spot instances today but instead of diving into all of these cloud best practices let’s just answer one question “What would happen if a server was taken away?”

 If your job is time critical the instance must be automatically replaced without human intervention and it should be transparent to your users. That means if it’s big data batch processing or queue processing, the job should automatically restart on a different instance as soon as possible.

If it’s a website your users should be none the wiser. The load balancer automatically sends them to a different instance. 

If you aren’t architected for the cloud yet but have a time-insensitive workload you want to save up to 90% on well you’re in luck you can ask AWS to hibernate the instance. When AWS needs the capacity back and will hibernate your memory to disk and then it will start it up again when spot capacity is available just like shutting and reopening your laptop. 

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!