Layer three: compute. The layer that does the work. After the order is taken, something has to actually fulfill it. This is where the labor happens: the functions, the jobs, and the containers that pick up work, do one thing, and stop.

01 Interfacewhat you click
02 Orchestrationwhat gives the orders
03 Computewhat does the work
04 AI runtimewhat makes the judgment calls
05 Statewhere everything rests
Five layers under every AI system. We go top to bottom: the surface you touch, down to the bedrock everything rests on.
What does the work. Serverless functions that exist only while they run.
What does the work. Serverless functions that exist only while they run.

No servers, just workers that appear when needed

VideoFlow has no servers. It has about 38 Lambda functions: small pieces of code that exist only while they are needed. A Lambda is a motion-sensor light. It switches on when something happens, runs for seconds, then disappears. One checks the file. One extracts audio. One builds a clip. Each does a single job, then stops existing.

Still from the module video

The shapes of compute

For the heavy lifting there is a different shape. The same idea, sized differently for the size of the job.

Lambdaa motion-sensor light: on, runs for seconds, gone
MediaConvertone job, three derivatives at once
Fargatecontainers for renders too big for a function
4 Batchbursts through frame jobs

Containers on Fargate handle renders too big for a function. Batch bursts through frame jobs. Right tool, right size: a function for seconds, a container for minutes.

One MediaConvert job, three derivatives at once

One MediaConvert job takes the upload and emits three derivatives at once:

  • A small 540p proxy for editing.
  • Clean audio for transcription.
  • A frame every two seconds for vision.

The original is never touched again.

Idle costs almost nothing

Because compute only exists while running, an idle pipeline costs almost nothing.

Ten thousand videos a month or zero: the workers clock out either way.

But workers do not decide what to make. For that, this system has something stranger. Layer four.