One of the most frequently asked questions we see in the AWS forums where we interact is: What are the key factors to consider while choosing AWS RIs (Reserved Instances) over on-demand resources. In this blog post, we’ve tried addressing that. Read on.
Ground Reality of On-Demand Computing
For most AWS users, especially those who are new to it, on-demand resource availability is crucial. Pay-as-you-go is a defining feature of the AWS public cloud. While on-demand resource allocation looks optimal in theory, top management in every organization immediately “gets” the benefits of transitioning to a cloud platform as the company will pay only for actual resources usage.
However, the cost element of even a mid-sized applications in the cloud can become very high when the cloud architect allocates resources that have to meet the non-functional requirements like scalability, resiliency, performance, fault tolerance, highly available, security, etc. As the quantum of cloud resources increase from low to medium and finally to large-scale deployment, the consolidated bill for the entire infrastructure can catch everyone by surprise in the organisation.
Reserved Instances (RIs) — An Alternate Pricing Model
AWS allows you to commit for certain cloud resources in advance and provides the resources at discounted usage pricing if organizations also pay for the RIs in advance. The RIs can be reserved for 1 or 3 years at a substantial discount of up to 75 percent in comparison with on-demand instance pricing. If the RIs (called Scheduled Reserved Instances) are agreed to be launched only on some pre-scheduled time windows, there are further discounts that could be availed. In addition to the above-mentioned usage-based optimization models, there are further discounts based on various payment models, namely All Upfront, Partial Upfront, and No Upfront. The All Upfront model gives the highest discount and the partial upfront model provides a lesser discount, while no upfront model provides a very little discount, which would be only slightly more economical than on-demand instance pricing.
In addition to the RI model, AWS provides Spot Instances that often cost 10 percent to 15 percent of the cost of on-demand instance equivalents. But these are appropriate for batch jobs or time-insensitive workloads. It is interesting to note that RIs aren’t limited to EC2; they’re also available for databases (e.g. RDS, DynamoDB, ElastiCache) and CloudFront.
Tradeoff Factors that Influence Cost Savings on AWS
The AWS pricing model adds a new cost dimension for cloud solution architects. Ideally, a cloud architect must not only create a right technology architecture by picking up the right hardware and software components for the solution but also a cost model where resources have to be assigned with specifications at specified time.
Hence, identifying cost model for the resource type that can either be on-demand, RI and Spot Instance should be part a cloud solution architect’s document. The architect has to keep in mind the following factors while arriving at the final solution:
1) Execution Time: Schedule of an application will be the foremost factor in the instance model to be selected. If an application runs 24 x7, then the resource instance for the application has to be RI. However, an application needs to be running only during specific periods then a scheduled Reserved Instance or Spot Buying can be leveraged.
2) Application Components: The application architecture will always include app servers, database servers, cache tier etc. The architect can more specifically set the Reserved Instance model for each application component. For example, the architect can specify the number of database instances that could be bought on an RI model instead of the only EC2.
3) Application Traffic and Usage Pattern: The Cloud Architect should also consider how the application is consumed by its end users through period usage logs analysis. If the application requires high scalability only for a specific month or a quarter or certain hours during the day, the resource instance can be planned accordingly by leveraging models like auto-scaling options instead of having a single sized resource instance throughout the year.
4) Production vs. Non-Production: For the resources that are to be used for production will typically be “On” 24×7 RIs. These are one of the best options. But other resources like testing, scheduled or on-demand resources can as well give reasonable cost savings.
5) Right Resource Sizing: AWS will trigger the RI pricing model only when the requested resource’s specification to be deployed meets specifications of resources in the RI pool. Hence, the architect should also consider the right configuration (Instance type, instance family) for each resource and also consider whether clubbing requirements for two or three resources of smaller configuration can be met by a resource of a single higher configuration. Such pragmatic resource sizing can help gain significant cost benefits.
The Bottom Line
Ultimately, reserving AWS resources for cost savings is an art. And choosing AWS RIs over on-demand resources needs calculated moves.
So, how are you reserving the EC2 instances? What are the factors you consider before reserving them? Tweet to us @BotmetricHQ or drop in a message to us on Facebook. Some of our clients count on our AWS RI Planner to experience data-driven intelligent approach towards resource reservation on AWS. Do you wanna try too? Sign-up for a 14-day trial.