System Design Interview Prep: The First 5 Minutes - Clarifying Questions
The first five minutes of a system design interview are the most critical. Because interviewers intentionally present vague, open-ended prompts, asking targeted clarifying questions is essential to establish the system's true scope, scale, and constraints. Failing to clarify requirements at the outset almost guarantees building the wrong system, leading to a failed interview.
1. The Criticality of the First Five Minutes
In a system design interview, the interviewer's initial prompt is deliberately ambiguous. For example, you might be asked to "design a photo-sharing service." Without clarification, this prompt could describe two entirely different systems:
- Instagram-like Service: Billions of small, highly compressed images, where the primary engineering challenge is serving a personalized feed to millions of concurrent users with sub-second latency.
- Flickr-like Service: Fewer active users uploading massive, high-resolution, uncompressed images, where the primary challenges are durable, cost-effective raw storage and high-throughput upload pipelines.
Comparison of Design Directions
If you do not ask clarifying questions, you risk designing a massive, distributed Flickr-style storage engine when the interviewer actually wanted a low-latency Instagram feed.
2. The Golden Rule of Clarifying Questions
The most common mistake candidates make is bombarding the interviewer with a checklist of 15 memorized questions. This checklist approach derails the interview and signals a lack of analytical thinking.
The Golden Rule
Before asking any question, ask yourself: Will the answer change my design?
A great clarifying question creates a clear fork in your architectural decision tree:
If the answer to a question will not alter your choice of database, caching strategy, API design, or network topology, do not ask it. Instead, state your reasonable assumption clearly, check if the interviewer agrees, and move forward.
3. Anatomy of Bad Questions: Anti-Patterns to Avoid
To maintain a professional, engineering-focused dialogue, avoid questions that shift your architectural responsibilities onto the interviewer or ask for generic, self-evident truths.
Anti-Pattern 1: Shifting Technical Decisions to the Interviewer
- Bad Question: "Should I use SQL or NoSQL?"
- Why it is bad: Choosing the database is your job as the architect. The interviewer cannot make this decision for you. Your choice must emerge naturally from how the data is structured, its access patterns, and its consistency requirements.
Anti-Pattern 2: Asking for Generic "Best Practices"
- Bad Question: "Do we need the system to be scalable and highly available?"
- Why it is bad: In modern system design, the answer is almost always "yes." Asking this yields zero actionable architectural constraints. Instead, ask about specific metrics that imply scale and availability requirements.
Anti-Pattern 3: Ignoring the Answers You Receive
- The Scenario: You ask a great question, and the interviewer tells you, "Our system only has 10,000 total users." You acknowledge this, but then proceed to design a massive, multi-region distributed system with Kafka, Cassandra, and Kubernetes.
- Why it is bad: You have wasted resources and over-engineered the solution. A system for 10,000 users can easily run on a single, well-provisioned monolithic instance with a relational database. Over-engineering demonstrates a lack of practical business and engineering judgment.
4. Functional vs. Non-Functional Requirements
Your clarifying questions must systematically divide the problem space into two categories: Functional Requirements and Non-Functional Requirements.
Functional Requirements
These define the core features of the application. You can directly ask the interviewer to outline the primary use cases:
- Can users search for other users?
- Can users comment on photos, or only "like" them?
- Do we need to support video uploads, or just static images?
Non-Functional Requirements
These define the operational constraints and quality attributes of the system. They dictate your choices of databases, caching layers, load balancers, and message queues.
5. The Four Essential Non-Functional Questions
To establish a solid foundation for any system design, ask these four core non-functional questions:
1. "How many users do we have, and how fast is the user base growing?"
- Architectural Impact: This determines your scaling strategy. A slow-growing base of 10,000 users requires a simple, cost-effective architecture. A rapidly growing base of 100 million users requires horizontal scaling, database sharding, and load balancing.
2. "Do users read more or write more?"
- Architectural Impact: This establishes the Read/Write ratio.
- Read-Heavy (e.g., 100:1 read-to-write): Focus on aggressive caching (Redis/Memcached), Content Delivery Networks (CDNs), and database read replicas.
- Write-Heavy (e.g., IoT sensor logging): Focus on write-optimized storage engines (LSM-tree-based databases like Cassandra), message queues (Kafka) to buffer writes, and rate limiting.
3. "What data can we not afford to lose?"
- Architectural Impact: This dictates your consistency and durability models.
- Financial transactions: Require strict ACID compliance, relational databases (PostgreSQL), and synchronous replication.
- Social media likes/views: Can tolerate eventual consistency, allowing the use of highly scalable NoSQL databases.
4. "How fast should the important actions feel?"
- Architectural Impact: This defines your latency budget. If a user's home feed must load in under 500 milliseconds, you must pre-compute feeds asynchronously and store them in an in-memory cache, rather than querying the database on every page load.
6. Proactive Estimation: Picking and Defending Numbers
When you ask about scale, interviewers will often turn the question back to you: "What do you think the numbers should be?"
The interviewer wants to see if you can make realistic, defensible assumptions based on real-world products. When proposing numbers, always walk the interviewer through your mathematical reasoning.
Example: Estimating Scale for a Consumer Photo-Sharing App
Candidate: "Since this is a consumer photo-sharing app, let's assume we have 10 million Daily Active Users (DAU). In social media apps, users typically browse and consume content far more than they post. Let's assume an average user views 100 photos a day but only uploads 1 photo every 10 days (0.1 uploads/day). This means our system is highly read-heavy, with a read-to-write ratio of roughly 1000:1. Does that sound reasonable to you?"
If the interviewer agrees, you now have concrete, defensible metrics to calculate your storage, bandwidth, and QPS (Queries Per Second) requirements.
7. Deep-Dive Case Study: Designing Ticketmaster
Let's apply this clarifying framework to a common system design prompt: "Design a ticket booking system like Ticketmaster."
Instead of jumping straight into database schemas, ask these four highly targeted clarifying questions to shape your architecture.
Question 1: "Are we only booking tickets, or do we also need to handle the event organizers who create events?"
- Why ask this: It defines the scope of the system.
- Architectural Impact: If you must support event organizers, you need to design a write-heavy portal with bulk upload APIs, event validation pipelines, and seat mapping tools. If you are only booking tickets, you can focus entirely on high-concurrency read and checkout flows for end-users.
Question 2: "How many people show up when a big event goes on sale?"
- Why ask this: It defines the peak scale of the system.
- Architectural Impact: If a popular concert goes on sale and 10 million users attempt to buy tickets simultaneously, your system will experience massive spike traffic. This requires a virtual waiting room (queueing system), rate limiters, and highly scalable caching layers to prevent database crashes.
Question 3: "When one user starts checkout for a seat, does that seat become temporarily unavailable to everyone else? If so, for how long?"
- Why ask this: This identifies the hardest technical challenge of the design.
- Architectural Impact: If seats must be held during checkout, you must implement a distributed locking mechanism with a Time-To-Live (TTL). If the user does not complete the purchase within 10 minutes, the lock must expire, and the seat must be released back to the pool.
Question 4: "Do users search for events on our app, or do they arrive via a direct link?"
- Why ask this: It defines the feature set and traffic patterns.
- Architectural Impact: If users search for events, you must design an Elasticsearch cluster, handle search indexing, and manage query latency. If they arrive via direct links (e.g., from an artist's social media post), you can bypass search infrastructure and focus your resources on optimizing the landing page and checkout transaction flow.
8. Architectural Workflows & Technical Implementations
To see how clarifying questions directly shape your code and architecture, let's look at how the answers to the Ticketmaster questions translate into concrete technical designs.
Scenario A: Handling High-Concurrency Seat Locking (Answer to Q3)
Because the interviewer confirmed that seats must be held temporarily for 10 minutes during checkout, we cannot use a simple database update. We need a distributed locking mechanism with an automatic expiration timer.
The Seat Reservation Workflow
Implementation: Redis-Based Distributed Lock (Python/Pseudocode)
import redis
r = redis.Redis(host='localhost', port=6379, db=0)
def acquire_seat_lock(seat_id, user_id, lease_time_seconds=600):
lock_key = f"lock:seat:{seat_id}"
# NX: Set if not exists (ensures mutual exclusion)
# EX: Set expiry time in seconds (ensures lock release on timeout)
is_locked = r.set(lock_key, user_id, nx=True, ex=lease_time_seconds)
if is_locked:
return {
"status": "SUCCESS",
"message": f"Seat {seat_id} reserved for user {user_id} for 10 minutes."
}
else:
# Lock acquisition failed because the key already exists
current_holder = r.get(lock_key)
return {
"status": "CONFLICT",
"message": f"Seat {seat_id} is currently held by another transaction."
}
Scenario B: Database Choice Based on Access Patterns (Answer to Q1 & Q4)
Your database selection should be a direct consequence of your clarifying questions. The table below shows how your design changes based on the requirements you gather:
9. Summary and Key Takeaways
- The first five minutes are make-or-break: Use this time to transform a vague, ambiguous prompt into a concrete set of engineering requirements.
- Avoid the checklist trap: Do not ask memorized lists of questions. Only ask a question if the answer will directly change your architectural design.
- Own the technical decisions: Never ask the interviewer to choose your database or technology stack. Gather the requirements, and make those decisions yourself.
- Do not ignore constraints: If the interviewer specifies a small scale (e.g., 10,000 users), design a simple, cost-effective system. Do not force an over-engineered distributed architecture.
- Proactively estimate scale: If asked to define the metrics, propose realistic numbers based on real-world benchmarks and walk the interviewer through your calculations.
- Divide and conquer: Use functional questions to establish the feature scope, and non-functional questions to determine scale, read/write ratios, durability, and latency targets.
- Connect questions to code: Every requirement you clarify should directly influence your technical implementation, such as using Redis TTLs for temporary seat locks or PostgreSQL for transactional integrity.