Design Per-Second Usage Metering and Billing for GPU Cloud Resources

Last updated: November 29, 2026

Quick Overview

Design the pipeline that measures usage of VMs, GPUs, storage, and per-token inference across all regions and turns it into accurate, auditable invoices and near real-time spend dashboards for customers.

Nebius
System Design
Software Engineer
Nebius
November 29, 2026
Software Engineer
System Design Round
System Design
Medium

0

0

0 solved


Design the pipeline that measures usage of VMs, GPUs, storage, and per-token inference across all regions and turns it into accurate, auditable invoices and near real-time spend dashboards for customers.

Nebius bills GPU compute by time, storage by capacity, and Token Factory inference by tokens, with both on-demand and committed contracts. Billing is a classic place where the interviewer probes exactly-once accounting, late data, and the difference between real-time estimates and invoice-grade numbers.

What the Interviewer Expects
  • Separates usage events (facts) from rating (prices) and invoicing
  • Designs idempotent event ingestion with unique event ids
  • Handles late and duplicate events with a correction window
  • Supports committed-use discounts and credits in a rating step
  • Provides real-time estimates separate from final invoices
  • Keeps an immutable audit trail
Key Topics to Cover
event-driven pipelines
idempotency
stream processing
billing
data consistency
How to Approach This
  1. Start by clarifying functional and non-functional requirements with the interviewer.
  2. Estimate the scale: QPS, storage, bandwidth. This drives your design decisions.
  3. Draw a high-level architecture first, then deep dive into 1-2 critical components.
  4. Discuss trade-offs explicitly (e.g., consistency vs availability, SQL vs NoSQL).
  5. Address failure scenarios, monitoring, and how the system handles 10x traffic spikes.
Possible Follow-up Questions
  • A region loses connectivity for two hours; how do usage events catch up without loss or double counting?
  • How do you apply a price change in the middle of the month?
  • How would you detect a metering bug that undercharges thousands of customers?
Sharpen Your Skills on Codemia

Practice similar problems with our interactive workspace, get AI feedback, and track your progress.

Practice System Design Problems
Sample Answer
Requirements

Inputs: lifecycle events (VM started, stopped, resized), periodic heartbeats from node agents, storage capacity snapshots, and per-request token counts from the inference gateway. Outputs: per-tenant ...

High-Level Design

Producers write usage records with a globally unique event_id, resource_id, sku, quantity, start, end to a regional durable log (Kafka). A metering service aggregates into hourly usage per...


Submit Your Answer
Markdown supported

Related Questions