Command Palette

Search for a command to run...

PHASE 14Advanced ~6 min· topic 8 of 8

Topic 14.8

Cost Optimization

In one line

The question every senior interviewer actually asks: what does this architecture cost, and what can we remove?

0/8 · 0%

Think of it like this

Turning off lights and unused appliances in rooms nobody's in. Systems cost real money to run every hour, and a lot of savings come from simply not paying for capacity nobody is using.

Key ideas

  1. 01

    Cost accounting per service: compute (instances × time), storage (provisioned vs used), bandwidth (esp. egress), managed services.

  2. 02

    The three questions to run: what does this cost?, what can be removed?, what should be managed vs self-hosted?

  3. 03

    Removal candidates: unused shards, duplicate caches, over-provisioned replicas, dead code paths still running jobs.

  4. 04

    Managed vs self-hosted: managed wins on ops time + reliability; self-host wins at huge scale + tight budgets — the crossover is the analysis.

  5. 05

    Reserved vs on-demand vs spot: baseline reserved, burst on-demand, batch spot — the capacity price ladder.

  6. 06

    Interview: 'gateway fleet cost ~$X/mo; I'd cut it to 2 nodes + autoscale, and move telemetry to sampling to halve the bill'.

  7. 07

    Connect it back: cost is the trade-off axis for 70% of your earlier HLD decisions (CDN vs origin, Redis vs DB).

Explain without notes

01

Walk the cost of the 'full blueprint' architecture: which three line items are 80% and what removes them?

Practice

01

Price a 100k-rps read API: LB+gateway, app nodes, Redis, DB, CDN — annual budget, then two cuts.

Trade-offs

  • ↔

    Cost optimization trades redundancy and headroom — never optimize a discount past the SLO it bought.

Run it in production

You've designed it. Now build, operate, and break the same idea hands-on in the DevOps courses:

Completion checklist

  • I can produce a rough budget and defend what gets cut.

Back to phase