How it works · 47 of 49 Core
Why did Prime Video move from microservices back to a monolith?
One workload back into one process
Prime Video: Prime Video's team checks live video streams for defects. Version one was serverless steps: a step cut each stream into frames, saved them in storage (S3), and detector steps read them back, with a conductor (Step Functions) ticking several state changes for every second of video. It hit a hard limit at about 5% of the expected load, and the cost was not in the analysis: it was "a high volume of read/writes to the S3 bucket" and "a large number of step function state transitions", moving data between steps. The team packed all the steps into one process, so frames pass in memory. Cost fell by over 90% and it scaled. One team, one workload, measured.
Loading the animation…
Say it like this Prime Video's stream checker spent its money moving frames between serverless steps, through storage and a step conductor, so the team put the steps in one process that passes frames in memory, and the cost fell by over 90%.
Under the hood — for builders
- The source, in its words
- Marcin Kolny, Prime Video Tech, 2023 (quoted by InfoQ): "The problem of high operational cost was caused by a high volume of read/writes to the S3 bucket storing intermediate work items (video frames and audio buffers) and a large number of step function state transitions."
- Terms
- Serverless step: a small function (AWS Lambda) run on demand. Step Functions: the conductor that runs steps in order, one state transition per move. S3: object storage, the depot. In memory: passed inside one process, no network or storage trip.
- Before and after
- Before: "we hit a hard scaling limit at around 5% of the expected load"; "several state transitions for each second of the analyzed audio/video stream". After: "we packed all of the components into a single process"; "reduced our infrastructure cost by over 90%. It also increased our scaling capabilities."
- Run here: where does the work time go?
- One stream-hour, 1–3 frames a second, 5 detectors. Split: 1 storage write + 5 reads per frame (20–60 ms each), 6 state changes a second (10–30 ms). One process: in-memory hand-offs. Analysis 5–15 ms per detector in both. Rates are ours.
- Still scaled out
- Adrian Cockcroft (quoted by Michael Tsai): the result is "horizontally scaled using ECS" and "only one of many microservices that make up the Prime Video application". Kolny: decisions may not suit every case.
- Measure it
- Storage reads and writes per unit of work · orchestration transitions per second vs the account limit · share of time moving vs computing.
- Watch out
- This is one workload whose steps always run together on the same data; the lesson is the hand-off cost, not "monoliths win". The original post is offline: quoted from InfoQ and Tsai's verbatim excerpts. Company writing.
- Sources
- Marcin Kolny, "Scaling up the Prime Video audio/video monitoring service and reducing costs by 90%", Prime Video Tech, Mar 2023, via Rafał Gancarz, InfoQ, 3 May 2023, and Michael Tsai's blog, 5 May 2023; read in session · work-time simulation, Python, 21 Nov 2026.
What happens in the Prime Video's move back to a monolith animation, step by step?
- Prime Video checks live streams for defects. Version one: separate serverless steps, a storage depot between them, a conductor keeping order.
- Every frame went down to the depot and back up to each detector, and the conductor ticked several times for each second of video.
- Your turn: which part cost the most?
- Carrying, not analysing: storage reads and writes, and the conductor's state changes. It also hit a hard limit at about 5% of the expected load.
- The team packed every step into one process: frames pass hand to hand in memory. No depot, no conductor.
- Cost fell by over 90%, and copies of the process still scale out. One team's measured reversal, not a rule. Next: UPI.
What everyday example explains Prime Video's move back to a monolith?
Couriers carrying every page between rooms vs passing it hand to hand at one long table.
Why should a team care about Prime Video's move back to a monolith?
A network hop or a storage trip per piece of data costs money and has limits. When steps always run together on the same data, splitting them buys nothing and pays for every hand-off.