Back to Interview Gym

URL Shortener Service

EasyDesign45 minutes

Problem Statement

Design a service that creates short URLs and redirects to original URLs. Consider API design, storage, ID generation, TTL, analytics, and scaling to handle millions of requests.

Key Expectations

  • API design for creating and resolving short URLs
  • Base62 encoding for short URL generation
  • Database schema for URL mappings
  • Caching strategy for popular URLs
  • Analytics and metrics collection

Key Components to Consider

Load BalancerAPI GatewayURL ServiceDatabaseCacheAnalytics

Ready to Start?

Once you start, the timer will begin. You can use the whiteboard to design your solution and take notes in the sidebar.

Session Notes

Notes are automatically saved as you type

💡 Interview Tips

1. Clarify Requirements (5 min)
Ask about scale, features, and constraints
2. Capacity Planning (5 min)
Estimate users, data, and throughput
3. High-Level Design (15 min)
Core components and data flow
4. Deep Dive (15 min)
Critical components and APIs
5. Scale & Optimize (5 min)
Bottlenecks and solutions