Re:Why Twitter didn’t go down: From a real Twitter SRE
by grishka on Tuesday November 22, 2022 @07:36AM
(#33705081)
A lot of things in a typical social media service can be segmented trivially. The hardest part is the feed because it requires querying many database servers at once, but then it can be cached and served quicker.
[ Parent
| on HN ]
Re:Why Twitter didn’t go down: From a real Twitter SRE
by wayfarer2s on Tuesday November 22, 2022 @09:59AM
(#33706508)
Isn’t cache invalidation the hardest part of the feed? Once a user with millions of followers tweets, doesn’t that essentially invalidate millions of caches? That doesn’t sound like a trivial problem.
Re:Why Twitter didn’t go down: From a real Twitter SRE
by naasking on Tuesday November 22, 2022 @10:39AM
(#33706916)
Because you can't edit tweets, the database is monotonically increasing (append-only) so scaling it isn't that hard. Cache invalidation basically just adds a new item. Deleting a tweet actually would be the harder/more expensive operation, but it's also less common.