Lesson 11 of 15
31. Design a URL Shortener

31.10 What would you say in the last five minutes?

3 min read+10 XP

Step 6: Wrap-up (5 minutes)

A strong close names the weak spots before the interviewer does:

  • Bottleneck: the read path. Covered by Redis, replicas and an in-process cache for viral links.
  • Single points of failure: the ticket server (blocks buffer it; run it redundantly), the primary database (failover to a replica).
  • Abuse: rate-limit link creation per client (Chapter 25), and check new URLs against a malware list before saving them.
  • Next with more time: link expiry with a cleanup job, custom aliases (a uniqueness check on the alias), and a second region for disaster recovery (Chapter 29).

Memory code: "Name the weak spots before they do."