Design Twitter Search

Problem Statement:


Step-1: What is Twitter Search ?


Step-2: Requirements and Goals of the System


Step-3: Capacity Estimation and Constraints

Storage Capacity:


Step-4: System APIs

a) Search API


Step-5: High Level Design


Step-6: Detailed Component Design

1) Storage:
How can we create system wide unique StatusIDs ?


2) Index:


Note:- We can shard our data based on two criteria.

Sharding based on Words:
Sharding based on the status object:


Step-7: Fault Tolerance

What will happen when an index server dies ?
What if both primary and secondary servers die at the same time ?


Step-8: Cache


Step-9: Load Balancing


Step-10: Ranking




← Previous: Design API Rate Limiter

Next: Design Web Crawler →