Define the APIs expected from the system. This is your chance to analyze and define the read and write paths so that you can come up with the high-level design...
Describe the overall system architecture. Identify the main components needed to solve the problem end-to-end. Use the diagramming tool to create a block diagram.
Concept:
The goal of this project is to design a service that shortens long URLs into a preferrable 8-bits long URL which can reduce that considerable space in writing long URLs. A URL shortener shortens a long URL into a concise, easy to memorize, easy to share and aesthetically pleasing short URL.
Design:
The URL shortener takes a long URL as an input from a user and returns a short URL. When a user sends a request whose body contains a long URL, a service (API) takes the long URL and create a unique short URL, the created short URL is a path on my domain and it must be unique so as to prevent two long URLs being linked to the same short URL. for example,
USER LONG URL: "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcSGxwl4fhem6m2urbLPsROL7UHP2tjF4CowszALXe5IwDIMG7C2VdCqSyLCsNi4mrqWuKJgVE215SQCpX3TOTQSUgwhOnN_kBr2FB6omLvWww",
EXPECTED SHORT URL: https://my-domain.com/aXb324
Geographically, this program should be able to handle multiple users from different parts of the world. Users are expected to be able to communicate with this program via a mobile app, a desktop app, a web application through an API.
Active Users: 500,000 - 1,000,000 daily active users
1,000,000 - 3,000,000 monthly active users
Read vs. Write: 100 : 1
Queries per secs:
Storage: (Assuming every users have at least 5 long URLs stored on my DB for 3 years)
Throughput:
Security:
Reliability:
Scalability:
Deep dive into 2-3 key components. Explain how they work, how they scale, discuss tradeoffs, capacity, and any relevant algorithms or data structures.