Design GPU credit allocator
OpenAISoftware Engineer · Technical ScreenLast updated
A multi-tenant GPU credit allocation system design (OpenAI software-engineer system-design screen): track and deduct GPU credits in real time across many nodes, issue/transfer/spend credits via idempotent APIs, and enforce budgets, hierarchical quotas, rate limits, and fair-share with scheduler integration. Covers prepaid vs postpaid, an immutable double-entry ledger with reservations, overspend prevention, failure recovery, scaling, and observability.
Question
Design a GPU credit allocation system for a multi-tenant compute platform (e.g., OpenAI's GPU infrastructure). Organizations are granted GPU credits (for example, a monthly allowance), and users run jobs that consume those credits across many GPU nodes. Your design should cover:
- Track real-time GPU consumption per job and deduct credits as work is performed, across multiple GPU nodes.
- Define APIs to issue/grant credits, transfer credits between scopes (org -> project -> user), top up credits, query balances, and spend/settle credits for jobs.
- Enforce budgets, per-user/per-project quotas, and rate limits in real time under high concurrency, preventing double-spend and overspend.
- Integrate with a job scheduler / admission controller to admit, throttle, or reject workloads based on available credits and limits.
- Support both prepaid and postpaid billing models.
- Enforce fair usage when GPUs are scarce (fair-share across users/orgs).
- Address idempotency, the consistency model, data model, failure recovery, scaling (partitioning, caching), audit logging/reporting, and observability/alerting.
Solution walkthrough is for members
Get the full walkthrough with reference code and complexity analysis, plus Kitty Coach at 300 messages a day. Hints, the code runner and community answers stay free.