PracHub
QuestionsLearningGuidesInterview Prep
|Home/System Design/Confluent

Design a Reliable URL Shortening Service

Last updated: Jul 22, 2026

Quick Overview

Design a high-read-volume URL shortening service from create and redirect APIs through collision-safe code generation, storage, partitioning, and caching. Cover expiration and deletion consistency, custom aliases, hot keys, regional availability, abuse controls, asynchronous analytics, and safe code-space migration.

  • medium
  • Confluent
  • System Design
  • Software Engineer

Design a Reliable URL Shortening Service

Company: Confluent

Role: Software Engineer

Category: System Design

Difficulty: medium

Interview Round: Onsite

# Design a Reliable URL Shortening Service Design a service that accepts a long URL and returns a short URL, then redirects short-code requests to the stored destination. Cover API design, code generation, storage, caching, expiration, abuse controls, availability, and scaling. State whether repeated submissions of the same destination should reuse a code and whether custom aliases are supported. Explain the redirect consistency users observe immediately after creation or deletion. ### Constraints & Assumptions - Redirect traffic is much larger than creation traffic. - Codes must be URL-safe and collisions must never silently overwrite another mapping. - Links may have optional expiration times. - Analytics can be asynchronous and must not delay redirects. ### Clarifying Questions to Ask - What traffic, latency, availability, and retention targets matter? - Are links editable, permanent, private, or scoped to an owner? - Must the service detect malicious destinations before redirecting? - Which redirect status code and cache behavior are required? ### What a Strong Answer Covers - Precise create, resolve, delete, and optional custom-alias APIs - Collision-safe ID or random-code generation - Durable key-value mapping, partitioning, cache policy, and negative-cache care - Expiration and deletion semantics across caches and replicas - Rate limiting, abuse review, observability, and asynchronous analytics ### Follow-up Questions - How would you migrate to a longer code space? - What happens when a popular link becomes a cache hot key? - How would you support region-local redirects after a control-plane outage? - How would you prevent enumeration of private links?

Quick Answer: Design a high-read-volume URL shortening service from create and redirect APIs through collision-safe code generation, storage, partitioning, and caching. Cover expiration and deletion consistency, custom aliases, hot keys, regional availability, abuse controls, asynchronous analytics, and safe code-space migration.

Related Interview Questions

  • Design an RSS News Feed Service - Confluent (medium)
  • Design a News Feed and Mail Service - Confluent (medium)
  • Design RSS Feed and Temporary Mail - Confluent (medium)
  • Design a temporary email service - Confluent (hard)
|Home/System Design/Confluent

Design a Reliable URL Shortening Service

Confluent logo
Confluent
Jan 1, 2026, 12:00 AM
mediumSoftware EngineerOnsiteSystem Design
0
0

Design a Reliable URL Shortening Service

Design a service that accepts a long URL and returns a short URL, then redirects short-code requests to the stored destination. Cover API design, code generation, storage, caching, expiration, abuse controls, availability, and scaling.

State whether repeated submissions of the same destination should reuse a code and whether custom aliases are supported. Explain the redirect consistency users observe immediately after creation or deletion.

Constraints & Assumptions

  • Redirect traffic is much larger than creation traffic.
  • Codes must be URL-safe and collisions must never silently overwrite another mapping.
  • Links may have optional expiration times.
  • Analytics can be asynchronous and must not delay redirects.

Clarifying Questions to Ask Guidance

  • What traffic, latency, availability, and retention targets matter?
  • Are links editable, permanent, private, or scoped to an owner?
  • Must the service detect malicious destinations before redirecting?
  • Which redirect status code and cache behavior are required?

What a Strong Answer Covers Guidance

  • Precise create, resolve, delete, and optional custom-alias APIs
  • Collision-safe ID or random-code generation
  • Durable key-value mapping, partitioning, cache policy, and negative-cache care
  • Expiration and deletion semantics across caches and replicas
  • Rate limiting, abuse review, observability, and asynchronous analytics

Follow-up Questions Guidance

  • How would you migrate to a longer code space?
  • What happens when a popular link becomes a cache hot key?
  • How would you support region-local redirects after a control-plane outage?
  • How would you prevent enumeration of private links?

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Confluent•More Software Engineer•Confluent Software Engineer•Confluent System Design•Software Engineer System Design

Your design canvas — auto-saved

PracHub

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

Product

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

Browse

  • By Company
  • By Role
  • By Category
  • Topic Hubs
  • SQL Questions
  • AI Coding 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.