Designing Pastebin
1. Intro and requirements
- Pastebin
- service enable users to store plain text or images over the network and generate unique urls to access the uploaded data
requirements
functional
- users could upload/ paste their data and get a unique URL to access it
- users only able to upload text
- data and links will expire after a specific timespan, user should be able to specify expeiration time
- users should optionally be able to pick a custom alias for their paste
non functional
- system should be highly reliable, no data loss any time
- system should be highly available
- small latency
- paste links should not be guessable
2. thoughts
requirement clarification
- what’s the accept types of the file?
- what’s the maximum size of the file?
- 10MB
hardware requirement
- read write request number
- average request size
- storage size
- we probably don’t want to use more than 70% of our total storage capacity at any point
- cache size
how to achieve highly reliable, and highly available
- duplicate host
how you want to store those file
- of course key value
- then question come to be what’s the overall number of key we need to store
- of course key value
high level design
- besides normal client, application server, and object storage
- we could have another db to store metadata, like paste id, user
转载请注明来源,欢迎对文章中的引用来源进行考证,欢迎指出任何有错误或不够清晰的表达。可以在下面评论区评论,也可以邮件至 stone2paul@gmail.com
文章标题:Designing Pastebin
文章字数:215
本文作者:Leilei Chen
发布时间:2020-11-13, 12:46:26
最后更新:2020-11-13, 12:47:05
原始链接:https://www.llchen60.com/Designing-Pastebin/版权声明: "署名-非商用-相同方式共享 4.0" 转载请保留原文链接及作者。