...

/

Design a URL Shortening Service / TinyURL

Design a URL Shortening Service / TinyURL

Learn to design a system similar to TinyURL.

Introduction

URLUniform Resource Locator (URL), is an address that uniquely identifies a resource on the web. shortening is a service that produces short aliases for long URLs, commonly referred to as short links. Upon clicking, these short links direct to the original URLs. The following illustration depicts how the process works:

Press + to interact
How URL shortening service works
How URL shortening service works

Requirements

We have categorized our requirements into the following two categories:

Functional requirements

We need to define some functionalities which we will need, and some of the general requirements are the following:

  • Short URL generator: This functionality should generate a short URL alias of the specified URL but should be unique.
  • Redirection: This functionality should redirect the short URL to the actual URL so the request can be successfully entertained.
  • Customized short URL: This functionality should allow the user to generate unique and customized short URL alias of the original URL.
  • Deletion: This functionality should allow users to delete the generated short URL.
  • Updation: This functionality should allow the user to update the original URL associated with it.
  • Expiry time: This functionality should allow users to set the expiry time of the generated short URL.

Non-functional requirements

We have decided that our system should have the following behavior, which is not functional:

  • Availablity: We want our system to be available at all times at any cost because we want our users to access any URL anytime.
  • Scalability: We want our system to be capable enough to handle an increasing number of URLs.
...
Access this course and 1400+ top-rated courses and projects.