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 18 min to read

Play it as a journeyTutor comes with a plan

Redis: The Map (SET / GET / DEL)

The Map SET GET DEL
The Map SET GET DEL · Open board

Follows Redis 02: RESP, The Wire Protocol, which turned raw bytes into a parsed command, and hands off to Redis: One Thread, Many Clients.

Before you start. You already have a command in hand,SET name garv: because the wire-protocol stage parsed it out of the raw bytes for you. This lesson answers the question that parsing left open: once you have SET, GET or DEL, where does the data actually live?

Lesson 5 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

  • 1953: a phone number too slow to look up
  • Compute the shelf, don’t search for it
  • Redis’s map: three thin calls on one table
  • Two coats, one hook: the collision
  • Ten million coats, and the rack has to double
  • The fix: move one coat at a time
  • The Go shape of it

Terms it explains: hash, bucket, collision, chain, load factor, incremental rehashing.

Review From Scratch