System Design - Keyword Search w/o ElasticSearch Flashcards
You want to get into a pattern of identifying bottlenecks in the system and then optimizing. The more rapidly you’re able to do this, the deeper you’ll get into the problem.
Keep going. You got this!
Quick estimations can help you focus on the most critical aspects of the system and avoid spending time on less important areas. They can also help you identify and solve bottlenecks more effectively.
=)
Create a Reverse Index
Keyword -> post IDs
need to update this when someone creates a post
have a cache of the keyword -> post_ids
Use Redis for the keyword -> posts.
You can have 2 data structures.
A list for the most recent posts. And keep appending to it.
Use a sorted set for the Likes.
Possibly
Create