AVWBeta
ajad van wyk
About
Portfolio
Tech Stack
Blog
Gallery
Stimming
Resources
AVW
AVW
Get in touch

Let'sbuildsomethingremarkabletogether.

Start with the background, selected work, or the profile brief for a sharper read on the practice and the work behind it.

Get in TouchProfile Brief

Explore

About
Portfolio
Blog

Expertise

Finance & Investment
Legal Framework
AI & Innovation
Research & Writing

Resources

Browse Study Notes
Download LLM Profile
Tech Stack
Gallery

Trust

Email
Download Profile Brief
About AVW
Selected Work

Latest Notes

Archive

Phoenix

X Algorithm

Thunder

X Algorithm

X Algorithm — For You Feed

X Algorithm

AVWCape Town, South Africa

© 2026 Ajad Van Wyk. All rights reserved.

Back to Resources
X Algorithm

Thunder

15 Apr 2026
2 min read
recommendation-systemx-twitterin-network-retrievalrust
In this note
  1. 01What it does
  2. 02Architecture
  3. 03Key properties
  4. 04Trade-off
  5. 05Why separate store types?
  6. 06Related notes

Thunder

"In-memory in-network post store. Serves recent posts from accounts a user follows in sub-millisecond time via Kafka-fed per-user stores."
01

What it does

Thunder solves a core latency problem: at X's scale, querying a database for all recent posts from followed accounts on every feed request would be prohibitively expensive. Thunder pre-loads that data into memory.

02

Architecture

Thunder has two parallel processes:

Write path (continuous)

Kafka stream
    │  (post create / delete events)
    ▼
Realtime ingestion
    │  (parse, validate, route by author)
    ▼
Per-user in-memory stores
    ├── Original posts
    ├── Replies & reposts
    └── Video posts
         │
         └── Auto-trim past retention window

Read path (per feed request)

Feed request arrives
    │
    ▼
Following list (from query hydration)
    │
    ▼
Per-author store lookups
    │  (one lookup per followed account)
    ▼
In-network candidate set  →  Home Mixer pipeline
03

Key properties

PropertyDetail
LatencySub-millisecond — no external DB hit
StorageIn-memory only
IngestionKafka post create/delete events
RetentionAuto-trimmed past retention window
Store typesOriginal posts, replies/reposts, video posts
LanguageRust
04

Trade-off

"Memory for latency. Thunder keeps the relevant slice of the post graph warm and pre-indexed at all times. The cost is memory; the benefit is that in-network retrieval is essentially free compared to the Phoenix ML search."
05

Why separate store types?

Splitting per-user stores into original posts, replies/reposts, and video posts lets the read path fetch specific content types efficiently without scanning everything.

06

Related notes

  • - X Algorithm — For You Feed — pipeline overview
  • - Phoenix — out-of-network retrieval counterpart
  • - X Algorithm — Key Concepts — query hydration (supplies the following list)
Previous

Phoenix

Next

X Algorithm — For You Feed

More from this module

Phoenix

recommendation-systemx-twitterout-of-network-retrievaltransformer

X Algorithm — For You Feed

recommendation-systemmachine-learningx-twitterstudy-guide

X Algorithm — Key Concepts

recommendation-systemx-twitterconceptsglossary

X Algorithm — Pre-Scoring Filters

recommendation-systemx-twitterfilterspipeline
Keep exploring

More notes and resources

Browse the full resource vault, or reach out to discuss any of these topics.

All resources
Get in touch