How to control content loading speed

How to control content loading speed

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 to control content loading 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.

How to control content loading speed

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.

  1. Select the static limit option in your personal account.
  2. Set the limit to 100 Kbps.
  3. Indicate that customers download the first 5 MB without the speed limit.
  4. When some of your users turn on the video, 5 MB will be transferred over the network at the maximum speed.
  5. 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?

  1. Select the dynamic limit option in your personal account.
  2. Create links with the ‘speed’ and ‘buffer’ arguments that set the parameters you want.
  3. When your user clicks on the link, a request with arguments is sent to the server.
  4. The limit is set according to those arguments.
  5. If there is no ‘buffer’ argument in the request, the speed limit is applied from the first byte.
  6. 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.

  1. Select your resource in the “CDN resources” section.
  2. In the “Network Restrictions” section, check the “Download Speed Limit” option. How to control content loading speed
  3. Select static or dynamic mode.
  4. 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. How to control content loading speed
  5. If you have selected dynamic mode, you don’t need to specify anything else.
  6. Click “Save changes”. How to control content loading speed

Set your own content delivery rules using flexible settings in your CDN personal account.

Sign up for CDN for free

How to control content loading speed

Subscribe
to our newsletter

Get the latest industry trends, exclusive insights, and Gcore
updates delivered straight to your inbox.