Design Evaluation of the Typeahead Suggestion System

Let's evaluate the design of the typeahead suggestion system based on the non-functional requirements.

Fulfilling requirements

The non-functional requirements of the proposed typeahead suggestion system are low latency, fault-tolerances, and scalability.

  • Low latency: There are various levels at which we can minimize the system’s latency.

    • By reducing the depth of the tree, which reduces traversal time.

    • Updating trie offline is also one of the reasons to reduce latency. This time taken by the update operation is not on clients’ critical path.

    • Through geographically distributed application and database servers. This way the service is provided near the user which also reduces communication delay aiding in reducing latency.

    • Using Redis and Cassandra cache clusters on top of NoSQL database clusters.

    • Due to appropriate partitioning of tries, the load will be properly distributed resulting in better performance.

  • Fault-tolerance: Since the replication and partitioning of the trees (trie) are provided; therefore, the system will operate with high resilience. If one server (primary or secondary) fails, others will be on standby to deliver the services.

  • Scalability: Since our proposed system is flexible; therefore, more servers can be added or removed as the load increases. For example, if the number of queries increases, the number of partitions/shards of trees can be increased accordingly.

Create a free account to access the full course.

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