Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 02 · From Scratch · Redis · with code: Go · about 26 min to read

Play it as a journeyTutor comes with a plan

Capstone: Redis, Everything

Everything
Everything · Open board

The finale of the build, where every earlier wall becomes one assembled desk, alongside the project lesson Build Your Own Redis, From Scratch.

Before you start. This series builds a small copy of Redis, a program that keeps everything it stores in memory instead of on disk, so that asking it something and hearing back feel like the same instant. Seven earlier stages already built everything this toy has: a connection you read and write like a file, an agreed way of marking where one command ends and the next begins, a table that finds any key in one step instead of searching for it, one worker that answers every client without ever standing still waiting on one of them, a way for a key to carry its own expiry moment, a way to clear out old keys when room runs short, and a log written to disk so a crash can’t erase what a client was already told was saved. This lesson adds nothing new to that list. It sends one ordinary command across all seven pieces, in the order it actually happens.

Lesson 11 of 117 in From Scratch

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 2011: one lookup, sized for three hundred million
  • The one idea: nothing new, one order through all of it
  • The order’s trip across the desk
  • Nothing here works alone
  • Seven pieces, each load-bearing for another
  • Every choice was a fork in the road
  • What real Redis adds
  • Failure modes, and which lesson explains each
  • Run the whole thing
  • Check every stage

Terms it explains: socket, event loop, hash table, deadline, log, stops resizing, antirez's design writing.

Review From Scratch