PracHub
QuestionsPremiumCoachesLearningGuidesInterview 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 Scalable Web Crawler - Microsoft (medium)
  • Design User Re-engagement Notifications - Microsoft (medium)
  • Design a typeahead search service - Microsoft (hard)
  • Design a Secure Copilot API - Microsoft
  • Design a ChatGPT-like serving system - Microsoft (nan)
Microsoft logo
Microsoft
Mar 20, 2026, 12:00 AM
Software Engineer
Onsite
System Design
5
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.

Solution

Show

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
PracHub

Master your tech interviews with 8,000+ 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.