Asked in Discovery Interview.

Non-functional:
- AP.
- low latency
- generated short link shouldn’t be guessable
DB:
High-level Design
- Encoding actual URL
- Considerations
- Multiple users encoding the same URL, we should return different short links.
- Generating keys offline
DB Partitioning and Replication
- Range based partitioning. Hot spot issue
- Hash-based partitioning. Consistent hashing
Cache
- Eviction: LRU
- Cache miss:
API: