InterviewLegend

Design a URL Shortener

Commonly asked
Alex Chen26 min readUpdated 392 real interview reports

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.

The Goldman Sachs angle
Goldman runs this as a low-level design round, so build the object model and defend every choice inside it. The panel is a lead who has written services like this, and the round is senior-gated: it appears from Associate up and carries real weight at VP level. That shapes what lands. Name the pieces, a code generator, a mapping store, a cache, a rate limiter, and say why each one earns its place. Pick a store and say what it costs you. Then hold the line when the interviewer narrows in, because this round bleeds into fundamentals fast. How does the counter behave under many threads? What does the database guarantee on a unique constraint? Why is the redirect a cache-first read?

Goldman SachsPremium lesson · System design round

The Goldman Sachs design, worked end to end.

  1. The design, drawn outSystem design · 1 diagram
Get the Goldman Sachs questions

$49 a year · all 100 companies · cancel anytime

From 392 Goldman Sachs reports, forum threads behind logins and write-ups in Chinese.

Had your Goldman Sachs interview?Tell us what they asked. Reviewed before it goes in, never with your name.
Goldman Sachs interview guide

Know what Goldman Sachs asks before you walk in.

16 coding · 3 system design · 22 behavioral questions

Get Premium$49 a year · Cancel anytime
Or start freeNo card.

Get their questions first.

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