ML System Design

Clarifying Requirements & Constraints

Systematically clarifying functional requirements, latency SLAs, throughput, and hardware constraints in system design interviews.

🟡 intermediate5 min readsystem-design
Requirements Gathering is the critical first phase of System Design interviews and enterprise ML architecture design. Engineers must clarify Functional Requirements (core capabilities, user interactions), Non-Functional Requirements (latency SLAs, throughput QPS, availability, freshness), and Resource Constraints (GPU/CPU budget, memory limits). Establishing clear parameters upfront prevents over-engineering complex architectures for simple requirements.

The First 5 Minutes of System Design

In machine learning system design interviews and enterprise project kickoffs, candidates who start drawing architecture boxes immediately fail.

Why? Because designing a system for 100 users is completely different from designing a system for 1 Billion users at 50,000 QPS.

Requirements Gathering is the structured process of asking clarifying questions to establish scope, scale, latency SLAs, and hardware constraints.

  AMBIGUOUS SYSTEM DESIGN PROMPT: "Design a Video Recommendation Feed"
                                │
                                ▼
  [ SYSTEMATIC REQUIREMENTS GATHERING ]
  1. Functional Requirements:      What features must the system provide?
  2. Non-Functional Requirements:  What latency SLAs, QPS throughput, and data freshness are required?
  3. Scale Estimations:            How many users, items, and RPS traffic spikes must we support?
  4. Hardware & Budget Constraints: What GPU/CPU budget, VRAM limits, and cloud costs apply?

1. Functional Requirements (What does the system do?)

Define explicit user capabilities and edge cases:

2. Non-Functional Requirements (How well must it perform?)

┌──────────────────────────┬──────────────────────────┬──────────────────────────┐
│ LATENCY SLA              │ THROUGHPUT (QPS)         │ DATA FRESHNESS           │
├──────────────────────────┼──────────────────────────┼──────────────────────────┤
│ Real-time API response   │ Queries Per Second       │ How quickly must new user│
│ time budget (e.g. P99    │ peak load traffic (e.g.  │ interactions influence   │
│ latency < 50ms).         │ 20,000 QPS).             │ recommendations (sub-sec)│
└──────────────────────────┴──────────────────────────┴──────────────────────────┘
┌──────────────────────────┬──────────────────────────┐
│ AVAILABILITY & RELIAB    │ PRIVACY & COMPLIANCE     │
├──────────────────────────┼──────────────────────────┤
│ System uptime SLA        │ GDPR compliance, on-     │
│ (e.g. 99.99% availability│ device requirements,     │
│ with fallback modes).    │ data retention rules.    │
└──────────────────────────┴──────────────────────────┘

3. Scale Estimations (Back-of-the-Envelope Math)

Always calculate rough memory and bandwidth numbers out loud:

Daily Active Users (DAU):         100 Million Users
Average Feed Requests per User:   10 Requests / Day
Total Daily Requests:             1 Billion Requests / Day
Average QPS:                      1,000,000,000 / 86,400 sec ≈ 11,500 QPS
Peak QPS (2x Average):            ~23,000 QPS Peak Load!

Catalog Size:                     10 Million Videos
Video Embedding Vector Size:      512-dim Float32 (2 KB per video)
Total Vector Index Memory:        10,000,000 * 2 KB = 20 Gigabytes (Fits easily in RAM!)

How Requirements Drive Architecture

Say this out loud

Requirements Gathering clarifies functional capabilities, non functional performance SLAs, scale, and hardware constraints upfront. Estimating QPS throughput, storage footprint, and latency budgets dictates architectural choices like candidate retrieval filters, feature store latency requirements, and fallback mechanisms.

Followups to expect

  1. What is P99 Latency vs P50 Latency? P50 is the median latency (50% of requests are faster). P99 represents the 99th percentile tail latency (worst 1% of requests). Enterprise SLAs enforce strict P99 limits (e.g. P99 < 100ms).
  2. How do you handle Graceful Degradation under high load? If QPS traffic spikes by 5x during a breaking news event, fallback from deep neural reranking to cached static rankings to maintain API availability.

Check yourself

Question 1 of 3

What primary objective does an ML architect fulfill by asking clarifying questions during the first 5 minutes of a System Design interview?

More in ML System Design

See all →
A Framework for Any ML Design Round5 minFraming a Business Problem as ML5 minOnline vs Offline Evaluation5 min