Design a Digital Game Distribution Platform
OpenAISoftware Engineer · Technical ScreenLast updated
Design a high-scale game distribution platform covering reliable payment and entitlement tracking, content-addressed binary chunk distribution, offline license leasing, and canary rollouts.
Scenario
Design the backend infrastructure for a global digital PC game distribution platform (similar to Steam or Epic Games Store). The platform must handle high-stakes transactions, massive binary payload distribution, offline play, and rapid developer deployment workflows.
Requirements
Functional Requirements
- Commerce & Entitlements: Users can purchase games, receive immediate access, and request refunds (which revokes entitlements transactionally).
- Build Ingestion & Patching: Developers upload new game versions (20 GB – 150 GB). The system splits builds into content-addressed chunks, deduplicates data across versions, and generates delta manifests.
- Content Delivery: Clients download, resume, and verify builds using manifests and cryptographic hashes.
- Licensing & Offline Play: Clients can launch and play games offline for up to 30 days via cryptographically signed local machine leases.
- Release Management: Support phased/canary deployments (e.g., 5% -> 25% -> 100%) and instant rollbacks.
Non-Functional Requirements
- Scale: 150 million registered users, 15 million concurrent connected clients, and 5 million simultaneous downloads during major release spikes.
- Consistency: Strict consistency for purchases, refunds, and entitlement state. Eventual consistency is acceptable for catalog views and download analytics.
- Integrity: Zero tolerance for corrupted binary chunks during download or disk assembly.
- Bandwidth Efficiency: Minimize CDN egress by downloading only mutated chunks between game versions.
What to Cover
- High-Level Architecture: Diagram the flow between client, storefront/entitlement services, build ingestion pipeline, and delivery edge.
- Build Chunking & Storage: How large binaries are chunked, deduplicated, and organized in object storage.
- Client Download & Patch Protocol: Manifest schema, chunk integrity validation (e.g., Merkle trees), and resumability.
- Licensing & Offline DRM: Mechanics of generating, verifying, and renewing machine-bound cryptographic leases.
- Deployment & Rollback Strategy: Canary rollout routing and cache invalidation strategies during instant rollbacks.
Hints
Hint 1
Separate metadata and manifest delivery from raw binary chunk delivery so chunk storage remains entirely immutable and CDN-cacheable.
Hint 2
Use content-defined chunking (such as FastCDC) and Merkle trees to produce deterministic chunk IDs that maximize deduplication across versions.
Hint 3
For offline licensing, issue asymmetric-key signed tokens bound to client hardware fingerprints with an embedded expiration lease.
Follow-up questions
- How would you integrate local peer-to-peer (P2P) transfer between clients on the same local subnet to reduce external CDN egress?
- How does your CDN cache-invalidation and origin-shield architecture protect origin storage from a thundering herd during a global midnight launch?
- If a critical zero-day security flaw is found in a game binary currently in a 10% canary, describe the precise steps to halt rollouts and force client repair.
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.