InterviewLegend

Design a URL Shortener

Sometimes asked
Alex Chen24 min readAdded 37 real interview reports

Candidates reported this prompt in HubSpot onsites between 2018 and 2021, in entry level, Software Engineer I and Software Developer loops in Cambridge, Dublin and elsewhere in the US. One 2021 candidate called it a problem HubSpot had been using for years. Nobody has reported it since. The 2025 reports name the Netflix-style streaming service and the weather CMS module, and a 2022 report adds the scalable web app, so work those three first and treat this as the fourth design. The tellings differ in what they stress. In 2020, one candidate was asked to start at a small scale and push toward billions of users. A 2021 version wanted both the frontend and the backend. The 2018 telling was about capturing click information and redirecting. Older reports mention the REST API, the database design and base-62 or base-64 ids.

This lesson frames the design around tracked marketing links. A marketer creates a short link for a campaign and drops it into an email. Later they want to know how many people clicked. That framing fits the 2018 version, and it makes click capture a real requirement instead of an afterthought. Check with your interviewer which framing they want before you commit to it. A plain shortener is a small problem. The hard parts are the redirect, which has to stay fast while every click gets recorded, and the growth path, where each jump in traffic breaks one specific piece.

The HubSpot angle
HubSpot's marketing email tool reports clicks on every link in a send, so redirect-plus-count is close to work the company does. One candidate described an interviewer cutting in mid-answer to switch to another component. Keep each piece explainable in two sentences so you can drop it and move.

HubSpotPremium lesson · System design round

The HubSpot design, worked end to end.

  1. Requirements and scopeSystem design
  2. The API and data model
  3. The design, drawn out1 diagram
  4. 5 deep divesWith the tradeoffs
Get the HubSpot questions

$49 a year · all 107 companies · instant access

20,000+ candidate reports · guide updated

HubSpot interview guide

Know what HubSpot asks before you walk in.

17 coding · 4 system design · 23 behavioral questions

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

Get their questions first.

Had your HubSpot interview?How we research

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