Yandex Cloud
  • Services
  • Solutions
  • Why Yandex Cloud
  • Pricing
  • Documentation
  • Contact us
Get started
Language / Region
© 2022 Yandex.Cloud LLC
Yandex Cloud CDN
  • Getting started
  • Step-by-step instructions
    • All instructions
    • Resources
      • Creating a resource
      • Editing basic settings of a resource
      • Configuring resource caching
      • Configuring log export
      • Pre-loading files to CDN servers
      • Purging resource cache
      • Configuring request and response headers
      • Configuring CORS for responses to clients
      • Configuring HTTP methods
      • Enabling file compression
      • Enabling file segmentation
      • Enabling origin shielding
      • Disabling a resource
      • Deleting a resource
    • Origin groups
      • Creating an origin group
      • Editing an origin group
      • Connecting an origin group to a resource
      • Deleting an origin group
  • Practical guidelines
    • Publishing game updates
    • Integrating an L7 load balancer with the CDN and Object Storage
    • Blue-green and canary deployment
  • Concepts
    • Service overview
    • Resource
    • Origins and origin groups
    • Exchanging data between clients and the CDN
      • Overview
      • TLS certificates
      • CORS
      • Compressing content
    • Exchanging data between the CDN and origins
      • Overview
      • Host header
      • Segmenting content
      • Origin shielding
    • Caching content
    • Exporting logs
    • Quotas and limits
  • Access management
  • Troubleshooting
  • API reference
    • Authentication in the API
    • gRPC
      • Overview
      • CacheService
      • OriginGroupService
      • OriginService
      • ProviderService
      • RawLogsService
      • ResourceService
      • OperationService
    • REST
      • Overview
      • Cache
        • Overview
        • prefetch
        • purge
      • OriginGroup
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • Origin
        • Overview
        • create
        • delete
        • get
        • list
        • update
      • Provider
        • Overview
        • activate
        • listActivated
      • RawLogs
        • Overview
        • activate
        • deactivate
        • get
        • update
      • Resource
        • Overview
        • create
        • delete
        • get
        • getProviderCName
        • list
        • update
  • Pricing policy
  1. Concepts
  2. Origins and origin groups

Origins and origin groups

Written by
Yandex Cloud
  • Origin groups

CDN servers retrieve the content requested by clients from origins.

As origins, you can use:

  • A server with a domain name linked to it. For example, if the server's domain name is files.example.com, to get the /static/common.css file, CDN servers will try to access files.example.com/static/common.css on the server.
  • A bucket from Yandex Object Storage, for example, configured as a static site hosting.
  • L7 network load balancer from Yandex Application Load Balancer. CDN servers will access the load balancer at one of its IP addresses that must be selected in the origin settings.

An origin must respond to the CDN server's request within 5 seconds. If no response was received during this time, the CDN server responds to the client with the 504 Gateway Timeout HTTP status code.

When creating a resource, an origin or an origin group is specified for it. After creating a resource, in the resource settings, you can replace an origin with another origin or a resource group with another resource group.

To reduce the load of CDN servers on origins, you can enable origin shielding for a resource.

Origin groups

To distribute the load between origins hosting the same content, you can combine them into an origin group.

Origins in the group can be active or backup. Requests from CDN servers are distributed among active origins in a circular manner.

For example, if an origin group includes two active origins, the first content request will be sent to the first origin, the second request ‒ to the second origin, the third request ‒ to the first origin again, and so on.

If the active origin responded to the CDN server with HTTP status code 5xx, the request is sent to one of the backup origins. If there are no backup origins in the origin group or the response includes code 5xx again, the CDN server sends the response with code 5xx to the client.

Tip

If you publish content in two or more buckets, combine them into a group of L7 load balancer backends and use the load balancer as an origin as shown in the blue-green and canary deployment scenario. Otherwise, you'll need to support in the service sending requests to the CDN with different Host header values corresponding to different buckets.

See also

  • Instructions for operations with origins.

Was the article helpful?

Language / Region
© 2022 Yandex.Cloud LLC