streamingcdn

REST API and CDN for audio streaming


I'm facing a bandwidth issue on a server that hosts a REST API and I wondered if I could use a CDN to fix it.

Most of the bandwidth consumption is due to static assets provision, like audio files.

Access to those assets requires an authentication token (JWT like). When the user requests for an asset, I first need the API to do some checkups, and then streams an audio file.

A CDN appeared to me as an ideal solution, but it raised two questions :


Solution

  • If you want basic API authentication for CDN request then most CDN's support mechanism to do this - for example the Akamai information is here:

    Answering the second question, so long as the CDN and your client support range requests then you should be able to download chunks, if you are using basic HTTP progressive download type streaming.

    If you are using HLS or DASH streaming then nearly all CDN's will support this as standard.