Search⌘ K
AI Features

Initial Design of Quora

Discover how to structure the initial System Design of a complex Q&A platform like Quora. Define the high-level architecture by selecting appropriate data stores and specialized caching systems. Learn to map core workflows and design the necessary APIs for posting and searching.

We'll cover the following...

  • <a href=”#Initial-design" aria-label=“Read more about Initial design” >Initial design
  • <a href="#Workflow" aria-label=“Read more about Workflow” >Workflow
  • <a href="#API-design" aria-label=“Read more about API design” >API design
    • <a href="#Post-a-question" aria-label=“Read more about Post a question” >Post a question
    • <a href="#Post-an-answer" aria-label=“Read more about Post an answer” >Post an answer
    • <a href="#Upvote-an-answer" aria-label=“Read more about Upvote an answer” >Upvote an answer
    • <a href="#Comment-on-an-answer" aria-label=“Read more about Comment on an answer” >Comment on an answer
    • <a href="#Search" aria-label=“Read more about Search” >Search
"

Initial design

The initial design of Quora consists of the following components:

  • Web and application servers: Web servers accept incoming HTTP requests and forward them to application servers for processing. They run manager processes that delegate work to worker processes on application servers through a routing layer. This routing layer manages task queues, where managers enqueue tasks and workers dequeue them for execution. Application servers may also maintain in-memory priority queues to differentiate request classes. The following diagram shows an abstract view of this architecture:

Web and application servers at Quora
Web and application servers at Quora
  • Data stores: Quora uses specific storage solutions based on data requirements:

    • Relational database (MySQL): Stores critical data requiring high consistency, such as questions, answers, comments, and votes.

    • NoSQL (HBase): Stores high-throughput data like view counts, ranking scores, and extracted features for recommendations. HBase supports the high-bandwidth requirements of big data processing and avoids the expensive recomputation of features.

    • Blob storage: Stores media files like videos and images.

  • Distributed cache: Quora employs ...