Try
↑ ↓ move↵ openesc close

Interview prep / News feed

Junior · News feed · System design interview question

What does a pull feed cost per read, and what does it save?

Sketch your own answer first, then compare it with the one below.

A strong answer

A read fetches recent posts from every account the reader follows. With 200 follows that is up to 200 lookups, which are best done in parallel and from a cache.

It saves write work. A post is one write, no matter how many followers it has, and inactive users cost nothing.

Sources

Learn it by running it

The design a news feed lesson explains the mechanism behind this question, and its lab lets you change the parameters and watch the effect.

Your progress is saved in this browser. Sign in to keep it on every device. Privacy · Terms