System Design / Curriculum / Day 1

DAY 1 Phase 1 Β· Foundations 12 min read 0 / 10 Mastered

System Design Fundamentals & Framework

How to think like an architect, HLD vs LLD, functional vs non-functional constraints, latency vs throughput, and the 9-step interview framework.

πŸš€ System Design Interview Preparation β€” Day 1

Today we build the foundation. Don't worry about Redis, Kafka, microservices, sharding, etc. yet. First, you need to understand how to think like a system designer.


Day 1 β€” System Design Fundamentals

1. What is System Design?

System design is the process of defining the architecture, components, data flow, APIs, databases, and infrastructure required to build a software system that satisfies functional and non-functional requirements.

For example, suppose an interviewer asks:

"Design a URL Shortener like Bitly."

You shouldn't immediately start drawing:

Architecture Blueprint
Client β†’ API β†’ Database

First ask:

  • How many users?
  • How many URLs?
  • How many requests per second?
  • How quickly should redirects happen?
  • Should the system be available 99.9% of the time?
  • How long should URLs be stored?
  • Do we need analytics?

System design is primarily about making engineering decisions based on requirements and constraints.


2. HLD vs LLD

This is very important for interviews.

HLD β€” High-Level Design

Focuses on components and how they communicate.

Example:

Architecture Blueprint
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚    Client    β”‚
              β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
                     β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Load Balancerβ”‚
              β””β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”˜
                     β”‚
            β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”
            β–Ό                 β–Ό
      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”      β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
      β”‚ API      β”‚      β”‚ API      β”‚
      β”‚ Server 1 β”‚      β”‚ Server 2 β”‚
      β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜      β””β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”˜
           β”‚                 β”‚
           β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                    β–Ό
              β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
              β”‚ Database β”‚
              β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

HLD discusses:

  • Services
  • Databases
  • Caches
  • Load balancers
  • Queues
  • APIs
  • Communication
  • Scaling
  • Availability

LLD β€” Low-Level Design

Focuses on classes, interfaces, objects and their interactions.

Example:

csharp
public interface IUrlService
{
    Task<string> CreateShortUrl(string longUrl);
    Task<string> GetLongUrl(string shortCode);
}

Then:

Architecture Blueprint
UrlController
      ↓
IUrlService
      ↓
UrlRepository
      ↓
Database

Interview distinction

HLDLLD
ArchitectureClasses
ServicesInterfaces
DatabasesObjects
ScalingDesign patterns
Load balancingSOLID
CachingDependency Injection
Message queuesClass relationships

For your preparation, we'll cover both, but we'll start with HLD.


3. Functional Requirements

Functional requirements describe what the system should do.

Example: You are designing an online shopping system.

Functional requirements:

  • User can register.
  • User can login.
  • User can search products.
  • User can add products to cart.
  • User can place orders.
  • User can make payments.
  • User can track orders.

These are the features.

Interview tip

Don't try to design every possible feature.

Ask:

"What are the core functional requirements we should focus on?"

Then define the scope.


4. Non-Functional Requirements

Non-functional requirements describe how well the system should operate.

Examples:

  • Scalability
  • Availability
  • Reliability
  • Performance
  • Security
  • Maintainability
  • Consistency

For example:

The system should support 10 million users and maintain 99.9% availability.

That's not a feature.

That's a non-functional requirement.


5. Scalability

Scalability means:

The ability of a system to handle increasing load by adding resources.

Suppose your application currently handles:

Architecture Blueprint
1,000 requests/sec

Later it needs to handle:

Architecture Blueprint
100,000 requests/sec

Your system needs to scale.

There are two major approaches.


Vertical Scaling

Increase the power of a machine.

Architecture Blueprint
Before:

4 CPU
8 GB RAM

        ↓

After:

16 CPU
64 GB RAM

Advantages:

  • Simple
  • Easy to implement

Disadvantages:

  • Hardware limit
  • Can become expensive
  • Single-machine failure remains a concern

Horizontal Scaling

Add more machines.

Architecture Blueprint
              Load Balancer
               /    |    \
              /     |     \
             β–Ό      β–Ό      β–Ό
          Server1 Server2 Server3

Instead of making one server extremely powerful, add more servers.

This is extremely important for modern distributed systems.


6. Availability

Availability means:

How often the system is operational and accessible when users need it.

For example:

Architecture Blueprint
99%
99.9%
99.99%
99.999%

These numbers are often called availability percentages.

Approximate annual downtime:

AvailabilityDowntime/year
99%3.65 days
99.9%8.76 hours
99.99%52.6 minutes
99.999%5.26 minutes

So:

99.9% availability means the system can theoretically be unavailable for around 8 hours 45 minutes per year.


7. Reliability

Availability and reliability are related but different.

Availability

Is the system available right now?

Reliability

Does the system consistently perform correctly over time?

Example:

A payment service might be available:

Architecture Blueprint
99.99%

but if it occasionally charges customers twice, it's not sufficiently reliable.

For financial systems, reliability and correctness are critical.


8. Performance

Performance describes how efficiently the system responds to requests.

Two important metrics:

Latency

How long does one request take?

Example:

Architecture Blueprint
Request
   ↓
API
   ↓
Database
   ↓
Response

Latency = 100 ms

Throughput

How many requests can the system process over a period of time?

Example:

Architecture Blueprint
10,000 requests/sec

9. Latency vs Throughput

This is a common interview question.

Latency

Time taken for a request.

Example:

Architecture Blueprint
API request β†’ response

50 ms

Throughput

Number of requests processed per unit of time.

Example:

Architecture Blueprint
50,000 requests/second

Think:

Latency = How fast?

Throughput = How much?


10. The System Design Interview Framework

This is probably the most important thing from Day 1.

Whenever the interviewer gives you:

"Design X"

Don't immediately draw architecture.

Follow this sequence:

Architecture Blueprint
1. Requirements
       ↓
2. Scale Estimation
       ↓
3. APIs
       ↓
4. Data Model
       ↓
5. High-Level Architecture
       ↓
6. Detailed Design
       ↓
7. Bottlenecks
       ↓
8. Scaling
       ↓
9. Failure Handling
       ↓
10. Trade-offs

Let's understand each.


Step 1 β€” Requirements

Ask:

What does the system need to do?

Example:

URL Shortener

Architecture Blueprint
Create short URL
Redirect short URL
View basic analytics

Step 2 β€” Scale Estimation

Ask:

How much traffic are we expecting?

Example:

Architecture Blueprint
100 million users
10 million URLs/day
100K requests/sec

You don't need perfect mathematics.

The goal is to understand the order of magnitude.


Step 3 β€” APIs

Define major APIs.

Example:

http
POST /urls
GET /{shortCode}

Step 4 β€” Data Model

Example:

Architecture Blueprint
URL
----------------
id
shortCode
longUrl
createdAt
expiresAt

Step 5 β€” High-Level Architecture

Now draw:

Architecture Blueprint
Client
  ↓
Load Balancer
  ↓
API Servers
  ↓
Cache
  ↓
Database

Step 6 β€” Deep Dive

Now ask:

What happens when traffic increases?

Maybe:

Architecture Blueprint
Cache
Database Replication
Read Replicas
Horizontal Scaling

Step 7 β€” Bottlenecks

Identify potential problems.

Example:

Architecture Blueprint
Database becomes overloaded
        ↓
Read replicas
        +
Caching

Step 8 β€” Failure Handling

Ask:

What happens if the database goes down?

Possible solutions:

  • Replication
  • Failover
  • Backup
  • Retry
  • Circuit breaker

We'll study these in later days.


Step 9 β€” Trade-offs

This is where strong candidates differentiate themselves.

For example:

"We could use SQL because we need strong consistency, but at very large scale a distributed NoSQL database may provide better horizontal scalability. The choice depends on the access pattern and consistency requirements."

Don't simply say:

"We'll use MongoDB because it's scalable."

Explain why.


🎯 Day 1 Interview Questions

Don't look for answers yet. Try answering them yourself.

Q1.

What is system design? Why is it important?

Q2.

What is the difference between HLD and LLD?

Q3.

What are functional and non-functional requirements? Give examples.

Q4.

What is scalability?

Q5.

What is the difference between vertical and horizontal scaling?

Q6.

What is availability? How is it different from reliability?

Q7.

What is latency? What is throughput?

Q8.

What is the difference between latency and throughput?

Q9.

What questions should you ask before designing a system?

Q10.

Explain the step-by-step approach you would follow when asked: "Design a URL Shortener."


🧠 Day 1 Interview Cheat Sheet

Remember these:

Architecture Blueprint
System Design
     ↓
Requirements
     ↓
Scale
     ↓
APIs
     ↓
Data
     ↓
Architecture
     ↓
Bottlenecks
     ↓
Scaling
     ↓
Failure Handling
     ↓
Trade-offs

And:

Architecture Blueprint
Functional       β†’ What the system does
Non-functional   β†’ How well it does it

Latency          β†’ Time per request
Throughput       β†’ Requests per second

Vertical scaling β†’ Bigger machine
Horizontal       β†’ More machines

Availability     β†’ System is accessible
Reliability      β†’ System works correctly/consistently

HLD              β†’ Architecture
LLD              β†’ Classes/design

Your Day 1 task

Try answering Q1–Q10 in your own words first.

Day 1 Interview Questions & Answers

Real-world verbal answers designed to articulate clearly in high-stakes technical interviews.

Day 1 Flashcard Drill

Practice these 10 questions using 3D interactive flashcards. Click or press Space to flip.

Day 1 Q1 UNMASTERED

Loading question...

Day 1 VERBAL ANSWER

...

Card 1 of 10
Copied to clipboard!