Session management

How broadpeak.io keeps track of a session context

Session ID

broadpeak.io uses a unique value generated by the platform on the first request coming from the player which identifies a unique session. This value is the bpkio_sessionid. The system keeps contextual information related to this bpkio_sessionid, so all the following manifest requests from the player must contain the generated bpkio_sessionid.

A manifest request without bpkio_sessionid will be interpreted as a new session with no previous context, and will be assigned a bpkio_sessionid value.

The bpkio_sessionid value is added to the manifest URL when the player performs the first request. For more information we invite you to read the sections below.

Query Parameter

By default, the system generates a bpkio_sessionid value for all manifest requests that come without the bpkio_sessionid query parameter. It will then respond with an HTTP 307 with a value in the location header being the concatenation of the manifest path of the initial request, plus the bpkio_sessionid query parameters, the generated value and some other system compulsory query parameters.

curl -i -L https://stream.broadpeak.io/d3d9446802a/myStream/myOutput/index.mpd?zipcode=25267
HTTP/2 307
location: /myStream/myOutput/index.mpd?zipcode=25267&bpkio_serviceid=d3d9446802a&bpkio_sessionid=10d0e55a246-f8c09588-c798-4890-a4b7-54155d02b742

The figure below shows a sequence diagram of session creation between the client (player), the CDN and broadpeak.io. To simplify, we are using building blocks, but a CDN might be built with several nodes.

In addition to the bpkio_sessionid query parameter, the system also adds a bpkio_serviceid query parameter which takes the value which is immediately after the FQDN of the request. That value is also removed from the path.

HTTP GET https\:/stream.broadpeak.io/**d3d9446802a**/myStream/myOutput/index.mpd?
  HTTP 307 Location: /myStream/myOutput/index.mpd?bpkio_serviceid=d3d9446802a&bpkio_sessionid=x

📘

Note:

In HLS, the bpkio_sessionid and the bpkio_serviceid are automatically passed down into the URI of the media manifests.


Header

In the event you use Broadpeak on-premise CDN, it is possible to rely on the CDN functionality which generates the bpkio_sessionid itself, and pass it to broadpeak.io in the request via specific headers. In this scenario, broadpeak.io will not generate the bpkio_sessionid value and will respond with a an HTTP 200 and the contextualized manifest directly in the body. This scenario is not enabled by default.

Contact us directly or your Broadpeak representative for more information.