Conceptio › Archive › arXiv CS
arXiv CSopen access

The Streaming Reservoir Convergence Theorem: A Prospect-Theoretic Framework for Multi-Provider Adaptive Streaming

2026 · arxiv_cs
arXiv CS · Papers · License: Open Access · 2026
Open Source ↗Direct PDF ↓
distributed-systemsinternetnetworkingprotocols
networking, internet, protocols, distributed systems

arXiv:2605.02761v1 [cs.MM] 4 May 2026

The Streaming Reservoir Convergence Theorem: A Prospect-Theoretic Framework for Multi-Provider Adaptive Streaming Justice Owusu Agyemang∗1,2,3 , Jerry John Kponyo†3 , Kwame Opuni-Boachie Obour Agyekum‡2 , Obed Kwasi Somuah§2 , Sarafina Serwaa Boakye¶1 , Elliot Amponsah‖3 , and Godfred Manu Addo Boakye∗∗3 1

Sperix Labs VIA Cybersecurity Lab, KNUST 3 Quantum and Assistive Technologies Lab, KNUST 2

May 2026

Abstract We present the Streaming Reservoir Convergence Theorem (SRCT), a novel mathematical framework for multi-provider adaptive bitrate streaming that addresses three fundamental structural weaknesses in current systems: linear provider probing, reactive failover, and cold standby transitions. SRCT models stream acquisition as a concurrent reservoir filling problem— probing all N providers simultaneously rather than in batches—and maintains k pre-verified, pre-fetched standby streams alongside the active stream to enable sub-second failover with zero user-visible disruption. We prove four principal results: (1) a harmonic lower bound on reservoir safety showing that k independent streams provide Hk /λ̄ expected uptime where Hk is the k-th harmonic number; (2) a concurrent acquisition speedup S(N, b) = (N/b) · (1 − F b )/(1 − F N ) over batched probing, yielding 3–5× practical improvement; (3) monotonic non-decreasing quality under lazy-refill with convergence to the Pareto-optimal frontier; and (4) a prospect-weighted switching rule—using Kahneman–Tversky value functions with α = β = 0.88, λ = 2.25—that provably eliminates thrashing between similar-quality streams via a no-thrash bound on the expected switch count. We implement SRCT across two production streaming pipelines: a primary movie/TV system serving 12+ HLS providers with k = 3 reservoir slots, and a live sports system with multi-format DASH/HLS failover. Empirical verification via Monte Carlo simulation (5000 trials) confirms all four theorems across 22 independent checks. The reservoir of k = 3 streams achieves 9.15× mean time to depletion versus a single stream, and concurrent probing of 12 providers at 40% failure rate yields a 4.27× speedup over the current batched-by-3 default. ∗

[email protected], [email protected] [email protected] ‡ [email protected] § [email protected][email protected] ‖ [email protected] ∗∗ [email protected] †

1

1

Introduction

Modern web-based video streaming from content aggregators faces a fundamental tension: dozens of upstream providers exist, each with different availability profiles, geographic restrictions, and quality tiers, yet the viewer expects a stream to start within seconds and play without interruption [6]. Current production systems address this through a pipeline of sequential steps: resolve providers in batches, pick the first working candidate, attach a media player, and fault to the next candidate only after the active stream fails [1, 23]. This architecture has three structural weaknesses that degrade the user experience: (1) Linear probing. Providers are queried sequentially or in small batches (typically b = 3), so the viewer waits for the slowest provider in each batch before the next batch starts. In the worst case, a single slow provider delays all subsequent probes. (2) Reactive failover. The system switches streams only after the viewer experiences a buffering event or playback error. Each failover destroys the current player instance and cold-starts a new one—requiring a fresh manifest download, segment discovery, and buffer fill—typically adding 2–4 seconds of visible interruption. (3) Disconnected subsystems. Provider resolution, ABR quality selection, and error recovery operate as independent components with no shared state, leading to redundant work (re-probing already-verified dead providers) and missed optimization opportunities (failing to pre-load higher-quality alternatives). We address all three with the Streaming Reservoir Convergence Theorem (SRCT), which models multi-provider streaming as a concurrent reservoir filling problem [44]. The key insight is that provider probing, stream verification, and quality selection can be unified under a single mathematical framework—the stream reservoir—that maintains k verified-working streams at all times. The active stream plays while k − 1 standby streams have their manifests pre-fetched and cached, enabling sub-second failover with no user-visible disruption. Our contributions are: C1. A formal definition of the stream reservoir and its associated viability process, drawing on Markov reliability theory [26, 35] and reservoir sampling [44] (§2). C2. Four theorems—safety, speedup, monotonicity, and prospect-weighted switching—each with formal proofs or proof sketches (§3). C3. The Concurrent Prospect Reservoir Transfer (CPRT) algorithm implementing all four theorems in a three-phase pipeline (§4). C4. A production implementation across two distinct streaming architectures: a multi-provider movie/TV pipeline with HLS.js, and a live sports pipeline with multi-format DASH/HLS failover (§5). C5. Empirical verification of all four theorems via Monte Carlo simulation and deterministic computation with 22 independent checks (§6).

1.1

Problem Statement

Formally, given N streaming providers P = {p1 , . . . , pN }, each producing a set of stream candidates with varying quality q and time-dependent viability v(pi , t) ∈ {0, 1}, the goal is to select and 2

maintain a stream s∗ (t) such that: s∗ (t) = arg max q(s)

s.t.

v(s, t) = 1, ℓ(s) < ϵ

(1)

s∈S(t)

where S(t) is the set of available streams, ℓ(s) is the bootstrap latency, and ϵ is the maximum tolerable interruption duration (typically 300–500ms for seamless playback).

2

Mathematical Framework

2.1

Stream Viability Process

Definition 2.1 (Stream Viability). Let S = {s1 , s2 , . . . , sN } be the set of all candidate streams from N independent upstream providers. Each stream si is characterized by: • A quality q(si ) ∈ R+ , measured as vertical resolution in pixels or as a composite bitrate-resolution metric. • A viability function v(si , t) ∈ {0, 1} indicating whether the stream is accessible at time t. • A bootstrap latency ℓ(si ), the time from player attachment to first frame delivery, typically 200–4000ms depending on manifest complexity and network conditions [30]. The viability of each stream follows a two-state continuous-time Markov process [26] with up-rate µi (provider recovery, e.g. CDN health restoration) and down-rate λi (provider failure, e.g. upstream server error, geo-block, expired signed URL). The stationary availability of stream si is: ai = lim P (v(si , t) = 1) = t→∞

µi µi + λi

(2)

We assume streams are conditionally independent given their provider identities: v(si , t) ⊥ ⊥ ̸ j. This holds in practice because different providers use disjoint infrastructure (CDNs, v(sj , t) | i = origin servers, geographic regions) [41, 15]. This assumption can be violated during large-scale cloud outages, a limitation we discuss in §8.

2.2

Stream Reservoir

Definition 2.2 (Stream Reservoir). A reservoir R(t) = {r0 , r1 , . . . , rk−1 } is an ordered set of k verified-working streams such that at the time of last verification: (i) v(rj , tverify ) = 1 for all j ∈ [0, k), (ii) r0 is the active stream currently driving playback, (iii) r1 , . . . , rk−1 are warm standby streams with pre-parsed HLS manifests resident in the browser’s IndexedDB cache via the Media Source Extensions API [45], (iv) q(r0 ) ≥ q(r1 ) ≥ · · · ≥ q(rk−1 ) (quality-ordered, descending). Definition 2.3 (Reservoir Utility). The utility U (R) of a reservoir is the expected time until the viewer experiences a playback interruption—i.e., the first moment when all k streams are simultaneously non-viable: U (R) = E [min{ t ≥ 0 : v(rj , t) = 0, ∀j ∈ [0, k) }] 3

(3)

The reservoir concept draws formal analogy to Vitter’s reservoir sampling [44], where a fixed-size sample is maintained from a stream of unknown length. However, Vitter’s reservoir is a statistical sampling technique, while ours is an active state machine that continuously verifies, replaces, and activates streams based on observed viability and quality, formalized as a statechart [18].

2.3

Reservoir State Machine

Figure 1 depicts the reservoir as a finite state machine with four operational states. Sprint

Maintain

reservoir filled

Probe all N providers

Health checks + refill

all dead

re-acquire

failure detected

new active

Transition

Depleted All slots dead

all slots dead

Failover / upgrade

Figure 1: Reservoir state machine with four states. The Sprint phase probes all providers concurrently to fill the initial reservoir. The Maintain phase runs periodic health checks and lazyrefill. The Transition phase handles failover and quality-driven switching, returning to Maintain with a new active stream. The Depleted state triggers full re-acquisition when no viable streams remain.

3

Principal Theorems

3.1

Theorem 1: Reservoir Safety Bound

Theorem 3.1 (Reservoir Safety Bound). For a reservoir of size k where each stream rj has independent failure rate λj , the probability of a viewer-visible interruption within any horizon T is bounded by: P (interruption in [0, T ]) ≤

k−1 Y

1 − e−λj T



(4)

j=0

Moreover, the expected utility satisfies: E[U (Rk )] Hk ≥ E[U (R1 )] λ̄ where Hk =

(5)

1 Pk−1 j=1 1/j is the k-th harmonic number and λ̄ = k j=0 λj is the mean failure rate.

Pk

Proof Sketch. The reservoir fails only when all k streams are simultaneously non-viable. Under the conditional independence assumption: P (all fail in [t, t + dt]) =

k−1 Y j=0

4

λj dt

For the exponential failure model, P (stream j fails by T ) = 1 − e−λj T , giving equation (4). For the expected utility bound, consider k independent exponentially-distributed failure times τj ∼ Exp(λj ) [35]. The expected time until all have failed is: E[max τj ] = j

k−1 X

X 1 1 (−1)k−1 − + ··· + P λ λ + λℓ j λj j=0 j j<ℓ j

When λj = λ for all j, this simplifies to Hk /λ by the known result that E[maxj τj ] = Hk /λ for i.i.d. exponential variables [11]. For heterogeneous rates, the harmonic bound holds as a lower bound by Jensen’s inequality applied to the convex max function. Corollary 3.2. For k = 3 independent streams with equal failure rate λ, the reservoir provides H3 = 1 + 1/2 + 1/3 ≈ 1.833× the expected uptime of a single stream as a lower bound. In practice, the benefit is substantially larger because simultaneous failure of independently-hosted streams is exponentially unlikely: at realistic failure rates (λ ∈ [0.10, 0.15] per time unit), we observe 9.15× improvement via Monte Carlo simulation (§6).

3.2

Theorem 2: Concurrent Acquisition Speedup

Theorem 3.3 (Concurrent Acquisition Speedup). Let N providers be probed with per-provider failure probability F = P (v(si ) = 0). Under concurrent probing (all N providers in parallel), the expected time to find the first working stream is: E[Tconcurrent ] =

E[Tprobe ] 1 − FN

(6)

Compared to batched probing with batch size b < N , the speedup is: S(N, b) =

N 1 − Fb · b 1 − FN

(7)

When F < 0.5, S(N, b) > 1 for all b < N . Proof. Batched probing requires ⌈N/b⌉ sequential rounds. Each round succeeds if at least one of its b providers responds: P (round success) = 1 − F b . The expected number of rounds to first success is 1/(1 − F b ), so: N E[Tprobe ] E[Tbatched ] = · b 1 − Fb Concurrent probing queries all N providers in a single round: P (at least one works) = 1 − F N , giving equation (6). The speedup ratio (7) follows directly. The condition F < 0.5 ensures 1 − F b > 1 − F N for b < N , which implies S(N, b) > 1. Intuitively, when individual providers are more likely to work than fail, the probability that all N fail simultaneously (F N ) vanishes much faster than the probability that a batch of size b fails (F b ).

3.3

Theorem 3: Reservoir Quality Monotonicity

Theorem 3.4 (Reservoir Quality Monotonicity). Under the lazy-refill policy—whenever a stream is consumed from the reservoir, immediately probe all available providers and insert the highest-quality working stream—the expected quality of the active stream E[q(r0 (t))] is non-decreasing in t: d E[q(r0 (t))] ≥ 0 dt 5

(8)

Furthermore, the long-run quality converges to the maximum quality among providers whose stationary availability exceeds threshold τ : lim E[q(r0 (t))] = max{ q(s) : a(s) ≥ τ }

(9)

t→∞

where a(s) is the stationary availability from equation (2). Proof. Lazy-refill ensures the reservoir always contains the k highest-quality verified-working streams discovered so far. Since quality ordering is stable (streams are never spontaneously upgraded without re-verification), the active stream quality can only decrease when r0 fails, at which point r1 becomes active. Lazy-refill immediately probes for a replacement for the consumed slot, maintaining the invariant that the reservoir contains the k best known streams. The convergence result follows from the periodic health check mechanism: every ∆t seconds, each slot is re-verified. As t → ∞, every provider has been probed infinitely often (by the ergodic theorem for finite-state Markov chains [26]), so the set {s : a(s) ≥ τ } is fully characterized. The reservoir then selects the highest-quality stream from this set, converging to equation (9).

3.4

Theorem 4: Prospect-Weighted Switching

Theorem 3.5 (Prospect-Weighted Switching). The optimal rule for switching the active stream from ra to rb , accounting for both quality improvement and the disruption risk of transition, is: Switch(ra → rb ) ⇐⇒ π q(rb ) − q(ra ) · w P (v(rb ) = 1 | verified) > Cswitch 



(10)

where π(x) = xα for x ≥ 0 and π(x) = −λ(−x)β for x < 0 is the Kahneman–Tversky value function [42] (α = β = 0.88, λ = 2.25), w(p) = pγ /(pγ + (1 − p)γ )1/γ is the Prelec probability weighting function [33] (γ = 0.61), and Cswitch is the disruption cost of transition. Corollary 3.6 (No-Thrash Guarantee). Under the prospect-weighted switching rule, the expected number of switches in any interval of length T is bounded above by: E[switches in T ] ≤

T 2 · Cswitch · λ̄ · maxq q

(11)

This guarantees the system will not oscillate between streams of similar quality—a problem that plagues threshold-based ABR algorithms [47]. Proof Sketch. A switch from ra to rb requires π(∆q)·w(p) > Cswitch . For two streams of equal quality, ∆q = 0, so π(0) = 0 and the condition can never be satisfied. For similar-but-not-equal qualities, the diminishing sensitivity of π (concavity for gains, convexity for losses) and the underweighting of moderate probabilities by w(p) create a “dead zone” where the expected benefit fails to overcome Cswitch . The loss aversion parameter λ = 2.25 means that quality downgrades feel 2.25× worse than objectively equivalent upgrades [25], creating natural hysteresis: the system downgrades aggressively (to avoid buffer starvation) but upgrades cautiously (to avoid unnecessary disruption). This is the reverse of conventional ABR hysteresis [47], which delays downgrades and accelerates upgrades—a policy that works for single-provider ABR but fails for multi-provider systems where each switch carries manifest-load risk. The bound on switches follows from the fact that each switch requires a minimum prospect gap πmin = Cswitch /w(1) = Cswitch (since w(1) = 1). Given the diminishing marginal value of quality (π ′ (x) = αxα−1 → 0 as x → ∞), and the bounded quality range [0, maxq q], only a finite number of distinct quality levels can overcome Cswitch , limiting the switch rate. 6

Prospect value π(∆q)

500

Gains (x ≥ 0) Losses (x < 0, λ = 2.25)

0

−500

−1,000 −1,200 −1,000 −800 −600 −400 −200

0

200

400

600

800

1,000 1,200

Quality difference ∆q (pixels)

Figure 2: Kahneman–Tversky value function applied to quality differences. The steeper slope in the loss domain (λ = 2.25) creates hysteresis that prevents thrashing between similar-quality streams.

Decision weight w(p)

1

w(p) (γ = 0.61) Linear weighting

0.5

0 −0.1

0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1

1.1

Stated probability p

Expected uptime Hk /λ

Figure 3: Prelec probability weighting function with γ = 0.61. The inverse-S shape overweights small probabilities (making low-confidence streams unattractive) and underweights high probabilities (requiring genuine quality improvement even for well-verified streams) [16].

Hk /λ ln(k) reference

30

20

10

0

1

2

3

4

5

6

7

8

Reservoir size k

Figure 4: Expected reservoir uptime as a function of reservoir size k, showing harmonic growth (Hk ) vs. logarithmic reference. Diminishing returns beyond k = 4 suggest a practical optimum at k ∈ {3, 4}. 7

4

The CPRT Algorithm

The Concurrent Prospect Reservoir Transfer (CPRT) algorithm instantiates all four theorems in a practical streaming pipeline operating in three phases: Sprint (initial acquisition), Maintain (steady-state operation), and Transition (slot switching).

4.1

Phase 1: Sprint Acquisition

The sprint phase executes at the start of each viewing session. All N provider URLs are probed concurrently via HTTP HEAD requests with a configurable timeout (default 3 seconds). Because the probe is non-blocking—the browser can issue dozens of concurrent requests—the wall-clock time is bounded by the slowest successful provider, not the sum of all probe latencies (Theorem 3.3). Results are sorted so that working streams appear first, ordered by response latency. The fastest k working streams populate the reservoir, and the highest-quality among them becomes the active stream. Standby slots immediately begin pre-fetching their HLS manifests into the browser cache, so that a failover transition can bootstrap the player without a cold manifest download. If no provider responds successfully, the sprint returns a failure signal and the system falls back to re-acquisition. Algorithm 1: Sprint Acquisition (Theorem 2) Require : Candidate set C = {c1 , . . . , cN }, target size k Ensure : Active stream s∗ or failure 1 P ← ∅;

2 for i ← 1 to N in parallel do 3

P ← P ∪ { (i, Probe(ci )) };

4 sort P by viable ↓, latency ↑; 5 R ← [];

6 for each (i, viable, _) ∈ P do 7 8

if viable ∧ |R| < k then R ← R ∪ {ci };

9 if |R| = 0 then 10

return failure

11 sort R by q(·) descending; 12 s∗ ← R[1]; 13 for j ← 2 to |R| do 14

PrefetchManifest(R[j]);

15 StartHealthChecks(R); 16 return s∗

4.2

Phase 2: Reservoir Maintenance

Once the reservoir is populated, a background maintenance loop runs every Th seconds (default 15 s). Standby slots are re-verified with lightweight HEAD requests; the active slot is implicitly verified by the fact that it is delivering playable segments. When a standby slot is confirmed healthy, its verification count increments, increasing the confidence weight w(p) used by the prospect-weighted switching rule (Theorem 3.5). 8

When a standby slot fails its health check, the lazy-refill policy (Theorem 3.4) immediately triggers a new probe of all known providers. Freshly discovered streams enter the reservoir only if their prospect-weighted score exceeds the switch cost Cswitch , preventing the reservoir from churning on marginal quality improvements. This maintenance loop ensures the reservoir converges to the true availability frontier over time. Algorithm 2: Reservoir Maintenance (Theorems 1, 3) Require : Reservoir R = {r0 , . . . , rm−1 }, interval Th 1 while true do 2 3 4 5 6 7

8 9

for j ← 1 to m − 1 do v ← HeadCheck(rj ); if v = 1 then (last) tj ← tnow ; (ver)

nj

(ver)

← nj

+ 1;

else // Lazy-refill (Theorem 3.4) F ← ProbeAllProviders(); RefillReservoir(R, F);

10

wait(Th );

4.3

Phase 3: Seamless Transition

Transitions occur in two scenarios. A failure transition is triggered when the active stream’s media player signals an unrecoverable error (manifest timeout, fatal network failure, or segment decode error exhausting all local retries). The dead active slot is removed and the highest-quality standby is promoted to active. Because the standby’s manifest has been pre-fetched, the new player instance initializes in 200–500 ms rather than the 2–4 s required for a cold start. A quality upgrade transition is evaluated periodically using the prospect-weighted switching rule  (Theorem 3.5). Each standby slot is scored by computing π q(rj ) − q(r0 ) · w(pj ) where pj is the confidence in the slot’s viability (derived from its verification count). A switch executes only when the score exceeds Cswitch , which—by Corollary 3.6—bounds the switch frequency and guarantees freedom from thrashing.

5

Implementation

SRCT is implemented across two production streaming pipelines in a web-based media application. The core reservoir engine is implemented in approximately 900 lines of application code, with an additional integration layer for connecting the reservoir to the user interface.

5.1

Core Reservoir Engine

The reservoir engine implements the four theorems through six primitives: • Sprint acquisition: Given a set of candidate stream URLs from the provider resolution layer, the engine issues concurrent HTTP probe requests to all candidates. Working streams populate 9

Algorithm 3: Seamless Transition (Theorem 4) Require : Event type e ∈ {failure, upgrade}, reservoir R 1 if e = failure then

4

R ← R \ {r0 }; if |R| = 0 then return depleted

5

Activate(R[0]);

2 3

6 if e = upgrade then 7 j ∗ ← −1;

best ← −∞; for j ← 1 to |R| − 1 do

8 9

(ver)

pj ← 1 − (0.3)nj ;  σj ← π q(rj ) − q(r0 ) · w(pj ); if σj > Cswitch ∧ σj > best then best ← σj ; j ∗ ← j;

10 11 12 13 14

if j ∗ ≥ 0 then Swap(r0 , rj ∗ ); Activate(r0 );

15 16 17

the reservoir in quality-sorted order; the highest-quality becomes the active stream. • Reservoir refill: When new candidates arrive (e.g., from slow-responding providers), each is evaluated against the current reservoir slots using the prospect-weighted criterion (Theorem 3.5). A lower-quality slot is replaced only if the expected utility gain exceeds Cswitch . • Failover: When the media player signals an unrecoverable error on the active stream, the engine removes the failed slot and promotes the highest-quality standby to active, implementing the safety bound (Theorem 3.1). • Quality switching: A periodic evaluation scans standby slots, computing the prospect-weighted score for each relative to the active stream. The engine emits a switch recommendation when the best score exceeds Cswitch . • Health checks: A background timer re-verifies standby slots at a configurable interval, maintaining freshness and incrementing verification counts that feed the probability weighting function (Theorem 3.4). • Utility estimation: Given an estimated mean failure rate, the engine computes the expected uptime gain from the current reservoir configuration (Theorem 3.1) for monitoring dashboards.

5.2

Integration: Movie and Television Pipeline

The primary on-demand video pipeline uses an upstream resolver that queries multiple content providers, each returning one or more stream URLs at various quality levels. Before SRCT, the pipeline used three independent mechanisms: a sequential probe of the first four candidates, a manually-tracked failover list, and staggered re-query timers for slow providers. SRCT replaces 10

all three with a single reservoir that probes concurrently, maintains warm standbys, and triggers failover automatically when the media player exhausts its local recovery attempts. The replacement is approximately one-third the code volume of the original subsystems.

5.3

Integration: Live Sports Pipeline

The live sports pipeline uses a different architecture: each event or channel carries multiple format entries (HLS, DASH with ClearKey encryption, and progressive MP4) from different CDN endpoints. The original system cycled through formats sequentially on failure. Under SRCT, all format URLs are probed concurrently at session start. The highest-bitrate working format becomes active, and the next-best one or two formats have their manifests pre-fetched as warm standbys. When the active format fails, the next standby activates immediately rather than waiting for a cold manifest download. The prospect-weighted switching rule is particularly valuable for live sports, where frequent unnecessary switches are perceptually jarring (commentary audio glitches and scoreboard flicker).

5.4

Large File Handling for Non-Segmented Media

For progressive (non-HLS, non-DASH) media where the file is substantial (often 1–5 GB for featurelength content), the warm standby strategy is adapted: standby slots pre-fetch only the movie header atom (typically 100–500 KB) via HTTP Range requests [17]. This atom contains the sample table needed for seeking and timeline display. Pre-fetching it enables instant media element attachment without waiting for progressive download of the full file, and prevents the server overload that would result from simultaneously downloading multiple full media files as warm standbys.

6

Empirical Verification

We verify all four theorems through a combination of deterministic computation and Monte Carlo simulation (5000 trials, time horizon T = 100). The verification suite contains 22 individual checks and requires no external dependencies beyond a Node.js runtime.

6.1

Theorem 1: Reservoir Safety

Table 1: Monte Carlo verification of Theorem 3.1 (5000 trials, T = 100, λi ∈ {0.10, 0.12, 0.15}). Configuration

Mean Time to Depletion

Ratio

10.0 91.4

1.00× 9.15×

Single stream (k = 1) Reservoir (k = 3)

The reservoir of k = 3 independent streams achieves 9.15× the mean time to depletion, substantially exceeding the theoretical lower bound of H3 = 1.833×. This amplification occurs because the theoretical bound considers the expected maximum of exponential variables, while in practice the probability of simultaneous failure of independently-hosted streams is exponentially suppressed Q ( λi ≈ 0.0018 per time step vs. individual λ ≈ 0.12).

11

Table 2: Concurrent vs. batched acquisition speedup. Scenario (N, b, F )

E[Tcon ]

E[Tbat ]

Speedup

1.00 1.00 1.00

4.27 4.01 5.33

4.27× 4.01× 5.31×

(12, 3, 0.4) (20, 5, 0.3) (8, 2, 0.5)

6.2

Theorem 2: Concurrent Speedup

Concurrent probing provides 3–5× speedup across three representative scenarios. The speedup is most pronounced at moderate failure probabilities (F ≈ 0.5), where batched probing wastes entire rounds on batches where all providers fail.

6.3

Theorem 3: Quality Monotonicity

Over 100 steps of lazy-refill simulation with four providers of varying quality (q ∈ {360, 720, 1080, 2160}) and availability (a ∈ {0.3, 0.5, 0.7, 0.9}), the active stream quality exhibits zero violations of monotonicity (100% non-decreasing steps). The final quality (2160p) equals or exceeds the initial quality in all trials. The convergence rate depends on the availability threshold τ : at τ = 0.3, convergence occurs within 15 ± 5 steps; at τ = 0.7, within 45 ± 12 steps.

6.4

Theorem 4: Prospect-Weighted Switching

The prospect theory parameters are verified across eight deterministic checks: • Loss aversion: |π(−360)|/π(360) = 2.250, exactly matching λ = 2.25. • Probability weighting: w(0.01) = 0.0553 > 0.01 (overweighting of small probabilities), w(0.50) = 0.4206 < 0.50 (underweighting of moderate), w(0.99) = 0.9116 < 0.99 (underweighting of high), consistent with the inverse-S shape described by Gonzalez and Wu [16]. • Verification confidence: switch score increases monotonically with verification count (−0.010 at 1 verification, 0.055 at 3, 0.079 at 5 for a 720p→1080p upgrade). • No-thrash: same-quality switch score is −0.120 < 0 (guaranteed no switch), and a trivial upgrade (720p→780p with 1 verification) scores −0.097 < 0 (does not overcome switch cost). • Long-run thrashing: 1 switch in 100 steps across 5 competing quality levels.

7

Related Work

Our work sits at the intersection of several research areas. Reservoir Sampling and Streaming Algorithms. Vitter [44] introduced reservoir sampling for selecting a uniform random sample of k items. Efraimidis and Spirakis [10] extended the technique to weighted sampling. Our “reservoir” draws formal analogy but differs fundamentally: it is an active state machine maintaining verified playback streams rather than a statistical sampling technique. The connection to harmonic numbers in both works arises from the max of k i.i.d. exponentials. At the software architecture level, the reservoir follows the Strategy pattern [14] by encapsulating the switching policy (prospect-weighted, threshold-based, or custom) as an interchangeable decision function. 12

Adaptive Bitrate (ABR) Streaming. Commercial ABR algorithms optimize within a single manifest’s quality levels [36, 38]. Buffer-based approaches (BBA [20]) fill the buffer aggressively then switch to the highest sustainable quality. Rate-based approaches (SARA [24]) use throughput predictions. Hybrid approaches—MPC [47], Pensieve [30], Oboe [2], Fugu [37], Comyco [46]— combine control theory or reinforcement learning with buffer and throughput signals. Comprehensive surveys by Kua et al. [27] and Bentaleb et al. [6] catalog dozens of ABR algorithms. SRCT operates above the ABR layer: it selects which provider’s manifest to feed to the ABR engine, making it complementary to any ABR algorithm. Multi-CDN and Multi-Provider Selection. Content delivery networks routinely use multiCDN strategies [1, 23, 41]. DNS-based approaches [41] redirect clients to the nearest healthy CDN edge. Manifest-level multi-CDN [15] embeds URLs from multiple CDNs into a single HLS manifest. These approaches work at the infrastructure layer; SRCT works at the application layer, requiring only that each provider produces an independently-accessible stream URL. Prospect Theory in Engineering Systems. Prospect theory [25, 42] has been applied to video quality assessment [34, 4], network QoE optimization [7], and decision-making under risk [5]. Our application to automated switching decisions (with no human in the loop) is novel: we use prospect theory not to model human preferences, but to construct a switching policy that behaves as if it were loss-averse—a desirable property for stability in multi-provider systems. Concurrent and Parallel Systems. The concurrent probing strategy draws on the principle that parallelizing independent I/O-bound operations yields near-linear speedup [9, 48, 21]. Our contribution is the closed-form speedup bound S(N, b) and its application to the streaming domain, where provider viability—not raw throughput—is the dominant latency factor. Reinforcement Learning and Bandits. The stream selection problem resembles the stochastic multi-armed bandit [3, 8, 39], where each provider is an “arm” with unknown reward distribution. However, standard bandit algorithms assume stationary reward distributions, whereas provider viability is non-stationary and we can pre-verify arms before committing—a capability absent from classical bandit formulations. Fault Tolerance and Reliability. The reservoir approach to fault tolerance draws on classic techniques from distributed systems [28, 19]. The two-state Markov viability model is standard in reliability engineering [26, 35, 11]. Network congestion control [22, 13] inspires the AIMD-like backoff in our health check scheduling. Web Standards and Browser APIs. The Media Source Extensions [45, 31] and HLS specification [32] provide the browser primitives that make reservoir-based streaming feasible. HTTP/2 transport improvements [43] further reduce manifest fetch latency. Lederer et al. [29] and Timmerer and Griwodz [40] provide datasets and tooling for DASH evaluation that could be adapted for SRCT benchmarking.

13

8

Discussion

8.1

Why Prospect Theory for Automated Switching?

A natural question is why we use prospect theory—a descriptive model of human decision-making under risk—for an automated system. The answer lies in the shape of the value function, not its psychological interpretation: (1) Concavity for gains (α < 1) captures the diminishing marginal utility of higher resolution: the jump from 720p to 1080p is a larger perceptual improvement than 1080p to 1440p, even though both are approximately 360 pixel increases. (2) Loss aversion (λ > 1) creates hysteresis that is functionally equivalent to the guard bands used in control-theoretic ABR [47], but derived from a principled utility framework rather than heuristically tuned thresholds. (3) Probability weighting (γ < 1) ensures the system does not over-confidently switch to streams with few verifications, even if those streams advertise high quality. The specific parameter values were calibrated from human choice experiments involving monetary gambles [42]. While the domain transfer is imperfect, the qualitative properties (diminishing sensitivity, loss aversion, inverse-S probability weighting) are robust across domains [5]. The switch cost Cswitch serves as a domain-specific calibration parameter tunable via A/B testing.

8.2

Limitations

The conditional independence assumption may be violated during large-scale cloud outages affecting multiple providers simultaneously [15]. Mitigation requires ensuring reservoir slots span different CDN providers and geographic regions, as is standard in multi-CDN deployments [41]. The Markov viability model assumes constant failure and recovery rates. Providers with timevarying availability patterns (diurnal CDN load, scheduled maintenance) may be better modeled by semi-Markov processes with duration-dependent transition probabilities [35], at the cost of additional parameter estimation complexity. The prospect theory parameters are domain-transferred without re-calibration. While the qualitative behavior is robust, the precise threshold for Cswitch would benefit from streaming-specific estimation through randomized controlled experiments.

8.3

Future Work

Several extensions are natural: 1. Cross-title pre-fetching: Extend the reservoir to include the next episode’s manifest, pre-loaded while the current episode plays, enabling zero-latency auto-play transitions. 2. Bandwidth-aware quality ranking: Incorporate segment-level bandwidth measurements into reservoir slot quality estimates, replacing static resolution-based ranking with dynamic throughput-aware ranking [2]. 3. Optimal stopping formulation: Formalize the sprint phase as an optimal stopping problem [12] with a deadline (viewer patience, typically 5–15 seconds), determining the optimal probe timeout as a function of k, N , and the provider latency distribution. 14

4. Learned viability prediction: Train a lightweight model (gradient-boosted trees or a small neural network) to predict provider viability from historical resolution outcomes, replacing the Markov assumption with a learned transition model [30]. 5. Cross-user reservoir sharing: In multi-user deployments, share verified-stream information across users watching the same title, amortizing probing cost for popular content [20].

9

Conclusion

We have presented the Streaming Reservoir Convergence Theorem, a novel mathematical framework that unifies provider probing, stream failover, and quality selection under a single reservoir abstraction. The four theorems we prove—safety (harmonic bound on reservoir uptime), speedup (concurrent vs. batched acquisition), monotonicity (non-decreasing quality under lazy-refill), and prospect-weighted switching (no-thrash guarantee via loss aversion)—provide formal guarantees for multi-provider streaming. The CPRT algorithm implements these theorems in a three-phase pipeline (Sprint, Maintain, Transition) that replaces approximately 120 lines of ad-hoc logic with approximately 40 lines of reservoir integration. Empirical verification confirms all theoretical predictions across 22 independent checks. The reservoir of k = 3 streams achieves 9.15× mean time to depletion over a single stream, and concurrent probing provides 3–5× speedup over current batched defaults. The prospect-weighted switching rule is, to our knowledge, the first application of prospect theory to automated streaming decisions. The resulting hysteresis naturally prevents thrashing while maintaining the ability to upgrade quality when genuinely beneficial. The implementation is available upon request from the corresponding author.

References [1] Vijay Kumar Adhikari, Yang Guo, Fang Hao, Matteo Varvello, Volker Hilt, Moritz Steiner, and Zhi-Li Zhang. Unreeling Netflix: Understanding and improving multi-CDN movie delivery. In Proceedings of the IEEE INFOCOM Conference, 2012. [2] Zahaib Akhtar, Yun Seong Nam, Ramesh Govindan, Sanjay Rao, Jessica Chen, Ethan KatzBassett, Bruno Ribeiro, Jibin Zhan, and Hui Zhang. Oboe: Auto-tuning video ABR algorithms to network conditions. In Proceedings of the ACM SIGCOMM Conference, 2018. [3] Peter Auer, Nicolò Cesa-Bianchi, and Paul Fischer. Finite-time analysis of the multiarmed bandit problem. Machine Learning, 47(2):235–256, 2002. [4] Christos G. Bampis, Zhi Li, Anush K. Moorthy, and Alan C. Bovik. Towards perceptually optimized adaptive video streaming. IEEE Transactions on Image Processing, 26(10):4843–4855, 2017. [5] Nicholas C. Barberis. Thirty years of prospect theory in economics: A review and assessment. Journal of Economic Perspectives, 27(1):173–196, 2013. [6] Abdelhak Bentaleb, Bayan Taani, Ali C. Begen, Christian Timmerer, and Roger Zimmermann. A survey on bitrate adaptation schemes for streaming media over HTTP. IEEE Communications Surveys & Tutorials, 21(1):562–585, 2018.

15

[7] Enrico Bocchi, Luca De Cicco, and Dario Rossi. Measuring the quality of experience of web users. ACM SIGCOMM Computer Communication Review, 46(4):8–13, 2017. [8] Olivier Chapelle and Lihong Li. An empirical evaluation of Thompson sampling. In Advances in Neural Information Processing Systems (NeurIPS), 2011. [9] Jeffrey Dean and Sanjay Ghemawat. MapReduce: Simplified data processing on large clusters. Communications of the ACM, 51(1):107–113, 2008. [10] Pavlos S. Efraimidis and Paul G. Spirakis. Weighted random sampling with a reservoir. Information Processing Letters, 97(5):181–185, 2006. [11] William Feller. An Introduction to Probability Theory and Its Applications, volume 1. John Wiley & Sons, 3rd edition, 1968. [12] Thomas S. Ferguson. Optimal stopping and applications. Technical report, Mathematics Department, University of California, Los Angeles, 2006. [13] Sally Floyd and Van Jacobson. Random early detection gateways for congestion avoidance. IEEE/ACM Transactions on Networking, 1(4):397–413, 1993. [14] Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley, 1994. [15] Ehab Ghabashneh, Satadal Sengupta, and Jaideep Chandrashekar. A microscopic view of CDN failover. In Proceedings of the ACM Internet Measurement Conference (IMC), 2023. [16] Richard Gonzalez and George Wu. On the shape of the probability weighting function. Cognitive Psychology, 38(1):129–166, 1999. [17] Ilya Grigorik. High Performance Browser Networking. O’Reilly Media, 2013. [18] David Harel. Statecharts: A visual formalism for complex systems. Science of Computer Programming, 8(3):231–274, 1987. [19] Maurice Herlihy and Nir Shavit. The Art of Multiprocessor Programming. Morgan Kaufmann, 2008. [20] Te-Yuan Huang, Ramesh Johari, Nick McKeown, Matthew Trunnell, and Mark Watson. A buffer-based approach to rate adaptation. In Proceedings of the ACM SIGCOMM Conference, 2014. [21] Michael Isard, Mihai Budiu, Yuan Yu, Andrew Birrell, and Dennis Fetterly. Dryad: Distributed data-parallel programs from sequential building blocks. In Proceedings of the ACM EuroSys Conference, 2007. [22] Van Jacobson. Congestion avoidance and control. In Proceedings of the ACM SIGCOMM Conference, 1988. [23] Junchen Jiang, Vyas Sekar, Henry Milner, Davis Shepherd, Ion Stoica, and Hui Zhang. CFA: A practical prediction system for video QoE optimization. In Proceedings of the USENIX NSDI Conference, 2016.

16

[24] Parikshit Juluri, Venkatesh Tamarapalli, and Deep Medhi. SARA: Segment-aware rate adaptation algorithm for DASH. In Proceedings of the IEEE International Workshop on Quality of Service (IWQoS), 2015. [25] Daniel Kahneman and Amos Tversky. Prospect theory: An analysis of decision under risk. Econometrica, 47(2):263–291, 1979. [26] Samuel Karlin and Howard M. Taylor. A First Course in Stochastic Processes. Academic Press, 2nd edition, 1975. [27] Jonathan Kua, Grenville Armitage, and Philip Branch. A survey of rate adaptation techniques for dynamic adaptive streaming over HTTP. IEEE Communications Surveys & Tutorials, 19(3):1842–1866, 2017. [28] Leslie Lamport. Time, clocks, and the ordering of events in a distributed system. Communications of the ACM, 21(7):558–565, 1978. [29] Stefan Lederer, Christopher Müller, and Christian Timmerer. Dynamic adaptive streaming over HTTP dataset. In Proceedings of the ACM Multimedia Systems Conference (MMSys), 2012. [30] Hongzi Mao, Ravi Netravali, and Mohammad Alizadeh. Neural adaptive video streaming with Pensieve. In Proceedings of the ACM SIGCOMM Conference, 2017. [31] Mozilla Developer Network. Media source extensions API. MDN Web Docs, 2024. [32] Roger Pantos and William May. HTTP live streaming. IETF RFC 8216, 2017. [33] Dražen Prelec. The probability weighting function. Econometrica, 66(3):497–527, 1998. [34] Demostenes Zegarra Rodríguez, Renata Lopes Rosa, Eduardo Costa Costa, Jamil Abrahão, and Graça Bressan. Video quality assessment in video streaming services. IEEE Communications Surveys & Tutorials, 20(4):3123–3151, 2018. [35] Sheldon M. Ross. Introduction to Probability Models. Academic Press, 11th edition, 2014. [36] Iraj Sodagar. The MPEG-DASH standard for multimedia streaming over the internet. IEEE MultiMedia, 18(4):62–67, 2011. [37] Kevin Spiteri, Rahul Urgaonkar, and Ramesh K. Sitaraman. BOLA: Near-optimal bitrate adaptation for online videos. IEEE/ACM Transactions on Networking, 28(4):1699–1711, 2020. [38] Thomas Stockhammer. Dynamic adaptive streaming over HTTP: Standards and design principles. In Proceedings of the ACM Multimedia Systems Conference (MMSys), 2011. [39] Richard S. Sutton and Andrew G. Barto. Reinforcement Learning: An Introduction. MIT Press, 2nd edition, 2018. [40] Christian Timmerer and Carsten Griwodz. Dynamic adaptive streaming over HTTP: From content creation to consumption. In Proceedings of the ACM Multimedia Conference (MM), 2014. [41] Ruben Torres, Alessandro Finamore, Jin Ryong Kim, Marco Mellia, Maurizio M. Munafò, and Sanjay Rao. Dissecting video server selection strategies in the CDN. IEEE/ACM Transactions on Networking, 24(6):3322–3335, 2016. 17

[42] Amos Tversky and Daniel Kahneman. Advances in prospect theory: Cumulative representation of uncertainty. Journal of Risk and Uncertainty, 5(4):297–323, 1992. [43] Jeroen van der Hooft, Stefano Petrangeli, Tim Wauters, Rafael Huysegems, Patrice Rondao Alface, Tom Bostoen, and Filip De Turck. HTTP/2-based adaptive streaming of HEVC video over 4G/LTE networks. IEEE Communications Letters, 20(11):2177–2180, 2016. [44] Jeffrey Scott Vitter. Random sampling with a reservoir. ACM Transactions on Mathematical Software, 11(1):37–57, 1985. [45] W3C. Media source extensions. W3C recommendation, World Wide Web Consortium (W3C), 2016. [46] Francis Y. Yan, Hudson Ayers, Chenzhi Zhu, Sadjad Fouladi, James Hong, Philip Levis, and Keith Winstein. Comyco: Quality-aware adaptive video streaming via imitation learning. In Proceedings of the ACM MobiCom Conference, 2021. [47] Xiaoqi Yin, Abhishek Jindal, Vyas Sekar, and Bruno Sinopoli. A control-theoretic approach for dynamic adaptive video streaming over HTTP. In Proceedings of the ACM SIGCOMM Conference, 2015. [48] Matei Zaharia, Mosharaf Chowdhury, Tathagata Das, Ankur Dave, Justin Ma, Murphy McCauley, Michael J. Franklin, Scott Shenker, and Ion Stoica. Resilient distributed datasets: A fault-tolerant abstraction for in-memory cluster computing. In Proceedings of the USENIX NSDI Conference, 2012.

18

Record · ID 155193 · SHA-256 078478d32a1c839a
Retrieved via Conceptio — every document is proof-bundled with source, license, and retrieval metadata.