This is an interview question: design a distributed server for autocomplete.
I would answer this as follows:
AutoFill is a dictionary search for a given suffix. The dictionary should probably be organized as a trie. The dictionary is built from the most common queries, but this is another story.
Now I assume that the dictionary often does not change (for example, once a day, and not every millisecond). Thus, we can simply replicate the dictionary on several servers that process automatic requests (for example, using load balancing and circular policy).
We should also think of a dictionary, but this is another story.
Does it make sense? Am I missing something?
source
share