Use a hybrid fan-out: for normal users (<10k followers), fan-out-on-write pushes post IDs into followers’ Redis sorted-set timelines asynchronously. For celebrities/mega-repos, skip fan-out-on-write (avoiding millions of writes) and merge their recent posts at read time (fan-out-on-read) before hydrating post details.
Follow-up Interview Question · What happens in Redis if an inactive user hasn’t logged in for a year—do you still fan out to them?