System Design: Create a url shortening service (Part 1): Overview

URL shortening service like bit.ly or goo.gl are hugely popular. They simplify link sharing, analytics and much more. We’ll create one feature of these apps. Create a short url from the long url and returns the original url of a short url.

Designing the “right” system is hard. “Right” keeps on changing. Requirements change. Traffic pattern changes. The only thing that is constant is change.

The “right” for this service is:

  • System should be able to store “enough” urls
  • System should handle 10K request per second
  • 90 percent of all request should respond in less than 10ms for the read request
  • Save money when not receiving enough load

In the next few blog posts, We will create a system which:

  1. Given a long url, returns a short code for it.
  2. Given a short url, returns the long url if it exists or not found.
  3. Deploy this on AWS on a single EC2 instance.
  4. Auto scale the app based on the traffic.
  5. Load test the application.

Tech stack details:

The complete code can be found on Github.

This series is comprised of following parts:

If you found this story interesting or useful, please support it by clapping it👏 .

Senior Staff Engineer @freshworks. Ex-McKinsey/Microsoft/Slideshare/SAP, Tech Enthusiast, Passionate about India. Opinions are mine

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store