Design a URL Shortener (TinyURL/bit.ly)
Design a scalable URL shortening service handling 100M daily URL creations and 10B daily redirects with sub-100ms latency and 99.9% availability.
1.1 Clarifying Questions & Requirements
1.2 Back-of-the-Envelope Calculations
Traffic & Request Volume
Storage Requirements
Infrastructure Estimates
Monthly Operating Costs
Interview Practice Questions
Practice these open-ended questions to prepare for system design interviews. Think through each scenario and discuss trade-offs.
Global Scale URL Shortener: Design a URL shortener supporting 100B URLs with global distribution across 15 regions. Address unique ID generation, cross-region replication, cache consistency, and 99.99% availability requirements.
Analytics & Business Intelligence: Build a comprehensive analytics system for URL shortener that tracks clicks, geography, devices, referrers with real-time dashboards. Handle 1B+ daily events with sub-second query latency for business metrics.
Security & Content Moderation: Implement URL safety checking, malware detection, phishing prevention, and abuse protection. Address real-time threat detection, content analysis, user reporting, and automated moderation workflows.
Enterprise Features: Design enterprise-grade URL shortener with custom domains, branded links, team management, SSO integration, advanced analytics, and white-label solutions. Address multi-tenancy, billing, and enterprise security requirements.
Mobile SDK & API Platform: Build mobile SDKs and API platform for URL shortener with offline support, conflict resolution, rate limiting, authentication, and developer tools. Address SDK performance, API versioning, and developer experience.
Machine Learning Integration: Integrate ML for click prediction, fraud detection, optimal expiration, and personalized analytics. Address feature engineering, model serving, A/B testing, and real-time inference at scale.