Loading...
1000 TPS (200 write, 800 redirect)
assume each row consists of
original url, and hash, estimated 1kb
database increase 200 * 3600 * 24 * 30 * 1kb = 500gb / month
originalUrl: string/text
hash: string/text
For submitting url:
web browser http post the normal url -> api gateway -> shorter service generate a hash and saves the url
For redirecting:
web browser http get -> api gateway -> shorter service
Dig deeper into 2-3 components and explain in detail how they work. For example, how well does each component scale? Any relevant algorithm or data structure you like to use for a component? Also you could draw a diagram using the diagramming tool to enhance your design...