I would like to know if it would possible to create an architecture with both reserved instance (RI) and auto-scaling group to serve web pages. The idea would be to have one RI serving 24/7 and launching on demand instances in an auto-scaling group when the CPU of the RI reach a threshold. The goal is to have a predictable cost (RI) and scale out solution with auto-scaling. Does it make sens ? Is it Possible ?
Thank you !
You can launch and automatically scale a fleet of On-Demand Instances and Spot Instances within a single Auto Scaling group. In addition to receiving discounts for using Spot Instances, you can use Reserved Instances or a Savings Plan to receive discounted rates of the regular On-Demand Instance pricing.
To attach an instance to an existing Auto Scaling group (Optional) On the navigation pane, under Auto Scaling, choose Auto Scaling Groups. Select the Auto Scaling group and verify that the maximum size of the Auto Scaling group is large enough that you can add another instance.
An Auto Scaling group can launch On-Demand Instances, Spot Instances, or both.
ECS and EKS – If you are running Amazon Elastic Container Service (Amazon ECS) or Amazon Elastic Kubernetes Service (Amazon EKS) on a cluster that makes use of an Auto Scaling Group, you can update the group to make use of multiple instance types and purchase options.
A Reserved Instance on AWS is a billing concept and does not apply to a specific Amazon EC2 instance.
Each hour, the AWS billing system looks at all EC2 instances that have been running in a particular AWS account. It then compares them with any Reserved Instances that have been purchased. It compares the following attributes:
For each EC2 instance that matches a Reserved Instance, no cost applies. This is because the cost has already been paid as part of the Reserved Instance purchase.
The Reserved Instance applies regardless of whether the instance was launched through Auto Scaling.
Therefore, if you have purchased one Reserved Instance and your Auto Scaling group launches instances that match the Reserved Instance (Type, OS, AZ), then one of the instances in your Auto Scaling group will be "free" (or rather, pre-paid) each hour.
If your Auto Scaling group has a minimum of 1 and a maximum of 4, then there will always be at least one EC2 instance running, so you would receive the benefit of the Reserved Instance. Any instances above 1 will be charged normally. It is recommend that you use Reserved Instances for any instance that will be running continuously.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With