Skip to content
tezvyn:
Menu

Cloud Pricing: On-Demand, Reserved, and Spot Instances

Source: Wikipedia: Cloud computingEasyHow cards are made

Cloud Pricing: On-Demand, Reserved, and Spot Instances

Cloud pricing is like booking a flight. Pay full price for flexibility (On-Demand), get a discount for committing (Reserved), or bid on empty seats for a huge discount but risk getting bumped (Spot). This choice dictates your infrastructure cost.

Why it exists

Cloud providers have massive data centers with fluctuating demand. Pricing models help them sell excess capacity and allow users to optimize costs based on their workload's needs. This strategy lets providers monetize idle hardware while giving customers financial incentives to commit to long-term usage.

The mental model

Think of it like airline tickets. On-Demand is a last-minute, full-price ticket with maximum flexibility. Reserved Instances are like buying a non-refundable ticket months in advance for a steep discount. Spot Instances are like flying standby; you get an incredible price but risk getting bumped if a full-fare passenger needs your seat.

How it works

The three main models are On-Demand, Reserved, and Spot. First, On-Demand lets you pay by the hour or second with no commitment, offering the most flexibility at the highest price. Second, Reserved Instances (RIs) or Savings Plans give you a large discount (up to 75%) in exchange for a 1 or 3-year commitment to a certain level of usage. Third, Spot Instances let you bid on spare compute capacity for up to 90% off, but the provider can reclaim them with only a short warning, typically two minutes.

When to use it

Use On-Demand for development, testing, and unpredictable, spiky workloads. Use Reserved Instances for your stable, predictable production workloads like databases and core application servers. Use Spot Instances for fault-tolerant, stateless tasks like batch processing, data analysis, or CI/CD jobs that can handle interruptions.

When not to use it

The biggest mistake is using the wrong model for your workload. Don't run a 24/7 database on On-Demand; you're burning money. Don't buy a 3-year Reserved Instance for a temporary project. And never run a critical, stateful service that cannot tolerate interruption, like a primary database, on a Spot Instance.

One canonical example

A media company runs its core website on Reserved Instances to handle baseline traffic cost-effectively. When a news story breaks and traffic surges, it scales out using On-Demand instances. Overnight, it processes large video files using a massive, cheap fleet of Spot Instances, which is tolerant of interruptions.

Interview question

Which cloud pricing model is best for a critical, 24/7 production database needing both high availability and cost optimization?

  • a.A strategy combining On-Demand and Spot Instances
  • b.Reserved InstancesCorrect
  • c.Spot Instances
  • d.On-Demand Instances
Why?

Reserved Instances are ideal for stable, predictable production workloads like databases, offering significant cost savings for a commitment while ensuring continuous operation. Spot Instances are unsuitable for critical databases due to their high risk of interruption, despite their low cost.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Open roles that interview on cloud — each one lists the topics its interview covers.

See open roles