Dongfeng Gu

Twitter timeline architecture in 2012

- 2 mins

This post demonstrates the twitter timeline architecture in 2012 according to the video in here.

Picture

What will happen if a user posts a tweet

What will happen if a user retrieves his/her timeline

Timeline service will take the user id and figure out which Redis instance has that user’s timeline. Then, it will pull out the timeline for that user, which contains a list of tweet ids and user ids. After that, timeline service will call tweet service, user service, and few other services to compose a fully render JSON. Finally, it returns this JSON to the frontend.

What will happen if a user search in twitter

Blender will generate the query according to search content. Then it will hit every Earlybird instances and check if that instance has anything that matches the query. Finally, Blender will merge the result returned by Earlybird and response.

comments powered by Disqus
rss facebook twitter github youtube mail spotify instagram linkedin google pinterest medium vimeo