System Design 101: Building a Scalable URL Shortener (Bitly Style)

A URL shortener seems like a weekend project: take a long URL, give it a random ID, and save it to a database. Easy, right?
​But what if…