Design Twitter Search
HardSystem design · Search
Design search for a Twitter-like product (~500M new posts/day, 20K queries/s). Users search recent and top posts by keyword, hashtag or account. New posts must be searchable within ~10 seconds, deletes must take effect immediately, and ranking blends recency, engagement and text relevance. Cover the ingest path into the index, index sharding and replication, backfills, abuse filtering and trending queries.
Requirements
- Support near-real-time indexing of new posts
- Handle ranking by recency, engagement, and text relevance
- Discuss inverted indexes, shard strategy, replication, and backfills
- Plan for deletions, abuse filtering, and trending queries