More and more businesses are moving to the cloud. By one estimate, 90% of businesses will make a decision to migrate to the cloud. Amazon AWS is a shining light amongst all the Public Cloud stars out there. A new class of businesses (such as Ad tech, Gaming, Data Science companies) require the massive amount of compute resources, often spending almost 10%-20% on the infrastructure cost alone. This cost becomes prohibitive in launching new features that require a lot of data analysis, handling a lot of incoming requests, etc. Companies now can save massive costs (often more than 80%) on public clouds such as Amazon AWS, Google Cloud Platform. In respect of this, let us know more about the types of instances Amazon AWS provides.
There are 3 types of instances available in AWS.
1. On Demand:
An EC2 instance is billed at an hourly rate depending on the instance type and the region by default. This pricing model is called on-demand. It is the simplest but also most expensive way of using EC2 instances.
2. Reserved Instances:
To simply put, Reserved Instances is just a billing thing. You’re agreeing to pay a non-refundable fee in exchange for a discounted price to run that instance for a year. These instances are no different than On-Demand Instances except that AWS offers a discount if you pay upfront for a timeframe (generally 1 year to 3 years). It is a good strategy for companies to go for reserved instances if they know that they will be needing certain compute capacity in particular availability region. The biggest downside is that you must lock in the region, instance sizes, and also platform (RHEL, Windows, generic Linux, etc.). We have observed that many times the instance sizing and estimation gets wrong but you can’t do much as you already have bought reserved instances. That’s why it makes sense to estimate the compute capacity that you would be needing properly.
To overcome these challenges, AWS recently (In Sep 2016) announced another class of Reserved Instances called Convertible Reserved Instances. Convertible RIs provide customers with additional RI flexibility at a lesser discount and higher lock-in term of 3 years when compared with Standard RIs. With Convertible RIs, customers now have the option at any time to change the instance family, OS, or tenancy associated with their RI. Via the EC2 Console or APIs, customers simply indicate what change they want to make, and the change is made if the exchange is for an equal or greater spend on the new Convertible RIs. The significant downside is that you will be locking in for at least 3 years.
3. Spot Instances
Infrastructure providers like AWS are running at large scale. This also implies spare capacity at scale. Infrastructure providers try to avoid spare capacity and usage fluctuations. Therefore, electric power providers offer cheaper rates during the nights and why AWS offers the ability to bid on the unused computing capacity. A spot market is a market where EC2 instances are traded for immediate delivery. The price of the products on the market depends on supply and demand. The advantage of the Spot instance is that those are offered at much lower prices (almost at a 90% discount). Oh, then where is the catch?
If the current spot price is lower than your maximum price, your spot request will be fulfilled, and an EC2 instance will be launched. If the current spot price exceeds your bid, AWS will issue a termination notice for 2 minutes and your instance will be terminated (not stopped) automatically after that termination window. This termination window of 2 minutes is a real catch.
Solution that CloudOptimo provides
AWS Spot instances provide maximum savings but it still requires considerable knowledge and efforts to make it work. CloudOptimo makes it easy to launch your first autoscaling OptimoGroup using Spot instances without having to worry. Other available solutions such as AWS Spot fleet or Spot Blocks cannot be relied upon for high availability of your services using Spots as you run the risk of being outbid (in case of Spot Fleet) or out of time (in case of Spot Blocks). CloudOptimo provides ML-driven Instance Termination Prediction Engine that allows us to detect which spots might be at risk of being terminated and migrates them. The bids are also adjusted automatically to ensure high availability. In case the Spot Instance terminates automatically, CloudOptimo ensures that the cluster size is maintained as desired. To increase stability factor, you can take a hybrid approach wherein you can define a certain percentage of instances to be On-Demand Instances.