Data isn't just used to add surcharges to your cell phone bill and violate your privacy. It's also used quite a bit in live streaming video.
In order to send a video and audio stream, you need to transport the data feed across the internet. Quite simply, the more data you use, the more it will cost you.
Don't worry though. It's still possible to reduce your costs by following these life tips:
Use Less (Data)
Well... obviously, but how can you actually do that?
Being prepared is a good thing, but there is such a thing as over-preparation. You don't need to book an entire hotel for just yourself, so don't have empty servers sitting around being unproductive.
You can avoid over-provisioning by spinning up new instances to meet an increase in demand, then spinning them back down when they are no longer needed. The Red5 Pro autoscaling solution can even do this for you with an automated process.
In some use-cases, such as an event-based app like HQ Trivia, you can completely shut down your application when not in use.
Find a Good Resolution
Determine how most users will view your live stream and use that to determine a practical resolution and bitrate. If most users will be viewing on mobile devices then you don't need as large a resolution as users viewing a stream from a browser on a laptop.
A lower resolution means a smaller footprint which can then be sent at a smaller bitrate.
Of course, there is still a concern about the quality of a stream and how it will look with a lower resolution. Depending upon your application, this may or may not be an important factor.
Keep it Together
You can avoid out of region egress charges by setting up clusters in geographic areas that your users will frequently stream in.
Now there's a balancing act here since it may not be worth it if only 2 or 3% of your traffic is coming from outside the anticipated region. You would have to weigh the cost of setting up a cluster, against the extra cost of egress data.
Side note: clusters can also improve performance as well as cut down on data charges.
Tone it Down
- Red5 Pro is streamlined thus increasing the number of connections you can get per instance. Thus with fewer instances, you can get more connections. You won't have to spin up extra instances so you can avoid the per-instance cost.
Overall, there's a lot of room for compromise. It's all about finding the right balance for you and your use case. You don't want to pay for more than you need, but you still want to be able to adapt quickly. Staying nimble allows you to expand and contract to meet your needs and finding the right stream size allows you to remain efficient.