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 main content source with the highest weight becomes unavailable, the CDN server will reach out to the main content source with the next highest weight. Switching to the next content source occurs according to timeouts when accessing the content source. If all main sources are unavailable, the CDN server will request content from the backup source. As soon as the main source with the highest weight becomes available again, the CDN server will automatically switch to it.

To add additional content sources:

  1. In the control panel, in 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 with a 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 Fail count field, specify the number of failed connection attempts to the content source server after which the CDN will forward requests to the next source by weight. The default value is 10.

  6. If the source acts as a backup, select the Backup source checkbox. The backup source must contain the same files as the primary source.

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

  8. Click Apply. While the settings are being applied, the CDN resource will be in the PROCESSING status. During this time, applying other settings is unavailable. The settings will apply when the CDN resource changes 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 Products → CDN → CDN resource page → Origin tab.