Loading...
Estimate the scale of the system. Consider daily active users, read/write ratio, storage requirements, bandwidth, and any relevant QPS calculations...
Create Short URL:
POST /api/v1/createShortUrl{ "url": "https://leetcode.com/discuss/interview-question/system-design?currentPage=1&orderBy=hot&query=" }{"shortUrl" : ''https://bit.ly/4izy9Dn"}Redirect to Original URL:
GET /api/v1/{shortUrl}{shortUrl}Redirect to the Original URLUpdate the URL:
PUT /api/v1/updateShortUrl/{shortUrl}{"url" : ""https://leetcode.com/discuss/interview-question/system-design?currentPage=1&orderBy=hot&query="}{"Status : Successfull" , "message : "Short URL updated successfully"}Define the data model. Identify the main entities, their attributes, and relationships. Consider the choice of database type (SQL vs NoSQL) and justify your decision based on access patterns...
short_code → long_url mappings.