Interview prompt
Problem context
Skills being evaluated
Use the sequence below to surface constraints, choose boundaries, test failure behavior, and defend trade-offs. Concrete numbers are interview assumptions, not claims about a real production system.
Clarify the decision
- Define decisions the model should support: optimization, pricing, budgeting, or chargeback require different accuracy. Identify direct, shared, idle, failover, and platform investment costs.
Establish scale assumptions
- Map high-cost services and tenant work distributions. Start with the small number of cost drivers that explain most spend rather than instrumenting every resource.
Functional and non-functional requirements
- Provide stable understandable units, disclose allocation assumptions and uncertainty, preserve reliability reserves, and give owners actionable drivers. Reconciliation to the bill must be explainable.
High-level architecture
- Collect resource usage, service tags, request or job work units, tenant context, and billing exports into a cost ledger. Allocation rules version direct and shared costs and publish product and tenant views.
Data model and flow
- Requests carry trusted tenant and product identity; async jobs retain causation. Periodic pipelines join usage with rates, amortized commitments, shared allocation, and confidence bands.
Consistency and transaction boundaries
- Cost views are eventually reconciled to provider invoices and retain rule versions so historical numbers remain explainable. Late billing adjustments create restatements, not silent rewrites.
Failure modes and recovery
- Missing tags or usage go to an unattributed bucket with an owner and alert; do not spread unknown cost invisibly. Attribution telemetry cannot block production.
Security and privacy
- Tenant cost views reveal only their usage and plan; internal profitability is access-controlled. Protect identity propagation from customer forgery.
Observability and SLOs
- Track attribution coverage, unit drift, shared-cost share, idle and reserve cost, rule changes, anomalies, and realized optimization. Pair dollars with SLO and business output.
Capacity and cost
- Use activity-based units such as compute-seconds, bytes scanned, or model tokens where they predict cost. Allocate reliability reserve as explicit insurance, not waste hidden in unit price.
Alternatives and trade-offs
- Precise per-request allocation may cost more than it saves; coarse allocation can drive wrong behavior. Match fidelity to decision value and publish confidence.
Evolution and migration
- Start with showback and major drivers, validate with teams, then use for planning and pricing. Introduce chargeback only after ownership and rules are trusted.
What Staff and Principal candidates should emphasize
- Staff candidates treat cost telemetry as an incentive system. They make shared and reserve costs explicit, preserve historical rule context, and avoid false precision.
Decision trade-offs
Allocation fidelity
Option A
Exact per-request metering everywhere
Option B
Activity-based models for dominant cost drivers
Recommendation:Instrument dominant variable drivers precisely and allocate residual shared costs transparently; optimize fidelity for decision value.
Governance
Option A
Immediate internal chargeback
Option B
Showback, validation, then selective accountability
Recommendation:Build trust with showback and reconcile assumptions before attaching budgets or team incentives.
Follow-up interview questions
- 01Who pays for idle disaster-recovery capacity?
- 02How do commitments change marginal versus average cost?
- 03What happens to unattributed spend?
- 04When is per-tenant profitability too sensitive to expose?
Common weak answers and mistakes
- 01Allocating shared cost by a convenient metric unrelated to consumption.
- 02Hiding idle and reliability capacity inside product units.
- 03Changing allocation rules and silently rewriting history.
- 04Launching chargeback before teams trust identity coverage and model assumptions.
Interviewer evaluation rubric
Uses tags and divides the bill but cannot model shared capacity, work units, uncertainty, or incentives.
Builds a cost ledger, trusted identity, activity units, shared rules, showback, and bill reconciliation.
Adds marginal versus average views, reserve insurance, restatements, confidence, anomaly ownership, and business outcomes.
Creates an economically sound feedback system that improves architecture, pricing, procurement, and tenant policy without gaming.