System Design
Mid-Level
system_design
Design a URL shortener service
Create a URL shortener service like bit.ly. The service should take a long URL and return a shortened URL. Additionally, upon receiving a request to the short URL, it should redirect the user to the long URL. Consider scalability and performance, especially since the service may handle millions of requests daily. State your design considerations including storage, retrieval, and potential bottlenecks.
Also, discuss how you would handle URL collisions and how to ensure that the generated short URLs are unique.
Also, discuss how you would handle URL collisions and how to ensure that the generated short URLs are unique.
Suggested Answer