Video CDN Getting Started Guide: Everything You Need to Know

Table of Contents

    Despite what may seem like overwhelming evidence to the contrary, video content delivery networks (CDNs) are not magic. Of course, from the perspective of someone who sends or receives content with little thought as to how it travels, they may appear as such. The truth is, video CDNs are expansive server networks that work independently or together to bolster the information highway. What's more, they work from some straight-forward principles: distance matters even for digital journeys, it's best to keep your most needed assets close at hand, and more processing power equals more power to process.

    Distance matters even for digital journeys.

    This guide is aimed at furthering your understanding of what video CDNs are and how they work. It will also walk you through the various use cases for video CDNs and how you can determine the best one for your needs. Finally, by the time you're done with this guide, you will have experienced first-hand how easy it is to live stream with a CDN enabled streaming solution.

    Jump to Stage One

    Jump to Stage Two

    Jump to Stage Three

    Stage One: Understanding

    If you're hear, then you're likely still trying to figure out what exactly a CDN is and how it factors into a video streaming platform. Take some time to familiarize yourself with the ins and outs of video CDNs or jump down to STAGE TWO to better understand how a CDN might suite your specific needs and what to look for when choosing one.

    What Is a Video CDN?

    Let's dip into one of our favorite video CDN metaphors: the Amazon distribution network. Ever wonder how Amazon can handle so many same day deliveries? No, the USPS is not lying to you. It really can take days for packages to get from one part of the country to another. The trick is that the dog treats you ordered aren't coming from three states over. They are likely already in your city at one of thousands of Amazon fulfillment centers.

    When you request an item from Amazon, headquarters will refer you to whichever distribution network is closest geographically to you. That center houses a plethora of the most requested Amazon items for immediate shipment. If they don't have the item, they ping the next nearest center and so forth until the item is located.

    video-cdn-getting-started-broad-workflow-1200w

    This is how a CDN works. An origin server (Amazon headquarters) runs the show, but they are not necessarily the source of your streamed content. When you request a stream (item). The closest server (fulfillment center) geographically to you will send it along provided it has the stream cached (in stock). If not, then the server requests the stream from the origin server. It's a simple way to make popular content more accessible across a large area.

    How Do CDNs Work?

    Granted the above metaphor sums it up nicely, CDNs may function somewhat differently depending on their purpose. Video CDNs in particular may behave differently if they are streaming live versus on-demand content. For starters, let's break the above description up into discreet steps. Then we'll look more closely at how CDNs work specifically for video streaming.

    • User Request - A user visits a website or uses an application that utilizes a CDN.

    • DNS Resolution - The user's browser issues a DNS request to resolve the domain name to an IP address. In other words, the DNS server translates the domain name into a numeric IP address. It then directs the browser to the nearest CDN edge server.

    • Cache Check - The CDN edge server checks its cache to see if it has the requested content stored locally. If it has the content, then it sends it along to the user.

    • Origin Server Request - If the edge server doesn't have the requested content, it sends a request to the origin server to retrieve the required content.

    • Content Retrieval - The origin server locates and sends the requested content.

    • Caching the Content - The edge server caches the content for future requests.

    • Delivery to User - The edge server delivers the (now cached) content to the user's browser or application.

    • Monitoring and Optimization - CDN providers will often monitor cache hit ratios alongside other performance metrics to continuously optimize content delivery.
    video-cdn-getting-started-how-do-cdns-work-workflow-1200w

    Video CDNs work similarly, just with video content. For pre-recorded content, the process is functionally the same as that described above. However, live streamed video content can also benefit from a video CDN.

    Where Does Video CDN Fit into a Live Video Workflow?

    If a video CDN's prime directive is to provide faster and more reliable content to users due to geographic proximity, then what's the point of using a video CDN when live streaming a video? How can users benefit from a video CDN edge server's proximity if the content is sent live instead of cached locally? The truth is the content is still cached; it's just done so in a continuous stream.

    Remember when we said that more processing power means more power to process? A live stream can still benefit from a video CDN as the edge servers shoulder some of the load that would otherwise be handled by the origin server. It turns out that just as proximity matters, so too does the number of streams. If viewership of a live stream spikes and you don't have a video CDN in place, then your server could be overloaded with the number of streams it's sending to individual viewers. With a CDN in place, your origin server is sending signals out only to the CDNs who, individually, are serving their regions by caching and sending streams of the same live content. This is known as load balancing.

    video-cdn-getting-started-cdn-livestreaming-workflow-1200w

    Live Video Streaming with a Video CDN Step-by-Step: 

    • Video Capture - Capture your live video using a camera or other video source.

    • Encoding - Use a video encoder to convert the raw media files into a format suitable for streaming.

    • CDN Connection - If it doesn't happen automatically, you need to make sure your encoder is configured to send the live stream to your chosen CDN. This typically involves providing the encoder with the CDN's URL and a unique stream key.

    • Origin Server Transcoding - The origin server may act as a media server, transcoding the encoded media files for optimized playback via adaptive bitrate streaming.

    • Distribution - Once media files are prepared as needed, the origin server sends them along to the CDN edge servers in the network.

    • Caching - Content is cached as it is live streamed to the edge servers. Certainly, this can be used to save the content for future viewings. However, it also serves to create a second version of the live stream to be streamed from the CDN edge server itself for the purposes of load balancing.

    • Distribution/Playback - Upon request, the live stream is sent from the closest CDN, which is actively caching it, to the requesting end user.

    Highlight: Wowza's Real-Time Streaming at Scale

    WebRTC made industry waves with its sub-second streaming capabilities. However, the revolutionary technology lacked scalability. By combining WebRTC streaming technology with our custom video CDN, Wowza provides scalable ultra-low latency streaming up to a million viewers.

    Video CDN Benefits Summary

    To understand CDN benefits, you need only look to the above use cases. However, we've taken the time to break them down here and elaborate on a few key areas below.

    • Faster speeds - Adaptive bitrate capabilities, load balancing, and caching all lead to lower latency.
    • Improved performance - Reduced latency leads to fewer playback issues, including less buffering.
    • Reduced server load - Additional servers and local caching help to balance processing needs and prevent server strain.
    • Greater reliability - Thanks to load balancing and improved speeds, streams are less likely to fail with growing audiences.
    • Enhanced security - Many CDNs come with added security features, such as digital rights management (DRM) capabilities, access controls, SSL/TLS encryption, and more.

    • Cost savings - Video CDNs help reduce the bandwidth and server resources your content consumes, leading to lowered operating costs.

    Stage Two:
    Assess Current and Future Needs

    Video CDNs benefit a lot of companies across a variety of use cases, but is it the right choice for you? Start by asking yourself the following: Do you need a CDN now? Will you need one in the future? If the answer to either question is "yes", then it's time to explore your options. Let's take a closer look at key video CDN benefits through the lens of your business's unique needs. This starts with looking at the right features and asking the right questions.

    Scalability

    Scalability is a core concern in video streaming because it directly impacts the quality and reliability of video streams. A streaming solution that can't scale properly risks stream interruptions, degradation of stream quality, and an inability to reach viewers in certain locations or on certain devices. In short, without a scalable solution, your stream won't be able to fully realize its potential. When considering your own scalability needs (now and in the future), ask yourself the following:

    • Are my viewers growing and at what rate? How many viewers am I anticipating in the coming year?

    • Where are my current and target viewers? Are they geographically dispersed? Am I planning to expand my reach?
    • How many viewers am I likely to get at one time? What is my peak viewer concurrency? What is the average viewer concurrency?
    • What content do I deliver? Is it live or pre-recorded? Is it intended for larger or smaller audiences? Is there potential for viewership spikes?
    • What bitrate do I require to delivery streams at my target quality? Am I achieving this? Would my content benefit from a higher video bitrate?
    • Am I currently experiencing any bottlenecks or other disruptions? How impactful are these to my business?

    Without a scalable solution, your stream won't be able to fully realize its potential

    Reliability

    Reliability lives somewhere at the intersection of quality and scalability. In other words, it speaks to your ability to deliver quality streams to all who request it without risking bottlenecks, dropped streams, and more. Determining if your streams are reliable enough, starts with the following:

    • How much buffering do your viewers experience? Has this buffering lead to dropped viewership?
    • Does your stream utilize adaptive streaming workflows? How effective are these?

    • Are your streams interactive? How much is this level of interactivity affected by latency?

    Security

    Security is of paramount importance for video streaming as it ensures the privacy and integrity of transmitted content. With the increasing prevalence of cyber threats, safeguarding sensitive information and intellectual property has become a crucial aspect of online communication. Implementing robust content security measures in video streaming helps protect users from unauthorized access, data breaches, and piracy. This not only fosters trust and confidence among users and content creators, but also ensures compliance with relevant laws and industry standards, thereby promoting a secure and reliable digital environment for all stakeholders.

    • Is your content behind a paywall? Does unauthorized access affect your bottom line?

    • Are your users secure? Are you asking them for any private information (like credit card info) that should be protected?
    • Is your content copyright protected? How concerned are you about unauthorized copying and distribution?
    • Do you currently employ any security measures? Do you think they are sufficient?
    • How certain are you that your video streaming platform complies with data protection and privacy regulations in your region? What about internationally?

    Performance

    CDN video streaming performance refers to the efficiency and speed with which video content is delivered to end-users across the globe. A high performing video CDN can stream to a large number of people at low latency and with minimal buffering issues. These CDNs also scale seamlessly with demand. This benefits both your live and VOD streams. If you're streams aren't performing as highly as you'd like, a video CDN can help you get the rest of the way there.

    • Is your chosen stream reaching your intended audience? Are you able to stream to their preferred devices?

    • Can you identify any technical issues affecting the user experience? Do you have a method for analyzing the user experience?
    • How is your overall audience retention rating? Do you notice any patterns in viewer drop-offs?

    Support

    The right video CDN partner will include customer support to help you make the most of the CDN and address any needs that arise along the way. This contrasts with a do-it-yourself method of building your own server network and helps build confidence in the video CDN provider. In short, why reinvent the wheel when you can partner with a knowledgeable CDN provider with a reliable track record?

    Common Use Cases for Video CDNs

    When determining if a video CDN is right for you, start with the above questions. Then explore these use cases to help you determine the efficacy of a video CDN in your workflow.

    • Live events streaming - Video CDNs are crucial for broadcasting live events, training sessions, and webinars, facilitating seamless communication between employees and stakeholders.

    • News broadcasting - News outlets leverage video CDNs to stream live news coverage and video content, ensuring audiences receive real-time updates on world events.

    • Social media platforms - Popular social media platforms like Facebook and Instagram use video CDNs to deliver user-generated video content and livestreams to millions of users with minimal delays.

    • E-commerce websites - Online retailers employ video CDNs to showcase product videos and live demonstrations, enhancing the shopping experience for customers.

    • Gaming and Esports - Video CDNs are essential for streaming live gaming events and Esports tournaments, providing low latency and high-quality video to viewers around the world.

    If you're concerned about scale, security, and reliability, then you should consider a video CDN. Live and interactive content can also benefit from the low latency provided by a video CDN. Finally, many video streaming platform services are CDN enabled, meaning you're not just paying for the CDN, but also a plethora of other tools.

    What Are the Types of Video CDNs?

    There are three main types of CDNs, each with a slightly different workflow. Which type works best for you depends on what you're streaming and to whom.

    Peer-to-Peer (P2P) CDN - This type of CDN is decentralized and primarily made up of individual computers made available for file sharing using a server called a tracker. This method reduces bandwidth demands but is less secure.

    Push CDN - In a push CDN, the content creator uploads their content to the CDN's servers, which then distribute it to edge servers around the globe. This model is suitable for websites with large files or frequently updated content since it ensures that the latest version is available on all edge servers.

    Origin Pull CDN - In a pull CDN, the edge servers request content from the origin server when a user requests it for the first time. The edge server then caches the content for future requests, limiting the number of times it needs to ping the origin server.

    Given their static content and need for security, websites are best served by origin pull CDNs. Video streaming specifically, however, is a bit more complicated. VOD streaming could benefit from an origin pull set up as the content is also relatively static and edge servers can cache the most frequently requested videos. However, live streaming could benefit more from a push CDN, proactively sending the live streamed video to all edge servers at the time of the event. P2P CDNs are not recommended for either given the obvious security concerns.

    What Makes a Good Video CDN?

    The short answer to that question is that it meets all of the above criteria and helps you achieve your streaming goals. That means that a good video CDN covers a wide geographic region and is secure, reliable, and cost-effective. The long answer includes some additional considerations.

    • DNS Response Time - Domain name server (DNS) response time refers to the time it takes the DNS server to return a numeric IP address. This is more significant when it comes to website loading in general but can influence video streaming via CDN when said videos are hosted on a website. Average DNS response time ranges between 20 and 120 milliseconds.

    • Connect Time - Video CDN connect time refers to the amount of time it takes for a user's device to establish a connection with the nearest video CDN server in order to access cached content. It is an important aspect of website performance, as a shorter CDN connect time ensures faster content delivery and an improved user experience. A good CDN connect time is typically around 50 to 100 milliseconds (ms) or less.

    • Latency - When it comes to CDN, latency can refer to the wait time users experience when requesting content. This could be how long it takes a webpage to load, or it could refer to the delay between live action and the live stream on someone's screen. Low latency for a live stream can range from sub-second latency to around 30 seconds and can be affected by other factors, such as streaming protocols.

    • Cache Hit or Miss Ratio - Cache hit and miss ratios are essential metrics in determining the efficiency of a cache system, such as those in a video CDN. The hit ratio refers to the percentage of successful content requests served by the cache. On the other hand, a cache miss ratio represents the percentage of cache misses compared to the total number of data requests made to the cache. Ideally, a cache system should have a high cache hit ratio (95-99%) and a low cache miss ratio (1-5%).

    • Easy Integration and Management - The right video CDN will make it easy for you to get started and make necessary adjustments. By offering straightforward integration processes and user-friendly management tools, a video CDN not only streamlines the deployment process but also enables website administrators to efficiently monitor and tweak their content delivery strategy. This, in turn, results in faster load times, improved scalability, and better user experiences.

    • Responsive Customer Support - In the same spirit of efficient video CDN management, a responsive and knowledgeable video CDN customer support will prevent downtime and make it easier for customers to optimize their CDN's effectiveness.

    • Robust Security Features - Video CDNs provide opportunities for implementing and managing a wide range of security features. Choose a video CDN that makes it easy to build a secure stream and whose integrity you have faith in.

    Using a Video CDN Provider vs. Video Platform With CDN

    Strictly speaking, video CDN providers are exactly that: providers. They offer access to a CDN network. This often comes hand in hand with certain security and analytics features, but exactly what features and how secure and expansive the CDN is varies by provider.

    A CDN enabled video platform is a little different. While customers are still benefiting from access to video CDN, they are also getting assistance with other features. For example, many CDN enabled video platforms include content management systems (CMS) that help them store, organize, and disseminate their video assets. These platforms also often have more robust security and analytics and may come enabled with video players for easier stream hosting.

    Many CDN enabled video platforms include content management systems that help them store, organize, and disseminate their video assets.

    Put simply, if all you need is access to a server network to reach a wider audience more effectively and securely with your existing video solution, then a video CDN provider may be enough. However, if you think you could benefit from additional features afforded by CMS, video player, and more, then you should consider a CDN enabled video platform.

    Stage Three: Begin

    The best way to know if a platform or service is right for you is to try it yourself. A free trial with Wowza Video will allow you to stream live or upload a video and route the stream through our video CDN.

    Start Your Wowza Video Free Trial

    Accessing our free trial is a breeze, and it offers complete functionality in terms of user interface and API for a full 30 days. All you need to register is an email address, with no credit card required, and you'll be granted full access to Wowza Video's tools and platform. The only constraint is time. Your live streams will be restricted to 20-minute intervals, but you can easily resume streaming once a stream ends.

    Sign up for the free trial: 

    • Go to the Free Trial Page.

    • Enter your email address.

    • Verify your email address.

    • Create a password.

    Access the Wowza Dashboard:

    • The system should automatically sign you in. Otherwise, sign in using your credentials.

    • Click on the small person icon in the upper right corner of your web page.

    • Select Wowza Video. Note that if you can't find Wowza Video, go to My Account > Info, and find Wowza Video under Products.

    Create Your JSON Web Token

    Wowza Video API transitioned to JSON Web Tokens (JWT) for security and authentication. This open-standard security measure transmits information as JSON objects and is widely considered both highly flexible and secure.

    Access Token Management: 

    • Click Wowza User in upper right of the dashboard.

    • Open dropdown and select Account Settings.

    • Click on Token Management in the text box.
    Video CDN token management

    Execute a Live Stream Using Postman API

    You can work directly within our user-interface (UI) or via Postman API. As many of our clients prefer Postman for testing out our API, we've included steps for that.

    Let's assume you're beginning in your Postman workspace. The first thing you'll want to do is locate the Wowza workspace to access the Wowza Video API collection. Search for Wowza, and the Wowza Video REST API should be your first result.

    Within this, you have a few different options. Wowza currently supports three versions of the Wowza Video API, including a beta for testing new features and the more dependable and thoroughly tested current version. We recommend you choose the latter if you're looking for a straight-forward streaming experience.

    Wowza video CDN API

    Forking Wowza API:

    • Click on the three dots to the right of the name.
    • Select View More Actions.
    • View the dropdown and choose Create a Fork.
    • View the fields to the right.
    • Label your fork.
    • Choose the workspace you wish to move it to.
    • Click Fork Collection.

    During this process, you have the option to check watch original content. We recommend this, as it will notify you whenever updates are made to the API.

    Authenticate Wowza Video

    Here is where that JSON Web Token you created comes into play. This tells Postman that you have permissions to access the API (complements of your free trial). Currently, if you select the forked collection and look under Authorization, you should see "no auth". It's time to copy tour JSON Web Token over. We recommend making an environment for this token.

    • Find Environments in the left-hand column and click on it.
    • Click New.
    • Click Environment in the pop up.
    • Give your environment a name.
    • Create a variable.
    • Select secret or default as the type for your variable.
    • Past the key under Current Value or Initial Value. If you selected secret in the last step, then the key will be hidden when pasted in.

    Wowza Video CDN API setup

    Note: As to whether you place the key in the Current Value or Initial Value field, that depends on whether you want the key to be stored locally (current) or backed up and stored by Postman (initial).

    • Go to the forked collection from Wowza.
    • Click on Authorization in the left-hand bar.
    • Click on Type to open the dropdown.
    • Select Bearer Token.

    Note: This is where the environment you made can come in handy. Select No Environment in the upper right and change it to the one you created for your JSON Web Token.

    Starting the Live Stream

    You are not limited to live streaming when trialing Wowza Video. However, starting a live stream is the easiest and fastest way to test the Wowza API with CDN.

    • Select live_stream under (Current) Wowza API.
    • Select Post - Create a Live Stream on the left.
    • Select Body on the right.

    Starting a live stream

    This is where you can set certain specific parameters for your live stream, including the size of the video, your encoder, your broadcast location, and more. You can also indicate whether you want to host the player page (by typing true next to hosted page), which we recommend for the purposes of testing out the stream.

    This is also where you can set certain parameters for the video CDN. Recall that we talked about the difference between push and pull CDNs above. For a trial live stream, you should opt for a push delivery method for the CDN. Do this by typing push next to delivery method. This means your content will be sent to the transcoder, which needs to be manually started, instead of requested by the server and sent automatically. If you want the live stream to start automatically, then set the delivery method to CDN.

    Starting a live stream delivery method

    Once you've specified the necessary inputs in the Body section:

    • Hit send.

    • Review the returned information.

    • Copy the info next to id under live stream.

    • Select Put - Start a Live Stream in the left-hand column.

    • Enter the live stream ID in the designated field.

    • Hit Send.

    Provided you chose push as your delivery method, hitting send will start the live stream.

    Post Stream Analytics

    Did your live stream live up to its potential? For starters, be sure that anyone you wanted to view the live stream was able to find it. You can make your live stream available in a few different ways.

    • Embed code - Use this to embed the player on your web page or blog post.
    • Playback URL - Share this directly with viewers via private correspondence or blast it across social media.
    • Playback page - Wowza provides a hosted playback page for your convenience. This is a particularly good option for one-off live streams or testing the API.

    As for seeing how the live stream is doing, Wowza Video offers numerous metrics for stream analytics. Regardless of how viewers have accessed your stream, you can watch the numbers in real-time on the Wowza Video dashboard under Available Streams or by going to Get - Fetch Metrics for Active Live Stream in Postman using the same stream ID from before.

    Wowza Video access gives you access to a variety of metrics, including:

    • Real-time stream health metrics which show stream data like frame rate and key frame interval.

    • Post stream metrics, which provide information like average bitrate for a stream after it's concluded.
    • Historic stream health aggregates data over numerous streaming instances.
    • Viewership data, including numbers, location, and devices.
    • VOD-specific analytics that show stream metrics and viewer data for on-demand assets.

     

    The Role of Video CDN in Your Live Stream

    A demo of our API is only going to tell you so much about the video CDN behind it. After all, your 30 days with our product may not result in streaming to a large global audience, experiencing unexpected viewership spikes, and so forth. In fact, if the CDN is doing its job by reducing latency and enhancing stream security and reliability, then you shouldn't really notice it at all. In any case, full access to our video CDN either temporarily or long-term provides:

    • Reach more people.
    • Reach a global audience.
    • Scale fluidly with expected and unexpected viewership.
    • Enhance stream security.
    • Reduce latency.
    • Increase stream reliability.
    • Access stream analytics.

    So, what's next? Contact sales to learn more about our CDN-enabled services to better understand how you might benefit from this technology. Start that free trial if you haven't already to sample our platform. Or, if you are ready to start streaming long-term with a powerful global video CDN behind you, visit our store.