Northlight, film streaming · Data

Films resume from an old position on another device

Northlight saves each viewer’s position every 10 seconds, so a film stopped on the TV picks up at the same place on a phone. Since about 10:31, support has heard from viewers whose films resumed minutes or hours back, or from the beginning. Playback, sign-in, and every database health check are normal.

Mei TanakaSupport lead, 10:44
Thirty-one contacts in the last ten minutes with the same story: they stopped a film on one device, and the next device offered to resume from much earlier or not at all. Two say the first device still remembered the right place. One viewer has hit it on every film she opened this morning, and her neighbor, who also watches on Northlight, hasn’t seen it once. NL-SUP-7710.

Your objective

Find out why resume reads return positions viewers have already watched past, and make every resume return the latest save without pushing the primary database over 70 percent CPU. The incident closes when no resume read has returned an older position for 30 seconds, the primary stays under 70 percent with every save succeeding, and a film you stop on one device resumes at the same position on another.

Getting started

  1. Play a film on the Laptop for 20 seconds or more and go back to Home. Switch the device to Living room TV and compare Continue watching with where you stopped.
  2. In Logs, show only your requests and line up progress saved with progress read. Note which database instance answered each read and the LSN it had replayed.
  3. Open Releases and config. The database panel shows each instance’s replication lag, CPU, read pool membership, and the long queries running on it.
  4. Fix it with a database change, a release, or a change to api/src/progress.js. Then stop a film on one device and resume it on another.

Resolution

  • For 30 seconds, no resume read returns a position older than the viewer’s latest saveStarting
  • pg-main stays under 70 percent CPU and every progress save succeedsStarting
  • A film you stop on one device resumes at the same position on another device, after your changeStarting
Starting Northlight…
Loading telemetry…

How this lab runs

Northlight runs in this page. Simulated viewers save their positions to pg-main and read them back through api/src/progress.js from replicas that apply pg-main’s log as the simulation runs. Your player saves and reads through the same code, and the charts, logs, and traces come from those requests.