The Road to Russia: How to make streaming video as reliable as broadcast television

Hadar Weiss, CEO, Peer5

California-based Peer5 was founded in 2012 soon after Google open sourced the WebRTC project. WebRTC (Web Real-Time Communication) provides browsers and mobile applications with RTC capabilities via simple Javascript APIs.

“In WebRTC, we saw the potential to create a more decentralised and resilient Internet, one that wouldn’t be so prone to traffic bottlenecks and breakages,” explains Hadar Weiss, CEO, Peer5. “Since video accounts for 80% of all data delivered via the Internet, we decided to build a large-scale peer-to-peer service that would change the dynamics of video delivery.”

In order for this service to be pervasive, the originators needed WebRTC to be broadly adopted by the industry; in other words, to be incorporated into all major web browsers. This finally happened in 2017 when Apple and Microsoft announced support for WebRTC in Safari and Edge respectively.

Weiss continues: “This industry wide adoption of WebRTC, along with the shift from Flash-based video players to HTML5 based video players, has made it incredibly easy to integrate Peer5 into industry standard HLS and MPEG-DASH streaming workflows. This ease of integration, combined with the value that our service provides, has resulted in tremendous customer traction. Today, our clients include broadcasters, OTT services and media companies throughout the world who use Peer5 to deliver their live and on-demand streams.”

Peer5 (the name is a combination of the two fundamental building blocks of its service: Peer-to-Peer and HTML5) enables broadcasters to deliver higher quality video streams to larger audiences in more geographic locations at a dramatically lower cost when compared to traditional server-based content delivery networks (CDNs). Today, Peer5 helps streaming operators to reach huge audiences at a price point that won’t break the bank. To achieve this goal, Peer5 operates the world’s largest peer-to-peer (P2P) content delivery network. The company believes that the only way to make streaming video as scalable as broadcast television – able to reach hundreds of millions or billions of simultaneous viewers – is to employ a P2P architecture that enables streaming capacity to grow proportionally with streaming demand.

Easier delivery

So, what makes the Peer5 solution different? “Imagine a situation where lots of people are trying to stream same high-profile sporting event – such as the World Cup,” says Weiss. “Everyone who is watching the same content at the same time needs to download the same underlying chunks of video. At Peer5, we simply ask the question: ‘Why should everyone connect to the CDN edge server to download the same chunks over and over again, when it’s possible – and frequently more efficient – to fetch those chunks from other viewers?’”

Peer5 works by creating ad-hoc, peer-to-peer mesh networks consisting of users (peers) who are watching the same content and then coordinating these users so they can share the underlying video chunks with each other.

“Our P2P mesh networks do not entirely replace traditional servers, however. We believe that the optimal content delivery solution for broadcasters is a hybrid model where Peer5 is used in combination with their existing HTTP-based CDNs. Our goal is to enable limitless video delivery by unifying the existing server infrastructure with an elastic P2P computing layer that grows with demand.”

This unification is accomplished via two lines of Javascript. This client side Javascript implements a ‘hybrid switcher’ which monitors the quality of the connection between the viewer and the CDN, as well as between the viewer and all of the peers in his swarm. As the video player makes HTTP requests to retrieve chunks, the switcher decides (on a chunk by chunk basis) which source (CDN or peer) from which to fetch the content.

In short, Peer5 diversifies chunk delivery to produce a better viewing experience.

No overloads

As more and more chunk requests are handled by the swarm, the broadcaster sees dramatic reductions in server load and, consequently, higher stream quality (faster load times, less buffering, longer viewing sessions) for all viewers.

Since Peer5 is Software as a Service (SaaS) and uses only JavaScript, the client-side integration is transparent to the end-user (no plug-ins or client install is necessary) and only requires a small change to the broadcaster’s HTML page.

Peer5 works by creating ad-hoc, peer-to-peer mesh networks consisting of users who are watching the same content who can then share video chunks with each other.

“The use of a P2P platform in combination with a client-server distribution system greatly increases transmission reliability. All of the benefits of HTTP distribution are retained, but the P2P layer makes transfer more geographically agnostic, less prone to peak demand issues and reduces failures in other irregular conditions,” emphasises Weiss.

Peer5 boosts video stream quality by enabling viewers to fetch some of the underlying video segments from other people watching the same content. By retrieving segments from multiple sources, videos will load faster using P2P technology. The faster a video segment loads, the less likely the entire stream is to rebuffer.

“Because Peer5 is a completely serverless solution, our capacity is not defined by the number of servers we have deployed. Instead, our capacity is directly proportional to the number of viewers who are watching the stream. As more viewers join a stream, our capacity to deliver that stream grows in lockstep, to an infinite level. In other words, we operate the most elastic video delivery service in the world. We can scale up as necessary to deliver the biggest events. We can also scale down to zero when there are very few viewers on a stream.”

Case in point… World Cup

“Obviously, with a worldwide audience for the tournament in Russia, the demands on the streaming services will be enormous. It is under those circumstances that our service will benefit our customers the most, enabling them to deliver high quality streams no matter how large the audience becomes.”

Weiss reveals that among those rights holders utilising the Peer5 solution will be FuboTV, a US based OTT service, RTP in Portugal, Medcom in Panama, a national broadcaster in northern Europe, plus various South American broadcasters with the appropriate rights.

“Although there is no need for us to be located in Russia for the finals, our engineers will be constantly monitoring our platform to measure and route traffic as efficiently as possible so viewers can enjoy watching the games on their computers, phones and smart TVs.”

He continues: “Generally, we don’t need to interact with the broadcasters on a match by match basis. Once we are integrated with the broadcaster’s video player and have completed testing, the service just works automatically with no human intervention required. From time to time we will run a ‘flight check’ with our customers when they foresee an exceedingly popular event or want to make changes to their streaming setup.”

Weiss concludes: “Peer5 is essentially a streaming insurance policy. We ensure that your streams never become ‘too popular’ by off-loading HTTP requests to the P2P mesh network. This means servers are not overwhelmed by too many requests and that viewers receive the highest quality streams possible. Our technology may sound complicated, but our service is actually very simple. We’re in the business of delivering video over the internet at lower costs while improving stream quality so viewers can watch as much as they want.”

Subscribe and Get SVG Europe Newsletters