0% completed
Designing Pastebin
Every case study in this chapter follows the same seven steps from System Design Interviews: A step by step guide, and builds its design from the components in the System Design Master Template. Keep both open beside you, and try each problem yourself before reading the solution.
.....
.....
.....
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).
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.
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.
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?
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?
Cristian Grigore
· 4 years ago
Can BLOB be used to store the paste's text?
Asish Balu
· 4 years ago
In the DB Design, why is the URL hash size 16 instead of 6?
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?
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".
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.
Reading Progress
0%