Question
Design a service that creates durable short links and resolves them with low latency under a read-heavy workload. ## Requirements - Define create, resolve, custom-alias, delete, and analytics APIs. - Generate compact identifiers with low collision risk and no single hot coordinator at target scale. - Preserve custom-alias uniqueness under concurrent requests. - Support expiry, abuse prevention, and safe-link checks. - Cache popular redirects without serving deleted or changed mappings indefinitely. - State traffic, data-retention, latency, and availability assumptions. Describe identifier generation, storage partitioning, caches, replication, and the redirect request path. Clarify whether links are immutable and which redirect status code is returned. ## Follow-ups 1. Prevent enumeration of private or newly created links. 2. Add click analytics without slowing redirects. 3. Support regional failover and custom domains. 4. Resolve a collision or alias race safely.