staff-engineering · staff
Cost-Aware Architecture
Quick answer
Cost-aware architecture designs systems so unit economics, idle capacity, data movement, and human toil are visible and controlled. Staff engineers add cost as a quality attribute—not after the invoice arrives.
Why this matters
- Cloud bills scale with bad defaults (chatty APIs, hot partitions, over-provisioned always-on).
- Multi-region multiplies storage and network costs.
- FinOps without architecture change becomes spreadsheet theater.
Learning objectives
- Express cost as a quality-attribute scenario. 2. Find top cost drivers. 3. Choose cheaper designs without silent reliability debt. 4. Put cost into ADRs and reviews. 5. Define team guardrails.
Explain like I am 5
A bigger toy box costs more to heat. Build only the rooms you use, and turn off the lights.
Mental model
flowchart LR
Demand --> Design --> Drivers
Drivers --> Compute
Drivers --> Storage
Drivers --> Network
Drivers --> Toil
| Driver | Waste example | Lever |
|---|---|---|
| Compute | Always-on peak | Autoscale, right-size |
| Storage | Hot tier forever | Lifecycle, TTL |
| Network | Cross-AZ chatter | Co-locate, fewer chatty calls |
| Toil | Manual ops | Automation |
Core concepts
Unit cost
Cost per successful business transaction, not only monthly total.Idle vs variable
Baseline burn vs traffic-proportional spend.Explicit trade-offs
Cheaper single-AZ vs availability—write the ADR.Data gravity
Large cross-region transfers dominate bills.Feedback
Cost dashboards beside latency dashboards.Worked example
Notifications send email synchronously per event. Move to queue + batching: cost/email down sharply; non-realtime SLO still met.
Trade-offs
| Optimize only cost | Ignore cost |
|---|---|
| Fragility | Surprise bills |
Failure modes
| Mode | Mitigation |
|---|---|
| Premature multi-region | Prove need |
| Infinite retention | TTL policies |
| No owner | Shared KPI with FinOps |
Interview mode
Skeleton: "Unit cost, idle waste, data movement—cost as a quality attribute in design reviews."
Knowledge check
Cost per successful business transaction or request
Only total company headcount
Dashboard theme color
Microservice count regardless of traffic
By Shubham Jain