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

A checkout spike of 5,000 orders would melt a slow email step. A queue holds the backlog as depth and lets the worker drain it at a steady rate, so the spike becomes a short wait, not a crash. This is load leveling.

A queue absorbs a rushinteractive
checkoutproducerqueue depth40email workersteady 100 a second

A calm minute: about 50 orders come in, and the email worker keeps up. The queue stays almost empty.

Many workers read the same queue, and each message goes to exactly one of them. Add workers to drain a backlog faster: five hands clear in a fifth of the time, with no message handled twice.

Add hands, not armsinteractive
one queueorder #812order #813order #814order #815order #816worker 1drains in about 50 seconds

One worker pulling the rail: 5,000 receipts at about 100 a second take roughly 50 seconds to clear.

Visibility timeout and at-least-once

From: Message Queues: Work That Waits Its Turn

A received message is hidden, not deleted, for a visibility timeout. If the worker crashes before acknowledging, the message reappears for another worker. Never lost, but it can run more than once, so keep workers idempotent.

What if a worker drops the ticket?interactive
queueorder 812worker Aidleworker Bidle

A message waits on the queue, visible for any worker to take.

Visualizers — Sachin Gupta