FAQ on CDN migration
Will CDN continue to work if S3 in SPB-1 is unavailable? How does it behave for cached objects and on a cache miss?
Only if the option to return content from cache on origin errors (Use Stale) is enabled in advance: if the origin responds with an error, CDN servers will deliver the latest cached version of the content with the header Cache: Stale. You can select which errors trigger serving from cache. CDN servers will continue checking origin availability with each new request and will update the cache once the origin recovers.
Use Stale only works for already cached objects: if a file is not in the cache of the CDN server or shielding server, there is nowhere to fetch content from — the CDN server will return an error, and the website may be displayed incompletely.
Is configuring a backup origin in another region with automatic failover supported if the primary origin becomes unavailable?
Да. You can add multiple content origins to a CDN resource — primary and backup ones. For each origin, a weight (priority) and the number of failed connection attempts are configured. If all primary origins are unavailable, the CDN server will request content from the backup origin, and once the primary origin becomes available again, it will automatically switch back. The backup origin must contain the same files as the primary one.
How is an origin failure detected, how long does the switch take, and are cache purges or mass errors possible during recovery?
Origin failure is determined by exceeding timeouts when requesting the content origin and the number of failed connection attempts. By default, the timeout is 10 seconds for each stage of requesting the origin, and the number of failed attempts is 10. If there is only one origin, exceeding any of the timeouts means the content will not be delivered — the CDN server will return 504 Gateway Timeout and will request the origin again on a new request.
The switchover speed to the backup origin depends on the configured timeouts and number of failed attempts. Switching origins does not clear the cache. To smooth out the origin recovery moment, use the Use Stale option with the updating parameter — it allows serving a stale cached response while files in the cache are being updated.
Which components of the CDN and its control infrastructure are shared across regions and can become a single point of failure?
CDN is a distributed network of caching CDN servers with points of presence in 30+ cities. A file is cached on the server that received the request. The unavailability of an origin or a specific region does not affect the delivery of cached content from other points in the network.
Components shared across the entire network include shielding servers and authoritative DNS servers. Shielding servers cache all files requested by CDN servers and reduce the load on the content origin. If a shielding server is unavailable and the file is not in the CDN server cache, the content cannot be retrieved. Authoritative DNS servers serve CDN resource addresses, and their unavailability affects content delivery in all regions.
To reduce the impact of shared component unavailability, use additional content origins and content delivery from cache on origin errors.
Why does a CDN resource return 403 Forbidden with the X-Reason-Code: 7 header, even though the origin is available and responds with 200?
The 403 error occurs when caching is disabled on the CDN resource. Cache settings are disabled by default. CDN delivers content faster specifically due to caching, so with this setting, resource operability is not guaranteed.
Using CDN as a reverse proxy for dynamic requests to your own application or API without caching, as well as for VPN, is not supported. This is misuse of the service and may lead to restricted access to the service or resource blocking by the vendor.
Purging the cache can take up to 15 minutes; during this time, the CDN resource is in the PROCESSING status, and applying other settings is unavailable. Learn more in the Purge cache instructions.
Why does the "403 Forbidden. Insufficient access permissions" error occur when creating a CDN resource, or why is the resource not created?
Creating a CDN resource is blocked if there are insufficient funds on the balance. Top up your balance with the monthly cost of the resource (550 ₽ per month) and try creating the resource again.
Learn more in the CDN resource blocking if there are insufficient funds on the balance subsection of the CDN payment model and prices instructions.
What should I do if a CDN resource stays in the PROCESSING status for more than 30 minutes and does not switch to ACTIVE?
Applying CDN resource settings can take from 30 minutes up to 2 hours. During this time, applying other settings is unavailable. If the resource is not active after this time, submit a ticket. Content may start being distributed even before the status changes to ACTIVE.