Video: Edge Compute and the CDN

Requests to servers are returned only tens of milliseconds later which is hardly any time to wait. But they quickly add up to users waiting seconds for their player to find out what video it wants, get it and finally start showing it. We all know that time is money when it comes to people ‘pressing play’ so reducing this startup time.

Anime streaming service, CrunchyRoll went to task to reduce their startup time. Michael Dale, VP of Engineering there, sits with Heather Chamberlin Mellish from AWS to describe how they used AWS to optimise the communications needed to establish a streaming session,

Named Katana, the project looked at the 12+ requests involved between third parties and the player itself which were all needed to start the session. Advertising companies need to be consulted, streaming manifest files need to represent chunks from multiple CDNs, SSAI and metrics were done with third-party vendors and the service is protected with DRM. These are just some of the factors which led to so many return trips needing to be accomplished before shipping.

This talk provides an overview and a little bit of a ‘behind the scenes’ of a blog post which also covers this project.

Key to success was deploying on AWS Lambda@Edge which is a server which allows you to run code within AWS’s CloudFront. If you have Python or Javascript, this allows you to run it at the edge server closest to the user. For Crunchyroll’s global audience, this is particularly useful as it avoids having to set up infrastructure in every one of the AWS regions but still reduces much of the return trip time. Michael explains that, although Lambda is often viewed as an ephemeral service, when it’s not in use it can be suspended and used again in the future allowing it to maintain state for a player.

Michael explains the ways in which Katana has achieved success. Many of the third-party services have been brought into Lambda@Edge and AWS. DRM and Advertising are still third-party, but doing most things within the edge and also pre-emptively returning information such as manifests has removed many requests. The video breaks down their use of GraphQL and how Multi-CDN and SSAI workflows have been implemented.

Watch now!

Michael Dale Michael Dale
VP Engineering,
Heather Mellish Heather Chamberlin Mellish
Principal Edge Go To Market Specialist,
AWS Amazon Web Services