←back to thread

768 points cyndunlop | 1 comments | | HN request time: 0.225s | source
Show context
pornel ◴[] No.43108545[source]
I wonder why timelines aren't implemented as a hybrid gather-scatter choosing strategy depending on account popularity (a combination of fan-out to followers and a lazy fetch of popular followed accounts when follower's timeline is served).

When you have a celebrity account, instead of fanning out every message to millions of followers' timelines, it would be cheaper to do nothing when the celebrity posts, and later when serving each follower's timeline, fetch the celebrity's posts and merge them into the timeline. When millions of followers do that, it will be cheap read-only fetch from a hot cache.

replies(5): >>43108664 #>>43108812 #>>43109007 #>>43110207 #>>43113811 #
VWWHFSfQ ◴[] No.43110207[source]
At some point they'll end up just doing the Bieber rack [1]. It's when a shard becomes so hot that it just has to be its own thing entirely.

[1] - https://www.themarysue.com/twitter-justin-bieber-servers/

@bluesky devs, don't feel ashamed for doing this. It's exactly how to scale these kinds of extreme cases.

replies(4): >>43112987 #>>43113751 #>>43113906 #>>43116827 #
1. bitbckt ◴[] No.43113906[source]
We never actually had a literal “Bieber Box”, but the joke took off.

Hot shards were definitely an issue, though.