Hypothetical scenario. An old Northwind transcode pauses while a corrected upload finishes first. Meanwhile a popular lesson receives cold-cache playback demand. Dev adds workers; Priya asks whether the problem is processing capacity, origin delivery or an obsolete job’s permission to publish.
Maya: “The older job may finish successfully for its own input.”
Dev: “But that does not make it the current presentation the viewer should receive.”
Evolve the media baseline with version-safe publication and separate processing and delivery budgets. Preserve the required-asset contract. Worker completion, authority to activate a version and successful playback must remain distinguishable observations.
Is this finished result still authorized to publish?
Every processing attempt names an accepted input version and output specification. The current desired presentation identifies which result may become active. An older job can finish valid local work after that desired state changes. Its output is complete for its own input, but it is no longer authorized to replace the corrected presentation.
The metadata transition must compare the expected input and desired presentation against current authority. A job’s expired lease does not stop it from writing objects or attempting publication after a pause. Versioned object names limit accidental overwrite; the guarded current-pointer transition supplies the separate publication decision.
Separate processing recovery from delivery bandwidth
Hypothetical worked example. Choose ten arriving processing jobs per minute and twelve successful logical completions per minute. A sixty-job backlog drains at 12 − 10 = 2 jobs per minute, requiring 60 ÷ 2 = 30 minutes under constant rates. Failed attempts and duplicate outputs do not count as additional completed jobs.
Choose one thousand concurrent viewers each consuming the two-megabit-per-second rendition from the baseline. Payload demand is 1,000 × 2 = 2,000 megabits per second, or two gigabits per second. Dividing by eight gives 2,000 ÷ 8 = 250 megabytes per second before protocol overhead.
Under a deliberately simplified ninety-percent byte-reuse model, warm origin payload demand is 250 × 0.1 = 25 MB per second. A cold interval with no reusable content can require the full 250 MB per second, a ratio of 250 ÷ 25 = 10. This is selected byte accounting, not a guaranteed request-hit-to-byte-hit relationship. Different renditions and segment popularity can change it.
Adding encoding workers does not directly provide that origin bandwidth. It can instead increase simultaneous output writes and temporary-storage pressure. Measure the constrained path and preserve headroom for serving already published presentations while processing new ones.
Reject a stale encode and retain rollback references
Hypothetical scenario. I12 begins encoding, then an editor selects I13. The I12 job completes last. Its outputs may be valid for I12, but the publication guard must reject them as the current I13 presentation. A job generation and immutable input identity distinguish completion from current relevance.
| State evidence | Selected example | Required decision |
|---|---|---|
| Desired input | I13 | Reject I12 publication |
| Job attempt | I12 / generation 7 | Complete without becoming current |
| Retained reference | rollback M12 | Keep its assets |
| GC eligibility | no valid publication or retained refs | Guard before delete |
Resource-aware scheduling accounts for CPU/GPU occupancy, temporary bytes and output traffic. A queue of small audio jobs and long high-resolution jobs should not be judged only by count. Bound retries separately from new work and preserve fair admission while clearing recovery debt. Delivery bandwidth at the CDN is a different envelope from encode capacity.
Garbage collection traces references from current, rollback and retained pending manifests. Marking an asset unused without excluding concurrent publication leaves a race. Retire publication eligibility or use a protected reference lifecycle before deletion, and preserve any asset required by a supported rollback. CDN expiry does not authorize deleting the only durable source.
Adaptation, permission and cache policy interact
A player choosing a lower bitrate can reduce transfer demand, but it cannot repair missing segments or an unauthorized playlist. Validate rendition availability and keep presentation metadata consistent. Captions and alternative audio should follow the same source and version identity.
Signed or otherwise scoped delivery access must match the reader contract. A short-lived access mechanism is not a universal revocation guarantee for bytes already delivered or cached. Specify what future requests can be prevented and what remains outside server control.
Cache policy differs for immutable versioned segments and mutable catalogue or publication pointers. HTTP caching rules govern reuse; an application flag saying withdrawn cannot retroactively invalidate arbitrary copies. Keep that limit visible in the product promise.
A retried job publishes an older edit
Hypothetical failure scenario. A teacher corrects a lesson while an earlier processing job is delayed. The newer presentation becomes ready first. The old job finishes afterward and blindly overwrites the catalogue pointer, restoring the obsolete lesson.
Use a conditional publication transition bound to the expected source and desired presentation version. Preserve completed outputs for inspection without granting them authority to replace newer content. A worker's successful execution does not mean its result is still the requested result.
Cleanup must distinguish abandoned partial assets from a presentation still referenced by a player or rollback configuration. Record job ownership and retain recovery evidence. Deleting by object age alone can remove a legitimate long-running job's output.
Three media-design misconceptions
“The storage upload succeeded, so the lesson is ready.” Source validation, processing and presentation publication remain separate stages.
“A delivery cache removes origin capacity planning.” Cold content, purge, rendition diversity and regional misses can expose the origin to much more than average demand.
“More workers always clear the backlog.” Shared source bandwidth, temporary storage and downstream object limits can become the actual bottleneck.
Operate the presentation, not only the workers
Track upload failure, source-validation rejection, processing age, publication failure, missing segments and user-visible playback interruption separately. A worker success ratio can look healthy while published playlists reference the wrong assets.
Start with a small supported rendition set and a versioned on-demand workflow. Isolate retries and backfills from new uploads. Measure useful playback outcomes with the actual player while preserving static or server evidence about asset completeness.
Reject publishing a playlist before its required referenced assets are verified. Reject indefinite retention of every failed output without a recovery and deletion policy. Add live streaming only after defining its different latency, window and outage behavior.
What the playback and recovery estimates exclude
The bitrate example counts decimal media payload only. Original uploads, copies, containers, metadata and delivery overhead add separate costs. The manifest and authorization mechanisms must be checked for the chosen player and serving stack; upload durability alone does not establish playable publication.
In the wild: validate the presentation contract
RFC 8216 describes its HLS playlist and segment requirements. Apple’s stream-authoring session demonstrates a validation perspective. Neither proves that Northwind’s current metadata pointer selects the intended complete revision; that remains an application decision.
Cleanup follows references and recovery policy
A failed job can leave outputs that are safe to remove, while an older published presentation may still serve active players or a compatible rollback. Object age alone cannot distinguish them. Preserve job identity, publication references and retirement evidence, then apply a guarded deletion policy.
A cleanup listing can itself become stale while publication changes. Recheck eligibility at the selected deletion boundary and retain the authority needed to reject obsolete work. This is the same scheduling problem developed earlier, now applied to assets whose removal can break an otherwise valid playlist.
Challenge the proposed mechanism
A cleanup pass starts while an operator rolls back to M12. What protects its segments?
Reveal the design reasoning
Rollback eligibility must retain references or atomically claim the manifest before collection can remove its assets. A second non-atomic list scan is insufficient. Demonstrate the publish, rollback and collector interleaving.
Decision and reconsideration: Bind publication to desired input and guard collection against retained uses. Budget processing recovery separately from viewer delivery.
Defend the evolved presentation
The old job finishes after the correction and all its assets exist. May it become current?
Check desired authority
No. Its completeness does not override the current desired input and presentation version. The conditional publication decision must reject the obsolete result.
Warm byte reuse leaves twenty-five MB per second at origin. Is that enough for cold recovery?
Recalculate the miss path
Not under the selected no-reuse interval, which requires two hundred fifty MB per second before overhead. Bound origin work and consider rendition and segment concentration.
May cleanup delete every old object?
Inspect references and retirement
No. Active players, rollback configurations or delayed legitimate jobs may still require it. Use recorded references and guarded eligibility under the retention policy.
Media publication now names both version and eligibility. Page 51 carries that discipline into search and suggestions, where exact identity, discovery and private content require different query rules.
Northwind decision log
Publish only complete assets matching the current desired revision.
Budget processing, origin delivery and cleanup separately.
Next, separate search candidates from current eligible results.
Go deeper: stream identity and metadata
- Book chapter: Digital Video and HD, second edition, chapter 17: Streams and files — Charles Poynton. Identify the assets whose coherence is required.
- Book chapter: Digital Video and HD, chapter 18: Metadata — Charles Poynton. Follow presentation interpretation across versions.
- Video lecture: Improve stream authoring with HLS Tools — Apple. Revisit validation after changes and recovery.
- Primary document: RFC 8216: HTTP Live Streaming — Roger Pantos and William May. Inspect the referenced protocol version’s requirements.