Design a TinyURL-like short link service

Read the full interview experience this question came from →

Quick Overview

This question evaluates competency in system design and distributed systems, covering API design, data modeling, unique key-generation and collision handling, caching and storage choices, TTL/expiration semantics, and scalability/high-availability considerations.

Design a TinyURL-like short link service

Company: ByteDance

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Technical Screen

Design a TinyURL-like service that generates short URLs and redirects users to the original long URLs. Requirements: - Provide APIs to create a short link and to resolve (redirect) a short link. - Short links must be reasonably short (e.g., 6–10 characters) and unique. - The system should handle collisions (e.g., if hashing or random IDs collide). - Support optional TTL/expiration for short links. - The service should be scalable and highly available. Discuss data model, key generation strategy, storage/cache (e.g., Redis), collision handling, and how redirects work end-to-end.

Overview: This question evaluates competency in system design and distributed systems, covering API design, data modeling, unique key-generation and collision handling, caching and storage choices, TTL/expiration semantics, and scalability/high-availability considerations.

Read the full ByteDance Software Engineer interview experience this question came from

|Home/System Design/ByteDance
ByteDance logo
ByteDance
Feb 28, 2026
mediumSoftware EngineerTechnical ScreenSystem Design
9
0

Design a TinyURL-like service that generates short URLs and redirects users to the original long URLs.

Requirements:

  • Provide APIs to create a short link and to resolve (redirect) a short link.
  • Short links must be reasonably short (e.g., 6–10 characters) and unique.
  • The system should handle collisions (e.g., if hashing or random IDs collide).
  • Support optional TTL/expiration for short links.
  • The service should be scalable and highly available.

Discuss data model, key generation strategy, storage/cache (e.g., Redis), collision handling, and how redirects work end-to-end.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...