Loading...
The main functions of Twitter will be -
The users of this system will be logged in/out users
Performance -
Scalability -
the system should be able to support -
Reliability -
POST /tweets/{tweet_id} body={tweet-body}
POST /likes/{tweet-id}&liked_by={user-id}
PUT /shares/{tweet-id}&shared_by={user-id}
GET /timeline/
No SQL such as MongoDB/DynamoDB for having support on big data and high horizontal scale. we must have many read replicas, write replicas will be sharded by a hash that has both the tweet id and number of replicas for avoiding rebalancing issues.
Entities -
Tweets table -
Likes table -
Shares table -
Users table -