Paths Subjects Questions Quizzes Pricing Search
Intermediate Open Pro

Custom Aliases, Expiry and Key Reuse

Two features are being added: custom aliases (sho.rt/summer-sale) and per-link expiry.

  1. Write the exact logic (SQL or DynamoDB-style pseudocode) that reserves a custom alias safely under concurrent requests, and explain the race in the naive version.
  2. Describe how expiry is enforced on the redirect path and how expired rows are cleaned up.
  3. Should expired keys be returned to the available pool? Argue both sides and give your recommendation.

Share this question

← Back to Design a URL Shortener (bit.ly / TinyURL) practice

We use cookies for product analytics to improve OmniAtlas. See our Privacy Policy.