Skip to content

Design a URL Shortener, stage 7 of 9: break it

Take down a malicious link everywhere

The database now says the link is disabled. But the redirect has been copied to other places.

System so far· 8 parts
12345678CLIENTClickersEDGECDN edgeSERVICERedirect serviceDATABASEPostgresSERVICELinks APICLIENTCustomerdashboardLOG / STREAMClick streamWORKERClick aggregator

Select a component to see what it is responsible for and which state it owns.

  1. 1Clickers → CDN edge: GET /aZ3kQ9x
  2. 2CDN edge → Redirect service: Cache miss
  3. 3Redirect service → Postgres: Look up code
  4. 4Customer dashboard → Links API: Create, edit, disable
  5. 5Links API → Postgres: Insert with unique code
  6. 6Redirect service → Click stream: Click event (fire and forget)
  7. 7Click aggregator → Click stream: Read click batches
  8. 8Click aggregator → Postgres: Upsert daily aggregates
  • Request / response
  • Asynchronous

What you need to know

0 of 2 checks done
  1. Think first

    List every place a copy of this redirect might still exist after the database row is disabled.