Twitter System Architecture: Read Path
A structured reconstruction of the system components and data flow from the whiteboard design review.
graph TD
Client[Clients: Web App, Android, iPhone] --> FE[Twitter Front End]
FE --> GraphQL[GraphQL / Federated Router]
FE --> TLSAPI[HTTP TLS-API - deprecated]
GraphQL --> Strato[Strato Column]
GraphQL --> TweetHydration[Tweet/User Content Hydration]
GraphQL --> Visibility[Visibility Filtering]
TLSAPI --> TimelineMixer
GraphQL --> TimelineMixer
TimelineMixer --> HomeMixer[Home Mixer]
TimelineMixer --> Ads[Ad Mixer]
TimelineMixer --> People[People Discovery]
HomeMixer --> Manhattan[(Manhattan KV Store)]
HomeMixer --> Gizmoduck[Gizmoduck User Profile]
HomeMixer --> SocialGraph[Social Graph]
HomeMixer --> TweetPie[Tweety Pie]
HomeMixer --> HomeRanker[Home Ranker]
HomeRanker --> HomeScorer[Home Scorer]
HomeScorer --> Prediction[Prediction Service]
HomeRanker --> CrMixer[CrMixer]
HomeRanker --> EarlyBird[EarlyBird Search]
HomeRanker --> Uteg[Uteg Engagement Graph]
HomeRanker --> Space[Space Audio]
classDef client fill:#f9f,stroke:#333,stroke-width:2px;
classDef frontend fill:#ff9,stroke:#333,stroke-width:2px;
classDef router fill:#d4f1f4,stroke:#333,stroke-width:2px;
classDef mixer fill:#befabe,stroke:#333,stroke-width:2px;
classDef ranker fill:#ffcc99,stroke:#333,stroke-width:2px;
classDef storage fill:#ff9999,stroke:#333,stroke-width:2px;
classDef service fill:#e1bee7,stroke:#333,stroke-width:1px;
class Client client;
class FE frontend;
class GraphQL,TLSAPI router;
class TimelineMixer,HomeMixer,Ads,People mixer;
class HomeRanker,HomeScorer ranker;
class Manhattan storage;
class Strato,TweetHydration,Visibility,Gizmoduck,SocialGraph,TweetPie,Prediction,CrMixer,EarlyBird,Uteg,Space service;Next-Gen System Direction
The architecture outlines a transition path (marked by dashed lines) moving towards a consolidated structure involving unified mixers, Thrift RPC-based downstream scoring, and the deprecation of legacy TLS-API HTTP pathways in favor of federated GraphQL layers.
1. Clients & Edge API
Supported Platforms
- Web
- Android
- iPhone
Gateway Entry
- Twitter Front-end
Protocols / Router Pathways
-
GraphQL / Federated (iPhone, Web)
- Strato Column
- Tweet / User Content Hydration
- Visibility Filtering
-
HTTP TLS-API (Android)
Being Deprecated
2. Timeline Mixer
Responsible for orchestrating timeline assembly and applying initial product rules.
Key Functions
- Inject Ads, Who-to-Follow, Onboarding
- Conversation Module
- Cursoring / Pagination
- Tweet Deduplication
- Served Data Logging
Upstream Services
- People Discovery Service
- Ad Mixer
- Onboarding Service
3. Home Mixer
Handles home timeline generation and routes directly to key key-value stores and core entities.
Direct Downstream Stores
- Manhattan (Distributed Key-Value Store)
- Gizmoduck (User Profile Service)
- Social Graph (User connections & graph data)
- Tweety Pie (Tweet metadata & hydration)
4. Home Ranker & Scorer
Coordinates candidate generation, filtering, and machine learning scoring via Thrift RPC.
Home Ranker
- Candidate Fetch
Home Scorer
- Prediction Service
-
Feature Hydration
- Manhattan
- Memcache
5. Timeline & Scorer Services
Timeline Scorer
Dedicated system for evaluating, ranking, and ordering timeline items based on heavy scoring pipelines.
Timeline Service
Manages stateful timeline representations and caches for quick retrieval.
6. Candidate Services
Pipeline Stages
- Fetch → Feature → Scoring
Source Service Engines
- CrMixer
- EarlyBird (Search Index / Tweet Retrieval)
- Uteg (User Tweet Engagement Graph)
- Space (Audio Spaces candidate retrieval)
- Community
Deep Downstream
- Prediction Service