educative.io

Educative

Designing PasteBin - Separate MetaData and Object DB

Why did we decide to separate metadata and object db for PasteBin?

We are only expecting text in paste, shouldn’t we store the key and text together for better performance during reads.

Our service is read heavy, having metadata and object storage separate, would we not loose some performance?

3 Likes

Thanks for reaching out to us! The author of the course will be answering your query soon.

I’m also interested in this answer, and also why generally use separat DBs for metadata and objects (same design for Instagram solution)

Thanks!

2 Likes

Waiting for the response

Based on my knowledge even though the author tries to simplify the design by only considering plain text, Pastine in general could be used to share unstructured data such as images, videos…ect
Therefore, using object storage is an ideal solution to do so because it grantees that data won’t be lost and since we are not storing fixed size data then it is better to have object storage for images/videos …ect and block storage for the metadata
You can read more about object storage such as Amazon S3 on this page

Author! please correct me if i am wrong.
Thanks

1 Like