Documents
Hybrid Fetch


Teltoo takes advantage of HTTP byte serving to improve CDN Offload performance. This process consists of downloading just a portion of a video segment instead of all of it. This allows Teltoo to download a video segment by combining data from the P2P network and the CDN. You can see this as a mid-segment source selection. 

This setting is active by default but requires that the CDN or origin media server be adequately adjusted. We have created different guides to activate this on different CDNs or media servers. We highly recommend that you keep it always active, and Teltoo will automatically detect the support from the CDN.

Validating your playlists

To check if Hybrid Fetch will work with your video use the following CURL request:

  1. Open the terminal
  2. Type the following command:
    curl -i -r 0-20 https://[host]/[application_name]/[stream_name]/playlist.m3u8

You should get a 206 response that includes the following headers:

HTTP/1.1 206 Partial Content
Accept-Ranges: bytes
Access-Control-Expose-Headers: Date, Server, Content-Type, Content-Length
Server: WowzaStreamingEngine/4.7.7
Cache-Control: no-cache
Access-Control-Allow-Origin: *
Content-Range: bytes 0-20/87
Access-Control-Allow-Credentials: true
Access-Control-Allow-Methods: OPTIONS, GET, POST, HEAD
Access-Control-Allow-Headers: Content-Type, User-Agent, If-Modified-Since, Cache-Control, Range
Date: Mon, 30 Sep 2019 14:29:03 GMT
Content-Type: application/vnd.apple.mpegurl
Content-Length: 21

A response like this one, with a 206 response code and a Content-Range header, indicated that range requests are active and working. This will allow Hybrid Fetch to work.

General overview

The overall steps are as follows:

  1. Set up CORS
  2. Set OPTIONS
  3. Set RANGE requests

Set up CORS

You can follow this existing guide to adjust this option.

Set the OPTIONS method

For range-requests to work, the OPTIONS method has to be active on your CDN or media server. This will allow the script that requests the segments to check if the option to use range-requests is available.

Your origin server/CDN has to have this header:

Access-Control-Allow-Methods: GET, OPTIONS

Set the Accept-Ranges header

To allow byte fetching to happen (this is what enables Hybrid Fetch to work), we need to set the corresponding header, RANGE. This is the header that allows Teltoo’s script to obtain the remaining part of a segment from the CDN or media server.

Your origin server/CDN has to have this header:

Access-Control-Allow-Headers: Range

Guides

Following the previous guide will allow Teltoo to use Hybrid Fetch. Different CDN providers and media servers need to be configured and adjusted in various manners. We have made several guides to complete these steps in different platforms and software.

Other CDNs and media servers

We are constantly adding new guides on how to set up and activate options like this one. If we do not currently have your provider or software listed, contact us and we will help you configure your servers.




Want to know more?

Talk to an expert