Loading...
GET /tweet/{id}
POST /tweet
POST /tweet/{id}/favorite
GET /feed
GET /users/{id}
GET /users/{id}/tweets
POST /users/{id}/follow
POST /users/{id}/unfollow
Tweet
Users
Feed
Followers
We should use a partitioning strategy to avoid hot keys (famous users can make partitions unbalanced)
Adding a salt to the userid can help prevent this
Requests are handled by different services so we can scale them independently
Feeds are generated asynchronously when tweets are posted. They are then cached as a single JSON
Frequent viewed tweets are also cached
Feed processing system: