Backup of Evaluation

Evaluating the pre-defined metrics pertaining to the TinyURL design problem.

Fulfilling requirements

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

Availability

Our system needs to be available all the time, making availability one of the most important non-functional requirements. As a security measure, to protect the system against DoS attacks, we will be using 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. Once the system has imposed limitations on the client end, it needs to ensure it utilizes the resources appropriately and has backed up the database and cache servers to handle the fault tolerance conditions.

The load balancer will make sure it has an intelligent requests distribution system in place, distributing the requests to each available server based on the current load on that server.

Scalability

As the system demand grows, adding more resources to scale out the system is a necessary requirement. Since our system stores records for billions of URLs, running out of space in a database server wouldn’t be surprising. To counter such an issue, we can horizontally shard our database based on the following mechanisms: Hash-based partitioning. We take the hash of the short URL and assign the partition accordingly. To handle the case of overloaded partitions, we will use consistent hashing.

Create a free account to access the full course.

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