16
How would you design a URL shortener?
Tap to write answer
0 words | 0 charsPress Enter ↵ to reveal
Your Attempt
0 wordsRefined Model Answer
ReferenceConvert an auto-incrementing 64-bit integer ID into a alphanumeric short string using Base62 encoding. To eliminate database write bottlenecks caused by generating sequential IDs at high volumes, implement a distributed unique ID allocator system (like Apache ZooKeeper) to hand out discrete ID ranges to independent worker application servers. Store the core key-value mappings inside an optimally sharded NoSQL store like Google Cloud Bigtable, and cache hot mappings using a global edge CDN network to handle heavy read traffic.