- Newest
- Most votes
- Most comments
Its more cost effective to use On-Demand instances or even SPOT if you can if your workloads run for 14 hours or less every day 7 days a week. Your alternative is to look at using ECS tasks which you can start on a schedule and they get terminated once finished.
Purchase reservations or savings plans if your instances are running 14 hours or more.
I believe there are advantages to using on-demand capacity reservations in the following situations.
If I have EC2s running that I don't need, I will need to maintain them. But I don't want to maintain instances I don't need, so it would be convenient if I could reserve capacity only.
I'm not sure exactly what you mean by "maintain." Do you mean like running OS patches? You'd have to do that no matter what.
Oops, my bad. I meant to write "maintenance". But, it would be more accurate to say that I don't want to manage it.
It includes patching the OS. This task must be done and can be automated using Systems Manager and similar tools. But I don't want to manage servers I don't need right now as much as possible.
You've summarized the key differences between On-Demand Capacity Reservations and On-Demand instances correctly. Here are a few additional points on when each option may be preferable: [1]
- Capacity Reservations guarantee capacity will be available for your specific instance type, even during high demand periods when spot pricing may be elevated or On-Demand capacity constrained. This provides more assurance your workload can run as planned. [2]
- Reservations are useful if you need capacity 24/7 for a workload but the actual compute usage varies. The instance isn't running idle when not in use, saving costs compared to leaving an On-Demand instance running.
- On-Demand instances make more sense for spiky, unpredictable workloads since you only pay for actual usage and don't have to maintain a standing reservation. [3]
- If you need capacity for longer durations (1-3 years), Regional Reserved Instances may be more cost effective than either option due to long-term discounts.
So in summary, Reservations provide better availability guarantees for steady workloads, while On-Demand works better for unpredictable or short-term needs. Regional Reserved Instances can reduce costs for long-term, stable capacity requirements.
Sources:
[1] What is the difference between Amazon On demand & On demand Capacity reservation EC2 instances
[2] On-Demand Capacity Reservations - Amazon Elastic Compute Cloud
Capacity Reservations guarantee capacity will be available for your specific instance type, even during high demand periods when spot pricing may be elevated or On-Demand capacity constrained. This provides more assurance your workload can run as planned. [2]
I agree with you that reserving capacity in advance gives you more likelihood of getting the instance type you need, when you need it, compared with waiting until you need it and then starting an on-demand instance. But the same would be true if you started the on-demand instance in advance. Once it's running, it's going to stay running, giving you the same guarantee as reserving capacity.
Reservations are useful if you need capacity 24/7 for a workload but the actual compute usage varies. The instance isn't running idle when not in use, saving costs compared to leaving an On-Demand instance running.
Are you certain that's true? This sentence in the docs makes it sound like you pay for the reserved capacity, whether it's actually running or not: "The capacity becomes available and billing starts as soon as the Capacity Reservation is provisioned in your account". I don't see how it reduces costs to have reserved capacity that is available 100% of the time and used 30% of the time, vs. just having an on-demand instance that is available 100% of the time and used 30% of the time, because in both cases you're being billed for 100% of the time. Please tell me if I'm understanding this incorrectly.
Hello.
If you set up on-demand capacity reservations before the "Insufficient Capacity" error occurs, you can start instances even when there is insufficient capacity.
However, you cannot set an on-demand capacity reservation when an "Insufficient Capacity" error is already occurring.
There are benefits under the circumstances described in the document below.
https://repost.aws/knowledge-center/ec2-auto-scaling-launch-error-capacity
However, you cannot set an on-demand capacity reservation when an "Insufficient Capacity" error is already occurring.
So in both cases, reserved capacity and on-demand, you can start / reserve them if there is sufficient capacity, and you cannot start / reserve them if there is insufficient capacity.
If I want to make sure my instance is available next week, but I can't start an on-demand instance and I also can't reserve capacity because capacity is currently insufficient, then I'm not getting my instance.
What's the difference?
On-Demand Capacity Reservations is a choice (not a must) that could help to improve a customer's experience for certain use-cases like mission-critical workload that requires guaranteed access to a consistent number of EC2 instances, even during periods of high demand or for business continuity scenarios where you need your instances to be launched in a specific Availability Zone or region. This option comes at a cost and undoes some of the advantages of running on AWS cloud, such as elasticity. However, You can also use the billing discounts offered by Savings Plans and Regional Reserved Instances to reduce the cost of an On-Demand Capacity Reservation.
If your workload is highly variable or unpredictable, or if you only need instances for a short period, running On-Demand instances without reservations might be a better choice, as you can avoid upfront commitments and pay only for what you use.
Savings plans apply to on-demand instances, too. So if I ran an on-demand instance with a savings plan, my cost would be identical to a capacity reservation. I don't see why somebody would choose to use a capacity reservation instead of running an on-demand instance.
jesse360,
Thanks for your inputs. On-Demand Capacity reservations (ODCRs) do not include any savings by default. You pay On-demand price regardless of using (launching) the instances or not. Yes, if you apply Savings plans or Reserved Instances to either on-demand or ODCRs you will reduce your run rate cost. The main reason to select ODCR is for use-cases where your workload needs the assurance that if the OD demand capacity for that instance type increases, you have the instance(s) assigned to your account. Some examples would be critical production systems like SAP that normally uses specialized instances types. OD is definitely a good option for capacity. Although, I would challenge you to think about using Spot instances.
This is going in circles.
The main reason to select ODCR is for use-cases where your workload needs the assurance that if the OD demand capacity for that instance type increases, you have the instance(s) assigned to your account.
You can achieve the same thing by starting an on-demand instance, instead of purchasing an on-demand capacity reservation. What, if any, are the advantages of purchasing an ODCR vs. starting an on-demand instance and leaving it running until you need it?
Relevant content
- Accepted Answerasked 5 years ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated 4 years ago
- AWS OFFICIALUpdated 2 years ago
- AWS OFFICIALUpdated 2 years ago
Can you explain the logic behind the 14 hour per day threshold? The docs at https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/capacity-reservations-pricing-billing.html#capacity-reservations-pricing state that "Capacity Reservations are charged at the equivalent On-Demand rate whether you run instances in reserved capacity or not"
This doesnt including purchasing capacity reservations.
Can you provide any detail? It seems like you're telling me that the AWS docs are wrong.