Intermediate
Open
Pro
Custom Aliases, Expiry and Key Reuse
Two features are being added: custom aliases (sho.rt/summer-sale) and
per-link expiry.
- 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.
- Describe how expiry is enforced on the redirect path and how expired rows are cleaned up.
- Should expired keys be returned to the available pool? Argue both sides and give your recommendation.
Share this question