Grokking the System Design Interview
Vote

0% completed

Designing Pastebin

.....

.....

.....

Like the course? Get enrolled and start learning!
J M

J M

· 17 days ago

For the unique key, why not use UUID v7 and be done? It requires 16 bytes instead of 8, but it simplifies the design, so there will be one less failure point in the design (no key gen service).

Show 1 reply
Jeremiah Stones

Jeremiah Stones

· 25 days ago

“The system should be highly reliable; any data uploaded should not be lost.”

The second clause is specifically a durability requirement:

  • Durability → once data is successfully stored/acknowledged, it should not be lost.
  • Availability → the system is reachable and able to serve requests.
  • Reliability → broader umbrella idea: the system consistently behaves correctly over time despite failures.
  • Fault tolerance → the system can continue operating when components fail.

using durability is more accurate and clearer. The current sentence conflates reliability with durability.

Show 1 reply
J

julian_humecki

· 2 years ago

You store a user ID but in your api definition you rely on api_dev_key. These keys shouldn’t be predictable so if they are your user ids (primary keys), they would be easily predictable. do clarify this.

Show 1 reply
Cadence chen

Cadence chen

· 3 years ago

what is the benefit to store metadata and object content in different systems and why do we need to store metadata?

Show 2 replies
Samarth Shah

Samarth Shah

· 3 years ago

More recently, some companies (like Shopify) are debating between having a microservice architecture, versus having a monolithic service architecture with modules. Can the KGS live in the application layer as a separate module? Can someone compare the pros and cons of each approach?

Show 1 reply
C

Cristian Grigore

· 4 years ago

Can BLOB be used to store the paste's text?

Show 1 reply
A

Asish Balu

· 4 years ago

In the DB Design, why is the URL hash size 16 instead of 6?

Show 3 replies
J

Junaid Effendi

· 4 years ago

For KGS service, to move data to application server cache, don't we need a LB to distribute across all servers?

Show 2 replies
B

Brian Sunbury

· 4 years ago

What is the benefit of using Object Storage instead of storing the text in the Paste table in the database? I know pastebin allows you to store images, which would require object storage, but the requirements for this state "Users will only be able to upload text".

Show 3 replies
B

Brian Sunbury

· 4 years ago

In the "Memory estimates" section, at the end of "4. Capacity Estimation and Constraints", it states "Since we have 5M read requests per day, to cache 20% of these requests, we would need: 0.2 * 5M * 10KB ~= 10 GB". But wouldn't we be caching the 1M pastes instead of the 5M reads? Your clarification is greatly appreciated.

Show 1 reply

Reading Progress

0%


Vote for new content