SpinTheMic
Pro

Interview practice question

Expiring short links

System Design · Design: Social and Messaging · Beginner

Some short links should expire after 30 days. How would you add expiry to your URL shortener?

What a strong answer covers

Your AI report card counts how many of these ideas you cover.

  • Store expires_at with mapping.
  • Check expiry on redirect.
  • TTL in database/cache.
  • Background cleanup job.
  • Return 404/410 for expired links.
Practise this topic

Start without signing up. Sign in free to get an AI report card on your answer.

See all topics