Design a URL Shortener
A Goldman panel that hands you a URL shortener wants one small service built cleanly, with every choice inside it defended. Nobody is asking you to scale a planet. The prompt is short. Take a long URL, hand back a short code, and when someone visits that code, send them to the original. Two operations, one mapping, and a pile of decisions underneath that separate an engineer who has shipped a service from one who has only sketched one.
The shortener earns its place in this round because it forces the low-level judgment Goldman grades without ever needing a firehose of traffic. There is a real key-generation decision: how do you turn a URL into a short, unique code, and what happens when two codes want to be the same. There's a real storage decision. The redirect is read almost all the time and written rarely, so the store you pick and the cache in front of it are graded choices. There is a real correctness boundary: a code must map to exactly one URL forever, because a link that silently changes where it points is worse than a broken one. Get those right and the design shows you've owned a service. Reach for a giant distributed diagram and you have answered a question nobody asked.
Goldman SachsPremium lesson · System design round
The Goldman Sachs design, worked end to end.
- The design, drawn outSystem design · 1 diagram
$49 a year · all 100 companies · cancel anytime
From 392 Goldman Sachs reports, forum threads behind logins and write-ups in Chinese.
Goldman Sachs interview guideKnow what Goldman Sachs asks before you walk in.
16 coding · 3 system design · 22 behavioral questions
Get their questions first.
InterviewLegend is independent and not affiliated with or endorsed by any company it covers.