Evaluation of Quora Design

Learn how the proposed design fulfills the non-functional requirements.

Fulfilling requirements

We have used various techniques to fulfill our functional requirements. However, our final design needs to be evaluated for fulfilling the non-functional requirements. Below we highlight some of the mechanisms we have utilized to fulfill the non-functional requirements:

  1. Scalability: Our system is highly scalable for several reasons. The updated design uses powerful and homogeneous service hostsQuora now uses Amazon EC2 instances with 32 cores, a shared 20 MB cache, and high network throughput.. Quora uses powerful machines because service hosts use an in-memory cache, some level of queueing, maintain Master, Worker, and routing library. The horizontal scaling of these service hosts is convenient because they are homogeneous.

    On the database end, our design shards MySQL databases vertically, thus avoiding issues in scalability because of overloaded MySQL servers. To reduce complex join queries, tables anticipating join operations are placed in the same shard/partition.

    As mentioned earlier, vertical sharding may not be enough because each shard can grow large horizontally and for large MySQL tables, writing becomes a bottleneck. Therefore, our design may have to adhere to horizontal sharding, a well-known practice in database scaling.

  2. Consistency: Due to a variety of functionalities offered by Quora, different consistency schemes may be selected for different types of data. For example, certain critical data like questions and answers should be stored synchronously. In this case, performance can take a hit because users don’t expect instantaneous responses to their questions. i.e., a user may get a reply in five minutes, one hour, one day, or no response at all, depending on the user’s question and the availability of would-be answerers.

    Other data like view counts may not necessarily be stored synchronously because it is not a goal of the Quora service to ensure all users see the same number of views as soon as the question is posted. For such cases, eventual consistency is favored for improved performance.

    In general, our design is equipped with good techniques to reduce the user-perceived latency as a whole.

  3. Availability: Some of the main ideas to improve availability include isolation between different components, keeping redundant instances, using CDN, using configuration services like Zookeeper, and load balancers to hide failures from users.

Create a free account to access the full course.

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