Black Friday: 30% off every plan through November 30. See the prices
SysDesignPrep.com
Study guide

Updated 24 October 2026

Cost-aware system design

Designing systems that are cheap to run as well as fast: estimating cost in interviews, where cloud bills come from (compute, storage, egress, managed services), storage tiering, caching and CDNs for cost, right-sizing, spot capacity and unit economics.

Reading is half of it. Now try it in an interview.An AI interviewer asks you to design YouTube, out loud or typed, and scores the answer for your level. Or watch a sample interview first, free with no sign-up to start.
Start an AI mock

Try it yourself, in a playground:AutoscalingReplication vs erasure codingTime-series rollupsCompression trade-offsStorage tieringServerless cold starts

At scale, cost is a design constraint as real as latency. Storing every video in five resolutions, keeping a year of metrics at full resolution or running GPUs around the clock can cost more than the business earns. Senior interviewers increasingly ask "roughly what would this cost?" or "how would you make it cheaper?". You do not need exact prices, but you should know where money goes and which levers move it.

Where the bill comes from

CategoryTypical driversMain levers
Computeinstance hours, GPUs, idle capacityright-sizing, autoscaling, spot, efficient code
Storagebytes stored, replicas, retentiontiering, compression, retention limits, deduplication
Networkegress to the internet, cross-region and cross-zone trafficCDN, compression, keeping chatty traffic in one zone
Managed servicesper-request pricing, provisioned throughputbatching, caching, choosing the right service
Operationsengineers' timesimplicity, managed services where they save more than they cost

Egress is the surprise for many teams: serving video or downloads from origin storage directly can cost more than the storage itself. See CDN and edge.

Estimate it

A quick cost estimate builds on your capacity numbers:

  • Storage: daily new data multiplied by retention multiplied by replication, then priced per tier.
  • Bandwidth: peak and average egress per month.
  • Compute: required cores or GPUs at peak, with headroom, and how much of the day they are actually busy.

Even order-of-magnitude numbers ("about 2 PB a year, so tiering matters") change the design conversation. See back-of-envelope estimation.

Storage levers

  • Tiering: hot data on SSD or standard object storage, warm on infrequent-access tiers, cold in archive tiers that cost a fraction but take minutes or hours to read. Lifecycle rules move objects automatically by age. See object storage and files.
  • Retention: delete what you do not need; downsample old metrics (per-second data becomes per-hour after a week). See time-series data.
  • Compression and columnar formats: often 5 to 10 times smaller for logs and analytics.
  • Deduplication: content-addressed storage stores identical files and chunks once. See Design Dropbox.
  • Erasure coding instead of three full replicas for cold data: similar durability at about 1.5 times the size.

Compute levers

  • Right-size: most instances run at low utilisation; match instance size to actual use.
  • Autoscale to follow demand, and scale non-urgent work to zero when idle. See autoscaling.
  • Spot or preemptible capacity for interruptible work (batch jobs, transcoding, training) at a large discount; design jobs to checkpoint and retry.
  • Commitments (reserved or committed-use discounts) for the steady baseline.
  • Shift work in time: run batch jobs off-peak on capacity you already pay for.
  • Efficiency: a faster serialization format or a better query can remove whole fleets.

Do less work

  • Cache expensive results; a cache hit is far cheaper than recomputing or re-querying. See caching.
  • Compute on demand instead of upfront when most outputs are never used, such as transcoding rarely watched videos into every format only when requested. See Design YouTube.
  • Sample high-volume telemetry such as traces. See Design a Monitoring System.
  • Batch small requests into bigger ones to cut per-request charges.

GPUs and AI workloads

GPU time dominates AI system costs. Levers: batching requests to raise utilisation, smaller or quantised models where quality allows, routing easy requests to cheaper models, caching repeated prompts and prefixes, and autoscaling on queue depth. See LLM systems and Design LLM Inference.

Unit economics

Express cost per unit of value: per active user per month, per video hour streamed, per million requests, per order. It shows whether growth makes the business healthier or worse, and which feature is expensive. Tag resources by service and team so costs can be attributed.

Trade-offs to say out loud

  • Cheaper storage tiers mean slower and sometimes costly retrieval.
  • Spot capacity means interruptions.
  • Aggressive caching means staleness.
  • Fewer replicas means less durability or availability.
  • Engineering time is also cost: a managed service that costs more per request can still be cheaper overall.

Checklist

  • A rough monthly cost estimate for storage, bandwidth and compute.
  • CDN for egress-heavy content.
  • Lifecycle tiering, retention limits, compression and deduplication.
  • Right-sizing, autoscaling, spot for interruptible work, commitments for baseline.
  • Caching, on-demand computation and sampling to avoid work.
  • Cost per unit of value, attributed to teams and features.

Questions people ask

What is cost optimisation in system design?

Cost optimisation in system design treats cost as a design constraint as real as latency, by knowing where the money goes and which levers move it. At scale, storing every video in five resolutions, keeping a year of metrics at full resolution or running GPUs around the clock can cost more than the business earns. Exact prices are not needed, but senior interviewers increasingly ask roughly what a design would cost and how to make it cheaper.

What are cost-effective system design strategies?

Cost-effective system design comes from a handful of levers: caching expensive results, computing on demand instead of upfront, serving egress-heavy content through a CDN, tiering and expiring storage, and right-sizing and autoscaling compute. Spot or preemptible capacity covers interruptible work such as batch jobs and transcoding, and commitments cover the steady baseline. Each lever has a trade-off: cheaper storage tiers are slower to read, spot capacity means interruptions, and aggressive caching means staleness.

What drives cloud costs in a system design?

Cloud bills come from compute (instance hours, GPUs, idle capacity), storage (bytes stored, replicas, retention), network (egress to the internet, cross-region and cross-zone traffic), managed services (per-request pricing, provisioned throughput) and engineers' time. Egress is the surprise for many teams: serving video or downloads directly from origin storage can cost more than the storage itself. That is why egress-heavy content goes through a CDN.

How do you estimate the cost of a system design?

Build the estimate on your capacity numbers: storage is daily new data multiplied by retention multiplied by replication, priced per tier; bandwidth is peak and average egress per month; compute is the cores or GPUs needed at peak, with headroom, and how much of the day they are actually busy. Order-of-magnitude numbers are enough. A figure such as "about 2 PB a year, so tiering matters" already changes the design conversation.

How do you reduce storage costs in a large system?

Reduce storage costs with tiering, retention limits, compression and deduplication. Lifecycle rules move objects by age from hot storage to infrequent-access and archive tiers, which cost a fraction but take minutes or hours to read. Compression and columnar formats are often 5 to 10 times smaller for logs and analytics, and erasure coding gives cold data similar durability to three full replicas at about 1.5 times the size.

What is unit economics in system design?

Unit economics expresses cost per unit of value, such as per active user per month, per video hour streamed, per million requests or per order. It shows whether growth makes the business healthier or worse, and which feature is expensive. Tagging resources by service and team lets those costs be attributed to the teams and features that cause them.