Kanishk Sachdev

Software Engineer and Student

The Art of Waiting in Line

You know that feeling when you're at a coffee shop, and the person who just walked in gets their latte before you? Yeah, that's queueing theory in action (and it hurts).

We deal with queues every day—at the grocery store, in traffic, and definitely in our code. But here's the thing: not all lines are created equal. Sometimes, being fair (FIFO) is the worst possible strategy. Sometimes, you need to be ruthless (AQM) to save the system.

I built this little playground to visualize what actually happens when systems get overwhelmed. It's one thing to read about "Head-of-Line Blocking," but it's another to watch a poor request turn grey and time out because a massive job is clogging the pipe.

So go ahead, spam that Spawn button. Break things. See what happens when you prioritize the VIPs or just start dropping connections when the room gets too crowded. It's chaotic, it's messy, and it's exactly how the real world works.

Inspired by encore.dev/blog/queueing

Feel free to contact me at kanishksachdev@gmail.com