From this system design, I’ve learnt by sharding on TweetID it would avoid hotspot that can be caused by sharding by user id. This is understood. If we use Cassandra as nosql database for restoring/restriving tweetid and use tweeid as as partition, how to formulate the query? In this case, where clause must be on the partition key not user id. I would assume the steps are: get the followers from the user, the retrieve tweets id from the followers. I am not able to formulate the query when partition id is not user id.
Type your question above this line.