Evaluation of TinyURL

Let's evaluate the short URL service design based on non-functional requirements.

Fulfilling requirements

The last stage of a system design is to evaluate it as per the non-functional requirements mentioned initially. Let’s look at each metric one by one.

Availability

We need high availability for users generating new short URLs and redirecting them based on the existing short URLs.

Most of our building blocks like databases, caches, and application servers have replication built-in that ensures availability and fault-tolerance. The short URL generation system will not impact the availability either as it depends on an easily replicable database of available and used unique IDs.

To handle disasters, we can perform frequent backups of the storage and application servers, preferably twice a day, as we can not risk losing URLs data. We can use the Amazon S3 storage service for backups, as it facilitates cross-zonal replicating and restoration as well. In the worst-case scenario, we might lose 3.3 million (6.6 M daily requests assumed) newly generated short URLs that are not backed up on that specific day.

Our design uses global server load balancing (GSLB) to handle our system traffic. It ensures intelligent requests distribution among different global servers; especially in the case of failures at a site.

We also apply a limit on the requests from clients to secure the intrinsic points of failures. To protect the system against DoS attacks, we have used rate limiters between the client and web servers to limit each user’s resource allocation. It will ensure a good and smooth traffic influx and mitigate the exploitation of system resources.

Create a free account to access the full course.

By signing up, you agree to Educative's Terms of Service and Privacy Policy