DEV Community

Akarsh
Akarsh

Posted on

How to Approach Any System Design Problem

System Design can feel overwhelming.

You hear words like Load Balancer, Redis, Kafka, Sharding, Replication, CDN, Microservices…

…and suddenly the question looks much harder than it actually is.

But here's the important part:

You don't need to know every technology to solve a System Design problem.

You need a repeatable way of thinking.


The Problem 🧩

Imagine you're asked:

"Design YouTube."

Your first instinct might be:

  • Use Microservices
  • Add Kafka
  • Use Redis
  • Add a Load Balancer
  • Use MongoDB
  • Add Kubernetes

But there's a problem.

You started choosing technologies before understanding the problem.

A good System Design discussion doesn't begin with:

"Which database should I use?"

It begins with:

"What exactly are we building?"


A Simple Approach πŸš€

Whenever you get a System Design problem, follow this sequence:

1️⃣ Clarify Requirements

First understand what the system actually needs to do.

For example, for a URL Shortener:

Functional Requirements

  • User provides a long URL
  • System generates a short URL
  • Short URL redirects to the original URL

Non-Functional Requirements

  • High availability
  • Low latency
  • Scalability
  • Reliability

Don't immediately start drawing boxes.

Understand the requirements first.


2️⃣ Estimate Scale

Next, ask:

"How big does this system need to be?"

You don't always need exact numbers.

Rough estimates are enough to guide architectural decisions.

For example:

  • 10 million users
  • 1 million requests/day
  • 100,000 requests/second during peak traffic
  • 100 TB of stored data

Now the architecture starts becoming clearer.

A system handling 1,000 requests/day has very different requirements from one handling 1 million requests/second.


3️⃣ Identify the Core APIs

Now think about how clients interact with the system.

For a URL Shortener:

POST /shorten
GET /{shortCode}
Enter fullscreen mode Exit fullscreen mode

For a social media application:

POST /posts
GET /feed
POST /follow
Enter fullscreen mode Exit fullscreen mode

APIs help define the system's boundaries.


4️⃣ Design the High-Level Architecture

Now we can start drawing the major components.

A simple architecture might look like:

Client
   ↓
Load Balancer
   ↓
Application Servers
   ↓
Database
Enter fullscreen mode Exit fullscreen mode

As the system grows, additional components might appear:

                    β”Œβ”€β”€β†’ Redis
                    β”‚
Client β†’ Load Balancer β†’ Application Servers β†’ Database
                    β”‚
                    └──→ Message Queue
Enter fullscreen mode Exit fullscreen mode

The important thing isn't adding more boxes.

The important thing is understanding why each box exists.


Why This Matters πŸ’‘

System Design is less about memorizing architecture diagrams…

…and more about understanding trade-offs.

For example:

Why use a Cache?

Because repeatedly reading frequently accessed data from a database can increase latency and database load.

Client
  ↓
Application
  ↓
Cache β†’ Data Found βœ…
  ↓
Database β†’ Cache Miss
Enter fullscreen mode Exit fullscreen mode

Why use a Load Balancer?

Because sending every request to one server creates a bottleneck.

              β”Œβ†’ Server 1
Client β†’ LB ──┼→ Server 2
              β””β†’ Server 3
Enter fullscreen mode Exit fullscreen mode

Why use a Message Queue?

Because some operations don't need to happen immediately.

For example:

User β†’ Application
          ↓
       Message Queue
          ↓
     Background Worker
          ↓
      Send Email
Enter fullscreen mode Exit fullscreen mode

This allows the main request to remain fast while background work happens separately.


Quick Tips ⚑

When solving System Design problems:

  • Start with requirements, not technologies.
  • Estimate scale before choosing architecture.
  • Keep the first design simple.
  • Introduce complexity only when there's a reason.
  • Think about bottlenecks.
  • Always discuss trade-offs.
  • Ask what happens when a component fails.
  • Think about how the system scales.

A simple architecture that you can explain is better than a complicated architecture that you cannot justify.


Common Mistake ❌

One of the biggest mistakes beginners make is:

Trying to use every technology they know.

They know Redis β†’ add Redis.

They know Kafka β†’ add Kafka.

They know Microservices β†’ split everything into 20 services.

They know Kubernetes β†’ deploy everything on Kubernetes.

But System Design isn't a technology checklist.

Every component should answer a question.

Why Redis?

Why Kafka?

Why SQL instead of NoSQL?

Why Microservices instead of a Modular Monolith?

If you can't explain the reason, you probably don't need it yet.


A Framework You Can Remember 🧠

For almost any System Design problem, remember:

R β†’ S β†’ A β†’ D β†’ B β†’ T

R β€” Requirements

What are we building?

S β€” Scale

How many users, requests and data?

A β€” APIs

How will clients interact with the system?

D β€” Design

What are the major components?

B β€” Bottlenecks

What can become a problem at scale?

T β€” Trade-offs

Why did we choose this solution?

That's your basic System Design thinking framework.

Top comments (0)