LogoMasst Docs

Solve

๐Ÿ—๏ธ How to Approach a High-Level Design (HLD) Interview?

Step-by-step guide to solving problems

In a High-Level Design interview, your goal is to present a scalable, secure, and well-reasoned design for a given problem.
Here's a step-by-step guide to help you structure your answer.

Tip: Use summary table to know what is mandatory


โœ… 1. Clarify the Problem Statement

Start by making sure you understand the requirements.

  • Confirm the scope.
  • Ask about the type of users.
  • Determine if it's read-heavy, write-heavy, real-time, etc.

Example: Are we building a real-time chat system for 1M DAUs, or async messaging like email?


โœ… 2. Define Functional Requirements

List out what the system should do.

  • User-facing features (CRUD, login, analytics, etc.)
  • Prioritize core features vs optional ones

For a URL shortener:

  • Generate short links
  • Redirect to original URLs
  • Track click stats
  • Link expiry (optional)

โœ… 3. Define Non-Functional Requirements

Focus on the quality attributes:

  • Scalability (e.g. 10M users)
  • Availability (e.g. 99.99% uptime)
  • Latency (e.g. < 200ms)
  • Security (e.g. OAuth2, rate limiting)
  • Durability and consistency

โœ… 4. Estimate Scale

Estimate user load, traffic, and storage. Learn to approach estimation in detail.

๐Ÿ‘ฅ Users

  • Daily Active Users (DAU)
  • Monthly Active Users (MAU)

๐Ÿ”„ Requests per second (RPS)

1M DAU ร— 5 requests/day โ‰ˆ ~60 RPS

๐Ÿ“ฆ Storage

  • Estimate size/item ร— number of items

๐Ÿงฎ Bandwidth

  • Read/write ratio, data egress

โœ… 5. API Design (Optional)

Design key APIs:

POST /shorten
{
  "longUrl": "https://example.com"
}
โ†’ 201 Created
{
  "shortUrl": "mas.st/xy12"
}

GET /xy12
โ†’ 302 Redirect to long URL

Include rate limits, headers, etc.


โœ… 6. High-Level Architecture

Draw major components:

  • Clients (web/mobile)
  • Load balancer
  • App servers / Microservices
  • Database(s)
  • Caching layer
  • Message queues

โœ… 7. Component Deep Dive

Choose and zoom into one or two core components:

  • Short URL generation logic
  • Feed generation in social media
  • Notification system, etc.

โœ… 8. Data Modeling

Mention core entities:

  • Define DB tables or NoSQL collections
  • Add indexes and relationships

โœ… 9. Scaling Strategy

Show how your system can grow:

  • Read scaling: Caching (Redis/CDN)
  • Write scaling: Sharding, queues
  • Horizontal scaling: more instances
  • DB scaling: Read replicas, partitioning

โœ… 10. Trade-offs & Bottlenecks

Show engineering judgment:

  • SQL vs NoSQL
  • Consistency vs Availability (CAP theorem)
  • In-memory speed vs persistence
  • Async queues vs real-time API

โœ… 11. Security & Monitoring

Briefly cover:

  • Auth (JWT, OAuth2)
  • Rate limiting
  • Logs and metrics
  • Alerting

โœ… 12. Wrap Up

Summarize your system:

Weโ€™ve built a horizontally scalable, low-latency system with Redis caching, PostgreSQL DB, async queues, and 99.99% uptime.


๐Ÿ“‹ Summary Table

Steps to rememberWhy It Matters
1๏ธโƒฃ Clarify the problemSets the foundation โ€” avoid wrong assumptions
2๏ธโƒฃ Functional requirementsDefines what the system must do
3๏ธโƒฃ Non-functional requirementsSets expectations (scale, performance)
4๏ธโƒฃ Estimate scaleHelps size the solution realistically
6๏ธโƒฃ High-level architectureThe heart of HLD โ€“ shows your system thinking
7๏ธโƒฃ Component deep diveShows depth in design
๐Ÿ”Ÿ Trade-offs & bottlenecksShows engineering maturity
Nice to haveValue
5๏ธโƒฃ API designGood for client-server or service-based systems
8๏ธโƒฃ Data modelingHelpful when dealing with storage-heavy systems
9๏ธโƒฃ Scaling strategiesReinforces your understanding of growth
1๏ธโƒฃ1๏ธโƒฃ Security & monitoringShows ops awareness
1๏ธโƒฃ2๏ธโƒฃ Wrap-up summaryEnds your pitch strongly