Design a URL Shortener
Design a URL-shortening service like bit.ly: generating short codes, storing mappings, and redirecting with low latency. Cover capacity estimation, the read/write ratio, hot links, and how you would add per-link analytics without slowing down redirects.