Visualizers

Learn by moving things

Interactive explainers for the ideas behind retrieval, embeddings, and agents. A formula tells you what is true; dragging a vector shows you why. Each one also appears inside the article it belongs to, and runs entirely in your browser, so drag, poke, and break it.

Portrait of Sachin Gupta rendered in binary

Like looking for your keys, a request checks the closest cache first: browser, then CDN, then app cache, then the database. The closer the hit, the faster, and a full miss pays the slow price.

Where caches live: check the closest firstauto
closest, fastestfarthest, slowest
browseron your deviceHITCDNnear youapp cachein memorydatabaseslow source

The browser already has it: instant, no network at all.

Cache-aside: the hit and the miss

From: Caching: Don't Do the Same Work Twice

Check the cache first. The first request misses and takes the slow trip to the database, filling the cache on the way back; every request after is a fast hit. Watch the hit ratio climb.

Cache-aside: hit fast, or miss and fillauto
requestcacheempty: MISSslow tripdatabasethe slow sourcefill the cache
hit ratio so far:0%(0 of 1)

First request: the cache is empty, so it misses and takes the slow trip to the database, then drops a copy in the cache on the way back.

Visualizers — Sachin Gupta