Programming, Web News, Web Hostings, Technology
Archive for November, 2008
Distributed “Twitter-Style” Database Design
Nov 1st
Wondering Twitter How’s…
I am really wondering how Twitter handle large volumns of requests every millisecond. Just imagine 350,000 twitter users posting one message at the same millisecond, there are total 350,000 requests to handle immediately. Let’s say Ervin Ter following Mr John Doe, once I viewing message posted by him, I am expecting to read his latest messages.
My Design
Index Server
Containing user information such as email, password and total count of message posted by each user. Because this is distributed server design to handle large scale of requests at the same time, I created a table to store server information such as IP address and database server credential information’s. Every user’s message are storing in different servers by a user agent.
Machine A to Z
Every user’s messages are storing in the dedicated server. There are two “DEMON” who sitting to handle events, one will broadcast message to all other servers who are listening to this “DEMON”, another one will wait for new message to arrive. The relationship between users storing in ca_follow.
If you understand the concept of twitter, you probably should know the diagram design above. I am looking to hear what is your thought.
More about twitter database design articles:
- Twitter and the Architectural Challenges of Life Streaming Applications

