200 requests per second for creation and 20,000 requests per second for redirection.
shortenURL: Accepts a long URL and returns the corresponding short URL.
redirectURL: Takes a short URL and redirects to the original long URL.
NoSQL Database is selected because of following reasons:
Choosing a NoSQL solution with the above considerations provides an efficient, flexible, and scalable foundation for a URL shortening service.
Request Flow:
Request Flow:
This design ensures optimal performance by leveraging caching for read-heavy patterns, thereby reducing database load and enhancing user experience.
Functionality:
Scale:
Algorithm/Data Structure:
Functionality:
Scale:
Algorithm/Data Structure:
Performance Enhancements:
Functionality:
Scale:
Eviction Policy:
This detailed component design emphasizes the scalable and efficient handling of high read/write operations, which is fundamental for maintaining a responsive URL shortening service.
Each of these choices was made to align with the primary goal of creating a scalable, high-performance URL shortening service that can handle large volumes of requests efficiently while maintaining simplicity in management and deployment.
Explain any trade offs you have made and why you made certain tech choices...
In designing a URL shortening service, it's crucial to anticipate different failure scenarios and bottlenecks that could impact the system. Here are some possible issues and considerations:
By planning for these scenarios, the aim is to create a robust URL shortening service that maintains high availability and performance, even in adverse conditions.