top of page
Writer's pictureKhursheed Hassan

Get Smart about Cost versus Availability Tradeoff in Cloud



Capacity reservations, On-demand instances, and Spot instances (virtual machines) are three pricing models offered by cloud service providers like Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform. There is a simple but important cost versus availability tradeoff between them. Capacity reservations provides the highest availability but are expensive to use as the customer must pay clocking hours irrespective of usage. At the end other are the Spot instances, which are cheapest, as low as 50-90% totally depending on the fluctuations of excess compute within the cloud provider data centers. The drawback of Spot is the often times low availability with the additional restriction of performing eviction within 30 seconds (Google) to 2 minutes (AWS) of notice. The reality is that for any heavy in-use instance type, users neither get the lowest advertised spot price nor a satisfactory availability experience. In between them is the most commonly used On-demand instance usage model. It is the poster child of cloud elasticity (albeit flawed one, see this post on capacity errors). Here's a brief overview of how to think the tradeoffs between them :


Capacity Reservations:

  • Capacity reservations allow users to reserve capacity for specific instance types in advance, ensuring that the desired compute capacity is always available when needed.

  • With capacity reservations, users commit to a specified amount of compute capacity for a defined duration. If the user has discounts these can be applied to the capacity reservations billing (eg. RI or savings plan from AWS).

  • Capacity reservations provide highest availability, predictability and assurance of resources, making them suitable for applications with steady-state workloads or long-term commitments.

  • Applications that have large peak to trough compute variability should avoid Capacity Reservations due to the cost incurred during sub-optimal usage.

  • It makes sense to protect scaling and migration by reserving capacity in advance. Users can be assured that their applications and services have access to the necessary compute resources without the risk of potential interruptions or price fluctuations.

On-Demand Instances:

  • On-demand instances are virtual servers that you can provision and use immediately without any long-term commitments.

  • With on-demand instances, you pay for compute capacity by the hour or by the second, depending on the cloud provider, with no upfront payments or long-term contracts.

  • On-demand instances offer medium availability and reliability. Users can suffer from insufficient capacity when requesting capacity during peak hours or when underlying capacity has fallen (eg. due to hardware defects or supply chain constraints) to even meet regular expected demand.

  • These instances are ideal for workloads with unpredictable usage patterns or short-term needs, as they offer flexibility and scalability without any upfront investment.


Spot Instances:

  • Spot instances are spare compute capacity offered by cloud providers at significantly reduced prices compared to on-demand instances.

  • The pricing for spot instances fluctuates based on supply and demand in the cloud provider's data centers, and users bid for available capacity.

  • Spot instances provide cost savings but come with the risk of potential interruptions, as they can be terminated by the cloud provider with short notice if the capacity needs to be reclaimed for on-demand or reserved instances.

  • Application needs to be designed to handle instance terminations gracefully.


In summary, on-demand instances offer immediate access to compute resources with good availability, spot instances provide cost savings but experience interruptions, and capacity reservations offer highest assurance of resource availability for steady-state workloads . If users have mission critical workloads that require strict RTO, thus high availability then consider Capacity reservations over other two usage models.

46 views0 comments

Recent Posts

See All

Comments

Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page