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 05 · System Design · Deeper than the interview · about 16 min to read

Watch: Serverless without containers: how one machine runs code from thousands of strangers
▶ VideoPlay it as a journeyTutor comes with a plan

The stall with no stove: serverless and edge

The Isolate
The Isolate · Open board

The small walled room that Cloudflare gives each customer’s code, so thousands can share one machine. This lesson asks when renting code by the call is the right choice, and when it costs you.

Before you start. Two kitchens, two cities (multi-region and active-active) gave you the region, a cluster of data centers in one part of the world, and the cost of distance between two of them. The chai stall that got famous (load balancing) gave you the server as a stove that can only make so many cups an hour, so you add stoves as the queue grows. The rooms AWS runs for you gave you Lambda, code that AWS runs only while an event needs it, and its limits: 15 minutes a run and nothing kept in memory between runs.

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

  • March 2023: a team on Prime Video builds a tool the fast way, and it hits a wall
  • A function: code that runs only when someone calls it
  • Paying by the call: the break-even sum
  • The first call is slow: what a cold start is
  • The edge: running the function near the person
  • When serverless wins, and when it loses

Terms it explains: function, cold start, edge compute, "Where does state go?", "Why use the edge?", Common mistakes.

Review System Design