System Design
Mid-Level
system_design
Design a URL shortening service like bit.ly
In this system, your task is to create a service that can take long URLs and encode them into a shorter, unique identifier that redirects users to the original URL when accessed. Consider scalability, data storage, and how to prevent collisions among shortened URLs.Key considerations:
1. How would you handle redirects?
2. What data structure would you use to store the mappings?
3. Discuss strategies around generating unique keys and managing updates/deletes.
1. How would you handle redirects?
2. What data structure would you use to store the mappings?
3. Discuss strategies around generating unique keys and managing updates/deletes.
Suggested Answer