Introducing SURL ๐ŸŽŠ Shorten your URL

Shorten your URL using SURL

Introducing SURL ๐ŸŽŠ Shorten your URL

Subscribe to my newsletter and never miss my upcoming articles

Listen to this article

We all are aware of different URL shortening services like bit.ly, TinyURL etc. I was thinking of building a similar application as it seems very simple but it is very challenging when you consider scalability and reliability. Finally, I got the opportunity to build the application because of #harperdbhackathon and it is here.

Introducing SURL ๐ŸŽŠ

s1.png

You can try it out here: surl.bibekkakati.me


- What is SURL
- Why I created SURL
- How to use
- Current Features
- System Overview
- Project Code
- Tech Stack
- Upcoming Features
- Challenges
- Live Demo

What is SURL? ๐Ÿ”—

It is a web-based URL shortening service where user can generate a shorter form of their long URL.

Why I created SURL? โœจ

The reason behind creating this service is that I have always been fascinated with the working, implementation and management of this kind of services because of its backend engineering, system design, scalability related complexities.

s2.png

How to use? ๐Ÿ“™

  • Go to surl.bibekkakati.me

  • Paste your long URL

  • Once a short URL is generated, it will be shown on the screen

  • Click it to copy to clipboard

ss3.png

Current Features ๐Ÿ’ก

  • Generate a short URL instantly.

  • Most important feature ๐Ÿ˜‰ dark and light mode.

  • Check the total URL hits by going to the /hits path of your short URL.

If your short URL is https://surl.bibekkakati.me/h0QuiOk, then go to https://surl.bibekkakati.me/h0QuiOk/hits.

System Overview ๐Ÿ‘€

Two services are there:

  • SURL service is the main client-facing service, which is responsible for serving static files and issuing a short URL against a provided long URL by the user with the help of an API. The service is built by keeping scalability in mind so we can deploy multiple instances of this service without any issue to balance the incoming request load.

  • KeyGen service is a standalone service that is responsible for generating unique keys for all the active SURL service. It generates 100,000 unique keys on request from any SURL service and returns the keys in response. Both the service communicate using gRPC.

Caching is used for faster access and to reduce the load on the database.

Project Code ๐Ÿ‘จโ€๐Ÿ’ป

Tech Stack ๐Ÿ’ป

  • Node.js (Express.js) - Backend framework

  • HarperDB - Database

  • Nginx - Proxy Server

  • Azure Cloud - Deployment

Upcoming Features ๐Ÿ”ฎ

  • User authentication

  • Dashboard

  • Custom short URL.

  • Analytics like unique visits, visitor's country, city etc.

  • QR-Code for short URL

  • Private URL i.e, a visitor needs permission to access it or an access code.

Challenges

  • Building a reliable and fast system.

  • Tuning the server to handle larger concurrent users. Still trying to get a better result.

  • Generating unique keys (short URL), which I achieved with the counter based approach.

KeyGen service assures that the same key will not be generated more than once.

Live Demo ๐Ÿ‘‡

https://surl.bibekkakati.me


Thank you for reading ๐Ÿ™

If you enjoyed this article or found it helpful, give it a thumbs-up ๐Ÿ‘

Feel free to connect ๐Ÿ‘‹

Twitter | Instagram | LinkedIn

Interested in reading more such articles from Bibek Kakati?

Support the author by donating an amount of your choice.

Recent sponsors
#nodejs#express#javascript#web-development#harperdbhackathon