PracHub
QuestionsPremiumLearningGuidesCheatsheetNEWCoaches
|Home/System Design/Coinbase

Design a scalable URL shortener with expiration and security

Last updated: Mar 29, 2026

Quick Overview

This question evaluates competency in large-scale system design and distributed systems, covering data modeling and TTL handling, storage and indexing, caching and consistent hashing, token generation and security, cross-region replication, operational concerns like rate limiting and observability, and capacity/SLO estimation.

  • hard
  • Coinbase
  • System Design
  • Software Engineer

Design a scalable URL shortener with expiration and security

Company: Coinbase

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

Design a URL shortening service for hundreds of millions of users. Requirements: - Generate short URLs and redirect to original URLs. - Enforce per-link expiration; expired links must not resolve. - Provide high concurrency and thread/process safety with low-latency redirects. - Sustain at least 100,000 requests per second. Answer the following: 1) What data model, storage schema, and indexing would you use, and how would you implement TTL handling efficiently? 2) How would you generate collision-resistant, non-enumerable tokens? Discuss randomness, length, and access controls. 3) How would you clean up expired data efficiently? Compare lazy deletion versus scheduled batch sweeps and their impact on cache and storage. 4) How would you scale reads/writes with distributed caching and consistent hashing? Include cache invalidation and hot-key mitigation. 5) How would you design cross–data center replication and consistency guarantees for create/read operations, including handling propagation delay, failover, and conflict resolution? 6) What APIs, rate limiting, abuse prevention, and observability (metrics, logs, alerts) would you implement? 7) Provide capacity estimates (QPS, storage, bandwidth) with back-of-the-envelope calculations and SLOs for latency and availability.

Quick Answer: This question evaluates competency in large-scale system design and distributed systems, covering data modeling and TTL handling, storage and indexing, caching and consistent hashing, token generation and security, cross-region replication, operational concerns like rate limiting and observability, and capacity/SLO estimation.

Related Interview Questions

  • Design Crypto Order Routing - Coinbase (hard)
  • Design a crypto trading web frontend - Coinbase (hard)
  • Design query pagination for large datasets - Coinbase (medium)
  • Design a food delivery system - Coinbase (medium)
  • Design real-time crypto prices homepage - Coinbase (hard)
Coinbase logo
Coinbase
Aug 12, 2025, 12:00 AM
Software Engineer
Onsite
System Design
2
0

System Design: URL Shortening Service at Internet Scale

You are asked to design a URL shortening service for hundreds of millions of users with high availability and low latency. The system must support at least 100,000 requests per second (RPS).

Functional and Non-Functional Requirements

  • Create short tokens for long URLs and redirect requests to their original URLs.
  • Enforce per-link expiration; expired links must not resolve.
  • High concurrency; thread/process safe with low-latency redirects.
  • Sustain ≥100k RPS overall.

Questions

  1. Data model, storage schema, and indexing: What would you use, and how would you implement TTL handling efficiently?
  2. Token generation: How would you generate collision-resistant, non-enumerable tokens? Discuss randomness, length, and access controls.
  3. Expired data cleanup: How would you clean up expired data efficiently? Compare lazy deletion versus scheduled batch sweeps and their impact on cache and storage.
  4. Scaling reads/writes: How would you use distributed caching and consistent hashing? Include cache invalidation and hot-key mitigation.
  5. Multi-region: How would you design cross–data center replication and consistency guarantees for create/read operations, including handling propagation delay, failover, and conflict resolution?
  6. External interface and operations: What APIs, rate limiting, abuse prevention, and observability (metrics, logs, alerts) would you implement?
  7. Capacity and SLOs: Provide back-of-the-envelope capacity estimates (QPS, storage, bandwidth) and SLOs for latency and availability.

Solution

Show

Comments (0)

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Coinbase•More Software Engineer•Coinbase Software Engineer•Coinbase System Design•Software Engineer System Design
PracHub

Master your tech interviews with 7,500+ real questions from top companies.

Product

  • Questions
  • Learning Tracks
  • Interview Guides
  • Resources
  • Premium
  • For Universities
  • Student Access

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • Compare Platforms
  • Discord Community

Support

  • support@prachub.com
  • (916) 541-4762

Legal

  • Privacy Policy
  • Terms of Service
  • About Us

© 2026 PracHub. All rights reserved.