Katkat

Design a Production-Ready URL Shortener

RemitlySoftware Engineer · Onsite

Last updated

This question evaluates competency in designing a scalable, reliable, and secure production URL shortening service, covering API design, link data modeling and analytics, ID/token generation, caching and read/write paths, partitioning/replication/consistency choices, rate limiting and abuse mitigation, TTL handling and cleanup, and HA/DR and monitoring. Commonly asked in system design interviews to probe architectural trade-offs for high-read consumer services, it belongs to the System Design domain and emphasizes practical application of distributed systems and operational concepts rather than only conceptual theory.

Design a production-ready URL shortening service. Specify public APIs for creating, resolving, and managing short links (including optional custom aliases and expiration). Propose a database schema, an ID or token generation strategy with collision avoidance, and a read/write path with caching. Discuss partitioning, replication, and consistency, rate limiting and abuse/spam mitigation, analytics and click tracking, TTL handling and cleanup, and strategies for high availability, disaster recovery, and monitoring. Compare key trade-offs you would make under different traffic patterns.