
Ever wondered how your favorite social media app handles millions of new posts every minute?
Image: U.S. Department of Agriculture, Public domain, via Wikimedia Commons
Ever wondered how your favorite social media app handles millions of new posts every minute?
Imagine a social media platform where millions of new posts are uploaded every minute. The app needs to quickly display these posts to users without crashing or slowing down.
The app uses a special data structure that temporarily stores new posts in memory before moving them to a permanent storage on disk. This way, it can quickly display new posts to users without getting overwhelmed.
Example
If a user uploads 1,000 new posts in a minute, the app first stores these posts in memory and then moves them to disk, ensuring users see the posts almost instantly.
Remember this
The app uses an LSM tree to efficiently manage and display a massive volume of new posts.
Text adapted from Wikipedia, licensed under CC BY-SA 4.0.
paged attention (vLLM) improves serving throughput
Paged attention (vLLM) improves serving throughput by reducing latency through non-contiguous KV-cache pages, enabling faster data retrieval
Distributed hash table
Ever wondered how your favorite streaming service instantly starts playing a movie?
Flashbulb memory
Flashbulb memories are vivid but not always accurate
GQA reduces KV-cache memory by the group factor
Ever wondered how websites stay fresh in search results?
B-trees optimize: disk-based sorted data with O(log n) reads per query
How can we quickly find your favorite song in a massive music library?
BFS vs DFS: BFS finds shortest path in unweighted graphs, DFS uses less memory
BFS finds shortest path in unweighted graphs; DFS uses less memory
Swipe through 100 ML concepts daily
Open Pocket Polymath