When is it better to purchase an On-Demand Capacity Reservation for EC2 instances, rather than just run an on-demand EC2 instance?

0

Let's say that you want to ensure that a particular type of EC2 instance is available at a specific time to run some task. You can either 1) set up an On-Demand Capacity Reservation, or 2) start the instance and leave it running until you need it.

These options have many similarities, as far as I can tell from the documentation:

  • Both start billing for the instance type as soon as you start / reserve them, at the same rate
  • Both can potentially fail if there is not currently any capacity for that instance type at the time you start / reserve it
  • Both guarantee that the instance will be ready when you need it (assuming you can start it, see previous point)

The key difference is that for #1, you don't actually need to start the instance; it's already running, where for #2, you still need to start the instance at the point you want to start using it.

Am I missing something? In what scenario would it be preferable to purchase an on-demand capacity reservation vs starting an on-demand instance?

asked a month ago185 views
6 Answers
0

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.

profile picture
EXPERT
answered a month ago
0

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.

profile picture
EXPERT
shibata
answered a month ago
  • 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.

0

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

[3] Selecting cost effective capacity reservations for your business-critical workloads on Amazon EC2 | AWS Compute Blog

profile pictureAWS
answered a month ago
profile picture
EXPERT
reviewed a month ago
  • 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.

0

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

profile picture
EXPERT
answered a month ago
  • 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?

0

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.

AWS
motero
answered 17 days ago
  • 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.

0

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.

AWS
motero
answered 17 days ago
  • 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?

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions