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 03 · System Design · Holding up under load · about 15 min to read

Watch: Load balancing: the chai stall that got famous
▶ VideoPlay it as a journeyTutor comes with a plan

One wala, many kettles (concurrency vs parallelism)

The Chai Stall That Got Famous
The Chai Stall That Got Famous · Open board

The stall on the corner, its queue and its wala at the stove. This lesson stays inside that one stall and asks what the wala does while the chai brews. The lab at the end of the story lets you run the same stall yourself.

Before you start. You need the stall from The chai stall that got famous (load balancing): one wala at one stove, a queue that grew when the stall got famous, and more stalls added so the crowd could be shared. You do not need to know anything about how computers work. Every word this lesson uses is shown doing something before it is named.

Lesson 12 of 115 in System Design

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

  • August 2009: FriendFeed, and a server that mostly waits
  • Back at the stall: one order is 5, 40 and 1
  • Juggling kettles: concurrency, and why no kettle got faster
  • The round the wala walks: an event loop
  • 64 customers: the working floor, and parallelism
  • Too many kettles: the burner cap

Terms it explains: blocking, concurrency, event loop, parallelism, thread pool, thread, core.

Lab

Sixteen customers, one wala. If the wala stops standing at each kettle, how much sooner is everyone served?

Switch to Juggle the kettles, drag Customers at once and Burners to 64, then watch Walas busy.

Open One wala, many kettles

Review System Design