Skip to main content

Additional content sources

You can add several content sources for a CDN resource. They can be of two types:

  • primary—the CDN server requests content from these first;
  • backup—the CDN server requests content from these when all primary content sources are unavailable.

You can set a weight for any content source. The higher the weight of a content source, the higher its priority.

If the primary content source with the highest weight is unavailable, the CDN server will contact the primary content source with the next highest weight. Switching to the next content source occurs according to the timeouts for contacting the content source. If all primary sources are unavailable, the CDN server will request content from the backup source. As soon as the primary source with the highest weight becomes available again, the CDN server will automatically switch back to it.

To add additional content sources:

  1. In the control panel, on the top menu click Products and select CDN.

  2. In the CDN Resources section, open the CDN resource page → Origin tab.

  3. In the Domain field, specify the domain without a protocol and include the port, for example: example.com:443.

  4. In the Domain weight field, enter an integer. The higher the weight, the more requests the source will receive. The default value is 1.

  5. In the Number of retries field, specify the number of failed attempts to connect to the content source server after which the CDN will direct requests to the next source by weight. The default value is 10.

  6. If the source acts as a backup, check the Source is a backup checkbox. A backup source must contain the same files as the primary one.

  7. If you need to add another source, click Add source and repeat steps 3–6.

  8. Click Apply. While settings are being applied, the CDN resource will be in the PROCESSING status. You cannot apply other settings during this time. The settings will be applied when the CDN resource transitions to the ACTIVE status.

  9. Make sure that the Host header specified in the CDN resource settings is allowed on the added source. You can view the Host header specified for the CDN resource in the control panel: in the top menu, click ProductsCDN → CDN resource page → Origin.