6 Tweets 40 reads Apr 26, 2022
How does Twitter work? Letโ€™s take a look at it from the architectural point of view before Elon takes it.
๐“๐ก๐ž ๐‹๐ข๐Ÿ๐ž ๐จ๐Ÿ ๐š ๐“๐ฐ๐ž๐ž๐ญ:
1๏ธโƒฃ A tweet comes in through the Write API.
2๏ธโƒฃ The Write API routes the request to the Fanout service.
#twitter #systemdesign
3๏ธโƒฃ The Fanout service does a lot of processing and stores them in the Redis cache.
4๏ธโƒฃ The Timeline service is used to find the Redis server that has the home timeline on it.
5๏ธโƒฃ A user pulls their home timeline through the Timeline service.
๐’๐ž๐š๐ซ๐œ๐ก & ๐ƒ๐ข๐ฌ๐œ๐จ๐ฏ๐ž๐ซ๐ฒ
๐Ÿ”น Ingester: annotates and tokenizes Tweets so the data can be indexed.
๐Ÿ”น Earlybird: stores search index.
๐Ÿ”น Blender: creates the search and discovery timelines.
๐๐ฎ๐ฌ๐ก ๐‚๐จ๐ฆ๐ฉ๐ฎ๐ญ๐ž
๐Ÿ”นHTTP push
๐Ÿ”นMobile push
Disclaimer: This article is based on the tech talk given by Twitter in 2013 (bit.ly). Even though many years have passed, itโ€™s still quite relevant. I redraw the diagram as the original diagram is difficult to read.
Over to you:
What are some of the biggest differences between Twitter and Facebook that might shape their system architectures?
If you found this thread helpful, follow me
@alexxubyte for more.
Retweet the first tweet to help more people to learn system design.

Loading suggestions...