InterviewLegend

Design a URL Shortener (aka.ms)

Signature problem
Alex Chen55 min readAdded 1,382 real interview reports

A URL shortener stores one mapping, short code to long URL, and serves it back billions of times. The create path is small. The redirect path is where the traffic is, and the code generator is where the interesting distributed-systems problem hides. aka.ms is Microsoft's own short-link service. It redirects to Microsoft pages and supports custom aliases, so a link can read aka.ms/some-name instead of random characters. The same prompt also arrives as "design TinyURL" or "design Bitly", and then it's sized like a public service with a hundred million new links a day. That's the version below, because it's the one that makes the numbers and the deep dives matter.

The Microsoft angle
Most Microsoft reports of this prompt come from SDE II loops (L61 and L62). One L62 candidate called it a simple problem that became a long discussion because the interviewer wanted more than textbook answers. Have the standard design ready in fifteen minutes and keep the rest for ID generation, caching and scale.

MicrosoftPremium lesson · System design round

The Microsoft design, worked end to end.

  1. The API and data modelSystem design · Signature problem
  2. The design, drawn out1 diagram
  3. 7 deep divesWith the tradeoffs
Get the Microsoft questions

$49 a year · all 107 companies · instant access

1,382 Microsoft interview reports · guide updated

Microsoft interview guide

Know what Microsoft asks before you walk in.

21 coding · 9 system design · 24 behavioral questions

Get Premium$49 a year · Instant access
Or start freeNo card.

Get their questions first.

Had your Microsoft interview?How we research

InterviewLegend is independent and not affiliated with or endorsed by any company it covers.