Multi-Tenant Async Batch LLM Inference & Off-Peak Scheduler
Design an OpenAI / Anthropic Batch API platform where enterprises upload 100k-prompt JSONL files for 24-hour SLA completion at 50% discount, enforcing fair per-tenant token quotas, checkpointed partial progress, and output artifact streaming.
Functional Requirements
- FR-1POST /v1/batches — Validates input JSONL object manifest, reserves tenant daily token quota, and shards prompts into work queues.
- FR-2GET /v1/batches/{batch_id} — Returns real-time completed/failed prompt counters and signed output/error JSONL download URLs.
- FR-3POST /v1/batches/{batch_id}/cancel — Halts remaining unstarted shards cleanly while preserving already-completed output lines.
- FR-4Must prevent a single whale tenant uploading 10M prompts from starving smaller tenants and survive worker/checkpoint node crashes.
Workload Profile
Consistency Model
Read-after-write on batch state transitions (VALIDATING -> IN_PROGRESS -> FINALIZING -> COMPLETED / CANCELED) and shard lease claims.
Relevant practice for
Sign in and either achieve AC or complete 3 official submissions on this question to inspect community diagrams and writeups.
Click Submit in the top bar to evaluate against all 7 judge cases and save each run here.
Click an item in Inventory above, or press B to add a component, double-click to name, C to connect.
Write under ### Architecture for Diagram to take that up directly