Baseline System Design — Databases, Part 1/?
<p>Last time I wrote about Facebook fanout, but got bogged down in trying to figure out what Facebook actually did. A requirement for Facebook is that users can publish posts; another requirement is that users can receive posts (“news”). We can implement this with the push/fanout-on-write approach, or the pull/fanout-on-load approach. In the former, the newsfeed is generated during read time. In the latter, the newsfeed is precomputed during write time and new posts are delivered to friends’ caches immediately after publication.</p>
<p>An advantage of using a cache is speed, but a disadvantage is the “hotkey problem” — it is really slow for celebrities who have many friends. We can use a hybrid approach and have the majority of users use fanout-on-write while celebrities use fanout-on-load, but this is not necessarily what Facebook actually does.</p>
<p><a href="https://corgicorporation.medium.com/baseline-system-design-databases-part-1-e0e6a702629">Visit Now</a></p>