Knowledge Base

Articles list
Scroll to top

CDN Use Case

Setup option:

  1. A user creates their own online storage for distributing static content from a direct link (such as cdn.domain.ru, where domain.ru is the user's domain, and all static content is located in the cdn subdomain). In this case, we can ignore the default domain by writing a CNAME entry for it and writing cdn.domain.ru everywhere.
  2. In the Selectel control panel, the user enables the CDN service, enters their subdomain as the content origin, and is then assigned a ***.selcdn.net subdomain. The user has to configure their server, which is responsible for distributing static content, to process requests from their sub domain. For example, if you use Nginx, follow these instructions.
  3. In their site settings, the user has to enter ***.selcdn.net instead of cdn.domain.ru when linking to static content. For example, if the file image.png is located on the origin in a folder named "content":
    1. Original link: cdn.domain.ru/content/image.png
    2. New link: ***selcdn.net/content/image.png

When using the second link, cached content will be sent directly from the CDN provider's server. If the object has not been cached, it will be requested from origin (cdn.domain.ru), moved to the cache, and then sent from the CDN server. Transfers operate as follows:

  1. A user requests content from a site
  2. The CDN provider chooses the CDN edge server that can deliver the content at the fastest speed
  3. If content has not been cached on the server, the CDN (***.selcdn.net) will retrieve it from the origin (cdn.domain.ru)
  4. Future users from neighboring areas will receive content from the CDN server