DEV Community

Kay Ashaolu
Kay Ashaolu

Posted on Originally published at systemthinkinglab.ai

What should a feed cache, and what shouldn't it?

Hey,

You are asked to design a feed, a video site or a search box, and you cannot say what to store or what to prepare ahead of time. Course II is built for that moment. These systems share one fact: far more people read than write.

Try this today, free. Open any feed and pick three things on the screen, say a post, a like count and a trending list. Write one line for each, in this shape: "Like count: same for everyone, a minute old is fine." Then read your three lines:

  • Same for everyone and a little old is fine: cache it (keep a ready copy so reads stay fast) and let it expire after the age you wrote down.
  • Different for each person: a shared cache would show one person's data to another, so cache it per person or not at all.
  • Must be exact right now, like a balance: do not cache it.

By the end of Course II you can:

  • Choose the building blocks a feed or video site needs (the standard parts every system is assembled from), such as a File Store for the videos and a fast lookup table for cached copies.
  • Decide what to cache and handle the copy going stale.
  • Design an upload that finishes fast while thumbnails and video encoding happen in the background.
  • Say what to change first when a read-heavy system gets a sudden traffic spike.

It is 10 video lessons, five case studies, two hands-on labs, an assessment and a three-part challenge.

Start at Course I; all four are one $299 purchase, with a 30-day money-back guarantee. To buy: https://systemthinkinglab.ai/courses-i-iv.html
What Course II covers: https://systemthinkinglab.ai/course-2.html

Or read the free articles first: https://systemthinkinglab.ai/learn/

  • Kay

This note goes out by email Sunday to Friday. Read more at systemthinkinglab.ai.

If you want to see how products like Instagram and Netflix are designed, take your free 5-day course: the 7 building blocks.

Top comments (0)