PracHub
QuestionsCoachesLearningGuidesInterview Prep
|Home/System Design/Microsoft

Design a URL Shortener

Last updated: Jun 17, 2026

Quick Overview

This question evaluates a candidate's ability to design a scalable, highly available URL-shortening service, testing competencies in API design, short-code generation, storage schema, redirect flow, caching, scaling, expiration handling, and abuse prevention.

  • hard
  • Microsoft
  • System Design
  • Software Engineer

Design a URL Shortener

Company: Microsoft

Role: Software Engineer

Category: System Design

Difficulty: hard

Interview Round: Onsite

Design a URL-shortening service similar to TinyURL. The service should accept a long URL and return a short code, and later redirect requests for that short code to the original URL. Assume tens of millions of new URLs are created per day, and read traffic is much higher than write traffic. Discuss the API design, short-code generation strategy, storage schema, redirect path, caching, scaling, availability, expiration handling, and abuse prevention.

Quick Answer: This question evaluates a candidate's ability to design a scalable, highly available URL-shortening service, testing competencies in API design, short-code generation, storage schema, redirect flow, caching, scaling, expiration handling, and abuse prevention.

Related Interview Questions

  • Design a URL Shortener (High-Level and Low-Level Design) - Microsoft (medium)
  • Design a To-Do List Service (CRUD, Auth, Rate Limiting, Caching & API Versioning) - Microsoft (medium)
  • Design a Distributed Key-Value Store - Microsoft (medium)
  • Externally Sort a 500 GB CSV by One Column with 16 GB of RAM - Microsoft (medium)
  • Design a Metrics Ingestion Pipeline - Microsoft (medium)
|Home/System Design/Microsoft

Design a URL Shortener

Microsoft logo
Microsoft
Mar 20, 2026, 12:00 AM
hardSoftware EngineerOnsiteSystem Design
7
0
Loading...

Design a URL-shortening service similar to TinyURL. The service should accept a long URL and return a short code, and later redirect requests for that short code to the original URL. Assume tens of millions of new URLs are created per day, and read traffic is much higher than write traffic. Discuss the API design, short-code generation strategy, storage schema, redirect path, caching, scaling, availability, expiration handling, and abuse prevention.

Submit Your Answer to Earn 20XP

Sign in to leave a comment

Loading comments...

Browse More Questions

More System Design•More Microsoft•More Software Engineer•Microsoft Software Engineer•Microsoft 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
  • Student Access

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.