Gcore CDN has a new featureâdownload speed limit. It allows you to reduce the speed of delivering content to users.
Letâs see what this feature is for, how it works, and how to enable it.
Why limit download speed?
This is relevant for those using a CDN to stream videos. Limiting the speed allows you to reduce the bandwidth consumed and reduce costs.
The maximum speed is required only when the video is running on the userâs device: you need to transfer enough fragments as quickly as possible for the player to start playing.
While the first video fragments are being played, the rest buffer, and such a high download speed is no longer needed. All the while, the video continues to be transmitted as quickly as possible. More and more fragments are buffered despite the fact that there are already enough fragments for playback. It turns out that some of the paid resources are wasted.
But, if after launching the video, you limit the speed to the optimal one, then the viewers will download it just as quickly and play without delays, and you wonât overpay for CDN traffic.
This feature can also be useful when you need to limit the speed for some users so that the rest have a higher speed.
How is it beneficial for streaming services?
Letâs say users can watch movies on your website. There is a free plan with ads and a paid subscription without ads.
You want to simultaneously disable ads for those who paid for the subscription, and provide them with the maximum download speed. How do you do it? By limiting the speed of the free plan.
You set limits for those who watch movies for free, and the remaining capacity goes to those who paid for the subscription. They then have a higher download speed.
How does the speed limit work?
Our option has two modes: static and dynamic.
Static mode
In this mode, you set a limit on all content that is transmitted through the CDN. In your personal account, you set the maximum connection speed. Additionally, you can specify how much data will be downloaded without limit.
How does it work?
For example, customers watch streaming video on your website. You know that 100 Kbps will be enough to download it. But, when starting the video, the speed should be at its maximum. For the video to start, you need to transfer 5 MB.
- Select the static limit option in your personal account.
- Set the limit to 100 Kbps.
- Indicate that customers download the first 5 MB without the speed limit.
- When some of your users turn on the video, 5 MB will be transferred over the network at the maximum speed.
- After that, the speed will be limited to 100 Kbps.
If you donât need a certain amount of data to be transferred without the limit, donât set this parameter. Then, the limit that you have set will take effect from the first byte of the stream.
Dynamic mode
This option allows you to set different limits for different users, or for different types of content. The speed is adjusted here based on requests with the âspeedâ and âbufferâ arguments. âSpeedâ sets the maximum connection speed, and âbufferâ sets how much data will be transferred without the speed limit. The âbufferâ argument is optional.
How does it work?
- Select the dynamic limit option in your personal account.
- Create links with the âspeedâ and âbufferâ arguments that set the parameters you want.
- When your user clicks on the link, a request with arguments is sent to the server.
- The limit is set according to those arguments.
- If there is no âbufferâ argument in the request, the speed limit is applied from the first byte.
- If a request to the server is sent without arguments, then for such a request the limits donât apply, and the video is streamed at the maximum speed.
Letâs get back to the movie and paid subscription example above. To limit the speed for those who watch movies for free, create this link:
https://example.com/video.mp4?speed=100k&buffer=5000k
Subscribers of the free plan will only get to the website using this link, and they will be subject to a speed limit of 100 Kbps after downloading 5,000 KB.
Paid users, on the other hand, will have a regular link without speed and buffer, and their content will be downloaded without the limit.
How to enable this feature
You enable this feature in your personal account.
- Select your resource in the âCDN resourcesâ section.
- In the âNetwork Restrictionsâ section, check the âDownload Speed Limitâ option.
- Select static or dynamic mode.
- If you have selected static mode, in the âConnection Speedâ field, specify the maximum speed, and in the âLimit Afterâ field, specify the amount of data that will be downloaded without the limit.
- If you have selected dynamic mode, you donât need to specify anything else.
- Click âSave changesâ.
Set your own content delivery rules using flexible settings in your CDN personal account.