Evaluation of the Typeahead Suggestion System’s Design

Evaluate the design of the typeahead suggestion system based on the non-functional requirements of the system.

Fulfill requirements

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

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

    • Reduce the depth of the tree, which reduces the overall traversal time.
    • Update the trie offline, which means that the time taken by the update operation isn’t on the clients’ critical path.
    • Use geographically distributed application and database servers. This way, the service is provided near the user, which also reduces any communication delays and aids in reducing latency.
    • Use Redis and Cassandra cache clusters on top of NoSQL database clusters.
    • Appropriately partition tries, which leads to a proper distribution of the load and results in better performance.
  • Fault tolerance: Since the replication and partitioning of the trees are provided, the system operates with high resilience. If one server fails, others are on standby to deliver the services.

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

Level up your interview prep. Join Educative to access 80+ hands-on prep courses.