Flipboard Blog

How to reduce Amazon CloudFront costs in the context of streaming or live streaming while maintaining reliability and video quality?

Even wealthy national TV broadcasters view Amazon AWS, as well as other American cloud providers like Microsoft Azure and Google Cloud Platform (GCP), as a luxury. However, these providers are more commonly utilized by developers or devops teams as part of the agile process to achieve faster releases, which may not always be the most critical aspect for managing 24/7 streaming services. Quality assurance and testing should take priority in such scenarios. Whether you employ Amazon Elemental MediaLive or AWS IVS, there is a high probability that Amazon will provide a strong incentive to exclusively use Cloudfront for delivery, as it represents a major portion of the cost. However, even when using these two services, there is no obligation to have CloudFront as the only provider.

In my previous work experience with an online video platform (OVP), I was surprised to discover that all video assets were stored on Amazon AWS S3, despite monthly attempts to minimize AWS costs. It appeared that the choice was driven by a lack of trust in building internal hosting and processing, leading to the assumption that reliability was guaranteed. However, AWS's three significant outages in late 2021 resulted in the OVP being unable to do anything for their customers' streams as long as AWS was down. This event demonstrated the importance of not relying solely on a single provider, no matter how luxurious it may seem, as there is a business rule that suggests it is never a good idea.

“As long as AWS is experiencing downtime, there is nothing we can do to restore our customers' streams.” (According to a developer working at an OVP that heavily relies on Cloudfront...)

How to reduce Amazon CloudFront costs in the context of streaming or live streaming while maintaining reliability and video quality and avoid AWS outage

Jeff Bezos-owned Washington Post describing 3 Amazon AWS outages in a single month and how bad it is to put all eggs in one basket



What is the potential for negotiating pricing with Amazon AWS or another cloud provider?


The potential for negotiating pricing with Amazon AWS or another cloud provider can vary. In some cases, there may be room for negotiation, particularly if you have a significant volume of usage or are willing to commit to a long-term contract. However, it's important to keep in mind that cloud providers operate on a large scale and typically have standardized pricing structures that are difficult to change and margins are quite high, so even a 90% discount could still be more expensive than other providers for your use case, as shown in our CDN Live Streaming costs calculator.

If you're interested in negotiating pricing with a cloud provider, it's essential to do your research and understand the provider's pricing model, as well as any discounts or promotions that may be available. Additionally, it's helpful to have a clear understanding of your own usage patterns and requirements, as this information can be used to negotiate a more favorable pricing agreement. Ultimately, while it's possible to negotiate pricing with a cloud provider, it's not always guaranteed, and the level of negotiation potential may vary depending on the specific provider and circumstances.

The problem with regions pricing


Cloud providers tend to prioritize their cheapest regions, which are usually located in the US, when offering their services. Unfortunately, little information is available about other regions such as Asia, where prices can often be double or more than the primary region. This lack of attention to other regions' pricing can cause unexpected issues for businesses that become successful and experience significant growth. These once-thought marginal costs can quickly become a primary cost center, particularly in Asia, which is the most densely populated region globally. As such, it's essential for businesses to carefully consider the pricing of cloud providers in all regions, especially if they plan to expand their services globally.

It's possible to measure the audience regions in advance by using a ticket gate or a subscription model. If your online video provider offers audience insights before the event, as it should, you'll be able to determine how many people are attending the event and where they're from. Even if the event is free, you can still collect this information through an email collection gate.

By using this information, you can choose a cloud provider that offers competitive pricing in the regions where your audience is concentrated, which can help you avoid unexpected costs down the line. This can also help you optimize your content delivery network to ensure that your audience has the best possible viewing experience, regardless of their location. Overall, having insights into your audience beforehand is essential for making informed decisions about which cloud provider to use and how to optimize your content delivery strategy.

What are 'cloud credits' and how can I anticipate the end of these credits


Cloud credits are a type of currency offered by some cloud providers that can be used to offset the costs of using their services. These credits are typically provided as part of a promotional offer, and may be given to new customers or as a reward for certain types of usage.

The exact terms and conditions of cloud credits can vary depending on the provider, but generally they have an expiration date after which they can no longer be used. In some cases, cloud credits may also have usage limits or other restrictions, such as only being applicable to certain types of services or usage scenarios.

To anticipate the end of your cloud credits, it's important to carefully track your usage and monitor your account balance. Most cloud providers offer tools and dashboards that allow you to easily monitor your usage and remaining credits, so you can plan accordingly and avoid running out of credits unexpectedly. Additionally, it's a good idea to read the terms and conditions of any cloud credit offers carefully, so you understand the expiration date and any usage restrictions that may apply.

It is advisable to have a backup delivery method in place when using a cloud provider to avoid large bills once your credits are depleted. To ensure a smooth transition, it's actually easy to do it for streaming-related operations

What makes reducing cost on AWS Cloudfront, Azure and GCP so easy for streaming?


Unlike conventional web delivery, certain streaming protocols such as HLS incorporate multiple delivery points directly into the standard, allowing the publisher to have direct control over weighted load balancing and high availability.

HTTP Live streaming (HLS) failover, as used by iReplay.TV's repeater, is a feature within the HLS streaming protocol that allows a publisher to specify multiple sources of the same content at different bitrates in the top-level manifest file. When a viewer initiates a playback session, the player requests the manifest file and receives the list of sources available for that content. The player then decides which source to play based on the available bandwidth and other factors.

In the event that one of the sources cannot cope with the demand, the player can automatically switch to a different source with the same bitrate (and the same source file in a 'repeater' mode) first, then to a lower bitrate (if the viewer doesn't have enough bandwidth with the secondary source) to prevent buffering and ensure a smooth playback experience. This process is known as adaptive bitrate streaming and is a key feature of HLS. With multiple sources available, the player can switch between them seamlessly to ensure the best possible viewing experience for the user.

By using HLS failover, publishers can ensure that their content is always available to viewers, even during peak demand periods. This feature provides a level of redundancy that improves the overall reliability of the streaming service.

However, not all players are equipped to handle this feature, so it's crucial to run tests before deploying if you lack expertise in streaming.

Am I jeopardizing the streaming experience by not selecting a cloud provider as the primary method of content delivery?


The HLS failover system not only guarantees that a primary source will not be utilized in case of a malfunction but also ensures that the player (if completely compatible, as mentioned above) will load the highest possible quality. By selecting it as an alternative source, you can be confident in maintaining both playback reliability and quality while also benefiting from cost savings when the primary source is accessible. Please refer to the four distinct scenarios at the end of this page, ranging from 100% to 0.1% usage of your current cloud provider

What else can I do technically ?


If you do not have a cloud provider that includes a repeater feature, there are limited options for controlling streaming costs, such as blocking or capping the bitrate in specific regions where streaming may be more expensive. However, one way to control costs is through caching, particularly in the device and browser cache, which can significantly reduce the amount of data used. It's important to ensure that media segments are cached for a long duration for each viewer, especially when using cloud DVR, event-type playlist, digital signage, or any repeating content through playlist or loops that do not have the HLS offline feature. By leveraging caching effectively using the usual HTTP cache headers (Pragma, expires, etc), you can reduce the amount of data that needs to be transferred and potentially save on streaming costs.

The particular case of live streaming


Even with live streaming, unexpected traffic spikes can occur, such as new viewers deciding to purchase a ticket after the event has started due to live-stream highlights being shared. To handle this situation, a peer-to-peer compatible player can be utilized for additional viewers, leveraging your existing architecture by attempting to stream from nearby peers first, then from existing sources as a secondary option. This approach is cost-effective and can help manage unexpected traffic without increasing expenses significantly.

I have no choice but to use my online video provider CDN that is AWS Cloudfront / Microsoft Azure / Google Cloud Platform / Akamai / Fastly / Limelight Networks, can I still reduce my costs ?


Absolutely. The repeater functionality can be integrated with any CDN or cloud provider, provided that an m3u8 URL for your stream is obtainable

How much does it cost to deliver a stream with a cloud provider only and a combination of a cloud provider and iReplay.TV feature ?


Let's take the usual 'Apple recommendations' stream as an example, with 1000 viewers watching a 7.8 Mbps HD stream for one hour (3.351 TB) in US, Europe and Asia
Divide by more than 4 times your AWS Cloudfront costs by using iReplay.TV
With just a few minutes of effort, you can significantly reduce your AWS expenses by utilizing iReplay.TV's repeater.

GAFA or GAFAM & GDPR & sovereignty


By configuring iReplay.TV's repeater to 100% (completely eliminating your GAFAM provider from the manifest accessed by the video player), you can generate a fully localized stream for your European viewers.

It is important for a European company to deliver streaming from within Europe using European CDNs and servers. The European Union has strict data protection regulations, such as the General Data Protection Regulation (GDPR). By keeping streaming services within Europe, companies can better comply with these privacy laws and ensure that their user data is being handled according to European standards.

Some industries may be subject to specific regulatory requirements that mandate data storage and processing within the European region. By utilizing European servers and CDNs, companies can adhere to these regulations and avoid potential fines or penalties.

Get your own TV channel on iOS, Android, Roku, Fire TV and Connected TV like this one easily

Unlimited, automated, 24/7 TV Channels from your content at $0.001 per minute

Cars and Roads - Brands (https://ireplay.tv/carsandroads/brands.m3u8)

Trusted by

trusted by Sky for native iOS development, SGAI interstitials, infrastructure and headend consulting
trusted by Arte for low-latency live streaming
trusted by DJing for VOD2Live, very high quality live streaming, Jukebox TV, private podcasts, paygate, iOS, iPadOS apps
trusted by CNRS for 'Antarctica to World' Live Streaming
trusted by Velocix for consulting and ops services
trusted by Thomson Video Networks/Harmonic for OTT/cloud training


A portion of iReplay.TV's revenues, specifically 1%, is being allocated towards funding research and providing assistance for children's cancer treatment at Gustave Roussy Institute
Learn more about Gustave Roussy cancer Institute