Grokking the System Design Interview
Ask Author
Back to course home

0% completed

Vote For New Content

Missing Diagram

Raunak Baliyan

May 14, 2025

3

29

0

Sep 24, 2025

How does databases sync in multiple servers ?

Kushidhar Reddy

Oct 16, 2024

0

67

2

May 14, 2025

About the order of estimation

Jimmy Chang

Oct 3, 2024

0

49

0

Oct 3, 2024

What is best strategy to use no of databases to host partitions

Nagaraju P

Sep 12, 2024

0

54

1

Jan 31, 2025

Should the URL table UserID column be a UUID instead of int to match other interfaces?

vproman

Sep 10, 2024

0

30

0

Sep 10, 2024

wrong line in MD5 hashing section?

Vivek Patil

Aug 13, 2024

0

25

1

Oct 22, 2025

Why do we need Data Partitioning and Replication if we have decided on NoSQL?

Szymon

Jul 26, 2024

1

82

0

Aug 27, 2024

Tips on calculating back of the envelope numbers.

Sid

May 10, 2024

0

100

0

May 10, 2024

Memory estimates for caching

kkjathal

Apr 25, 2024

0

50

0

Apr 25, 2024

Memory estimates: Calculation -

Sachin Puranik

Feb 7, 2024

1

114

2

Apr 29, 2025

Max alias length == 16?

almov

Feb 3, 2024

0

31

0

Feb 3, 2024

Zoop Keeper VS Key Generation Services.

subash.balakrishnan

Oct 27, 2023

0

128

0

Oct 27, 2023

Store sequence number

Jharol Rivera

Sep 30, 2023

1

64

0

May 10, 2024

KGS hosting

Samarth Shah

Sep 9, 2023

0

111

1

Sep 11, 2023

Cache Memory Requirements

Vinod Dalavai

Aug 30, 2023

0

129

1

Sep 18, 2023

Solving Hash Collision for URLs

Krish

Aug 14, 2023

0

76

1

May 10, 2024

Another option instead use the KGS - randomUUID.

Andre Lucas Santos Silva

Jul 24, 2023

2

95

0

Sep 24, 2025

How do we make sure KGS won't generate duplicate keys?

Yifeng Chen

May 25, 2023

0

78

1

May 10, 2024

401 vs 403

Vibhor Kashmira

May 15, 2023

2

49

0

Dec 15, 2023

Analytics was one of the requirements, but I don't see any treatment of this in ...

Yoni

Dec 2, 2022

2

96

1

Aug 11, 2024

Hi, are there any downsides to partitioning 1 keys table instead of creating 2 s...

Alex Wells

Sep 4, 2022

1

29

0

Aug 8, 2023

For the database selection, why are we proceeding with a NoSQL database? I thoug...

Richard Yuan

Aug 6, 2022

3

142

1

Aug 11, 2024

What's the point of key generation service and all the complexity related to it?...

Haixiao Yang

Jun 23, 2022

3

78

1

Aug 11, 2024

If we have multiple replicas of the KGS and we are pulling the keys into memory ...

Clayton Corbin

Jun 8, 2022

1

59

1

Aug 8, 2023

Another question that came up in my mind:we calculate the scale of the system in...

Nevil

Apr 26, 2022

6

121

1

Dec 18, 2024

Few more :1)Why does the KeyDB have a table for used keys? Can't we can just del...

Nevil

Apr 23, 2022

0

64

4

Jan 7, 2023

Few questions:1)When we say "We can compute a unique hash (e.g., MD5 or SHA256, ...

Nevil

Apr 23, 2022

3

41

0

Aug 18, 2024

With regards to System APIs, don't we also need a "getURL(url_key)" ? We have sp...

Aaron Rosenzweig

Feb 21, 2022

1

47

3

Aug 11, 2024

Shouldn't the redirect use 301 instead of 302? Browsers cache when the returned ...

Diego Santiviago

Feb 18, 2022

0

24

1

Feb 18, 2022

I noticed that 20K requests per second for the link service is not out of the ra...

Saul Hazledine

Feb 13, 2022

0

47

1

Feb 13, 2022

Why should the amount of cache be estimated based on the total number of request...

MH

Jan 30, 2022

2

67

1

Jan 30, 2022

Why does createURL use an api_dev_key instead of a user id or something similar?...

DogBiscuit

Jan 30, 2022

0

41

1

Jan 30, 2022

Hello! Why do we need to apply base64 encoding? Why is applying the MD5 algorith...

Curious Designer

Dec 9, 2021

0

94

4

Dec 1, 2023

Hi Team,"Our service will ensure that only expired links will be deleted, althou...

Pramod Kumar

Oct 13, 2021

0

80

4

Feb 25, 2023

On this page

  1. Why do we need URL shortening?

Try it yourself

Designing URL Shortener (video)

  1. Requirements and Goals of the System
  1. Capacity Estimation and Constraints
  1. System Interface Definition
  1. Create Short URL API
  1. Redirect API
  1. Analytics API
  1. URL Management API
  1. Delete Short URL API
  1. Database Design
  1. Basic System Design and Algorithm

a. Encoding actual URL

b. Generating keys offline

  1. Data Partitioning and Replication
  1. Cache
  1. Load Balancer (LB)
  1. Purging or DB cleanup
  1. Telemetry
  1. Security and Permissions