
When we sit down with a streaming platform team tasked with integrating Rilla into delivery, the first questions are rarely about cost.
They’re about integration risks:
And, critically, there is a long list of questions to confirm that this model delivers video safely and securely between viewers, without affecting QoE (quality of experience).
Developers also want to know how complex the integration is, how configurable it is and, inevitably, how to integrate a completely different kind of product into their stack.
First, let’s look at how the real needs of platform teams shape our architecture. These teams deliver live video to millions of concurrent viewers, across many platforms and on constrained devices.
Rights holders and owners of premium content expect a high quality of experience, strong content protection and piracy prevention. Those expectations call for broadcast-grade features, and they shaped the design in three ways: seamless integration, playback protection and observability.
Seamless Integration. A Peer SDK runs in your existing player, with no change to your stack. It works at the point where the player requests media segments. The player’s segment requests go through the SDK, which decides where each one is served from and hands the data back to the player in the normal way. Your player, CDN or multi-CDN setup, encoding and packaging pipeline, DRM and licence servers, and authentication and entitlement systems stay as they are.
The core of the Peer SDK is written in Rust and shared across platforms, with a thin native wrapper for each one. The SDK model extends to other platforms, so a trial can prove one platform and one player before it expands.
Playback Protection. The Peer SDK checks every segment request against the player’s state, buffer health and the segment’s playback deadline. Delivery starts on your CDN path. Configurable latency budgets hold the live edge: peer segments are only used when they arrive inside the playback deadline.
The SDK also limits what a device gives back. Peer traffic is sent at low priority, upload is capped, and the SDK cuts upload when it detects congestion on the viewer’s network. You can set policies in your application, for example peer delivery on Wi-Fi only for mobile devices.
Observability. Network-level and player-level observability, including our inspectable segment delivery timeline, measure quality, cost and network health. The SDK exports logs, metrics and traces through OpenTelemetry, into preconfigured Grafana dashboards or your own observability tools. The metrics include connection success, round-trip time, packet loss, buffer health and how much video came from the CDN and how much from peers.
Put simply, Rilla’s orchestrator decides who connects, the SDK decides which segments are safe to interleave into delivery, and the CDN is always there as the fallback.
The AI Orchestrator is a real-time cloud service that decides who serves whom, and keeps deciding as the audience moves. Every viewer registers with it as a peer. It groups viewers by segment compatibility, and patent-pending deep reinforcement learning ranks and assigns peers.
Each Peer SDK sends telemetry to the orchestrator: connection success rates, round-trip time, packet loss, estimated upload capacity and how much it varies, NAT and network type, and buffer health. From this the orchestrator scores every peer. Reliable peers with spare capacity that are close on the network score highest. Unstable or low-capacity peers score lower or are left out. Peers whose NAT type or firewall settings stop them connecting are not paired.
The orchestrator also keeps most peer traffic local. It limits which peers can connect by region and network, using IP geolocation, network distance and the autonomous system number of each viewer’s ISP.
Viewers join at kick-off, drop out at half-time and move between networks, so the orchestrator keeps updating these decisions during the event.
When a peer connection degrades or drops, the SDK reports it and the orchestrator assigns one or more replacement peers. Meanwhile the SDK uses the other peers it is connected to, or your CDN, so the buffer stays healthy.
The orchestrator works with signals only. No video passes through it, it is not in the path between your CDN and the player, and it does not control playback.
The Peer SDK is the execution layer. It serves each request from a peer or from your CDN, inside the playback deadline. It opens and manages the connections to other peers, tells them which segments it holds and learns which segments they hold.
For each segment, the SDK tries the assigned peer, then other peers, then your CDN. It tracks a segment as it arrives from a peer in chunks. If the segment starts to look late, the SDK fetches the rest from your CDN and joins the two parts, so no data is downloaded twice.
The SDK has a small footprint, with configurable CPU and memory limits. A device only contributes upload from the headroom it has spare.
It is a multi-platform Peer SDK, for browser/web, mobile and CTV.
Your viewers form the peer network. These are the people watching the same live stream, who share video with each other directly instead of each requesting it from the CDN.
Rilla organises the network into peer groups of viewers whose segment requests match on several dimensions, including buffer position, rendition, network distance and ISP or subnet. This gives peers the best chance of sharing the right segment at the right time, which raises CDN deflection as each viewer’s playback changes.
Peers connect to each other directly, using WebRTC. On any one connection a device either receives segments or relays them to another viewer.
A viewer usually keeps several peer connections open, its peer group (like a neighbourhood), but downloads each segment from one peer at a time. The extra connections let it switch quickly if a peer fails.
In a live stream, most of the audience is watching the same segments at roughly the same time, so a segment that reaches one viewer can be passed on to others.
Rilla is designed to scale to millions of concurrent viewers.
Every viewer brings bandwidth: more viewers, more capacity, more efficiency and higher deflection.
In suitable live conditions, with only 30% of viewers contributing their upstream bandwidth, Rilla can achieve 60–90% CDN deflection.
Peers carry the same encrypted segments as your CDN. DRM, licensing and entitlement stay untouched.
A segment a viewer gets from a peer is byte-for-byte identical to the one your CDN would have sent. All major DRM vendors are supported.
Rilla supports Widevine, FairPlay Streaming and PlayReady. Licence requests, authentication, entitlement and playlist access stay on your existing systems and do not go through peers.
Peer connections are set up through Rilla’s signalling layer, which only allows sessions the orchestrator has approved. Rilla collects network and playback telemetry, with no personal data except the viewer’s IP address, which is needed to connect peers and is held in memory only for the session. Peers that connect to each other can see each other’s IP address.
Rilla has instant CDN fallback whenever a peer can’t deliver. Your CDN is the safety net. When a peer drops out, the CDN fills the gap and playback carries on.
The SDK falls back to your CDN when a peer connection fails or cannot be set up, when peers cannot send data fast enough to keep the buffer full, when latency or packet loss rise, when no eligible peer is available, or when NAT or firewall settings stop two peers from connecting. Each switch is timed against the player’s buffer, and nothing needs to be configured.
Because the CDN path is always available, a trial can be staged and reversed. Peer delivery can be turned on for selected platforms, regions, streams or audience cohorts, with feature flags and a kill switch. Deflection is compared with a CDN-only control group, against agreed limits for startup time, rebuffering and playback errors, before exposure increases.
The full architecture is on Rilla Docs.
How It Works and the POC and trial guide are open to everyone. Our integration guides, with the architecture, the Peer SDK for browsers and a developer quick start, are available to partners on request.
If you’d like to see how this would sit in your own stack, we’d be glad to walk your platform team through it.
Rilla Team