Amazon Elastic Compute Cloud instances can run in three ways: On-Demand, Reserved and Spot Instances. Knowing which...
compute option is the best fit for your enterprise can reduce EC2 instance costs and improve workload efficiency.
On-Demand Instances are the default Elastic Compute Cloud (EC2) instances, and are best suited for scaling out services. This type is the most expensive version of an instance, but it's suitable for an enterprise that needs reliable compute power quickly or in large quantities. When setting up Auto Scaling groups, developers most likely end up using some On-Demand Instances.
Reserved Instances (RIs) are the second most popular EC2 instance run types. Reserved Instances are actually just On-Demand Instances that developers need over longer terms; RIs are available in both one- and three-year terms. A good method to reduce EC2 instance costs is to determine how many servers of each instance class a developer uses all the time -- and then buy those as Reserved Instances. With RIs, IT teams pay for that instance run time, even if the instance isn't running, so unused Reserved Instances are still charged hourly. So only buy Reserved Instances for servers you're certain you need.
Reserved Instances come in three payment types: all upfront, partial upfront and no upfront. With the no upfront model, IT teams can easily reduce EC2 instance costs by promising to pay for a specified period of time, but this also offers the least savings. Paying all upfront allows IT teams to buy the instance all at one time and not pay for the run time. The partial upfront model splits the difference -- IT teams pay a reduced hourly price -- even if the instance isn't running -- for the entire term.
Although the three-year variety of Reserved Instances has a significant benefit with EC2 instance costs over the one-year term variety, Reserved Instances aren't recommended over a three-year term. At the end of one year, enterprises should switch to a new, upgraded instance class.
Spot Instances are a good choice for batch processing that doesn't need to be real time and for a job that developers want to process without a specific deadline. With Spot Instances, IT teams specify how much they are willing to pay for a particular instance class, and if that price is lower than competitors in the Spot Instance market and there is extra capacity available, they "win" the instance.
See what you know about AWS IaaS
Amazon Web Services continues to grow rapidly, and it's easy to confuse its many offerings. Test your AWS IaaS knowledge in this 10-question quiz.
However, Spot Instances are a poor fit for anything that requires constant uptime, so they're not recommended for web servers. To get around the fact that Spot Instances will terminate, some developers will put a huge upper limit on the price they would pay. But this is also not recommended, and it's not a guarantee that the server won't stop running. Never put in more than the On-Demand price for the upper limit on a Spot Instance; if the server needs to remain up, use an On-Demand or a Reserved Instance.
Spot Instances also operate differently than On-Demand and Reserved Instances. Spot Instances require a separate request on a console, where a developer specifies a price and duration of the request. This is ideal in a batch situation, when requests are queued. Enterprise IT can persist the request until the entire batch job is completed and then cancel Spot Instances requests.
The key when choosing the best AWS EC2 instances is to monitor workloads and evaluate resources on a regular basis. Move items that are not time sensitive to Spot Instances, and purchase Reserved Instances for servers that will run nonstop.
Find the right instance for your workload
Consider your EC2 instance options
X1, T2 instances provide different capabilities