0% completed
Designing Twitter Search
Every case study in this chapter follows the same seven steps from System Design Interviews: A step by step guide, and builds its design from the components in the System Design Master Template. Keep both open beside you, and try each problem yourself before reading the solution.
.....
.....
.....
andreachiou88
· a year ago
For the tweets storage, we assumed a server could store 4 TB. For the index, we're assuming a high end server stores a max of 144 GB. Why the difference? Essentially storing text; should be the same/similar?
L L
· 2 years ago
How can we efficiently retrieve a mapping between tweets and the index server? We have to build a reverse index that will map all the TweetID to their index server. [...] We will need to build a Hashtable where the ‘key’ will be the index server number and the ‘value’ will be a HashSet containing all the TweetIDs
First of all, I think there's a mistake in the first part, the mapping is between the index servers and the tweets, not the other way around.
Second, instead of adding yet another mapping (which would also need to be fault tolerant), wouldn't it be simpler to use a Write-Ahead Log (WAL)? Whenever we use an index server to map a given word to a tweet, we can log it to disk in a location dedicated to that index server. If both the leader and the replica of the index se
Jonathan Morales
· 2 years ago
Is there anyway the author can update this section and add the functional and non-functional requirements for this system design ?
surajwankhade56
· 2 years ago
No mention of latency here. This should be the core problem.
singeeking
· 4 years ago
In "Designing Twitter Search", I think the article only said how to search by a word, not words (sentences). But the API design has a search param "search_terms" string containing the search terms (maybe some words?).
Is there a lack? Or am I misunderstanding something?
Harris
· 4 years ago
can zookeeper replace inddex-builder server?
Gary
· 4 years ago
What is stored on each of the index servers when you shard based on tweet object? Is it still a big hash table with key = word, value = set of tweet ids containing that word? Or something else? How does this differ from sharding by word?
Raj
· 4 years ago
Can you explain how you came up with this math of 5 bytes number to identify the tweetid's uniquely
If we are getting 400M new tweets each day, then how many tweet objects we can expect in five years? 400M * 365 days * 5 years => 730 billion
This means we would need a five bytes number to identify TweetIDs uniquely.
Reading Progress
0%