Auto Transition to CDN Deployment Strategy

Does anyone have any ideas for a strategy for promoting content on CDN during deployment?

The key problem that I am facing is that we have a website that is available in various contexts: local development, development server, stage, and then, finally, live.

The liver version of the site should load assets from the domain to which CDN: assets.domain.com will be indicated.

However, we will have many links to assets pointing to a relative folder, for example. / images / in css, possibly in js, as well as in HTML and source.

Our new site will use capistrano for deployment, and perhaps we can connect another build tool (apache ant?) Or some kind of custom script to find / replace paths.

I am wondering if anyone needs to deal with this problem earlier and what solutions you created to automate CDN management in terms of promoting content to CDN and managing html and css links to assets in CDN.

thank

Imanc

+3
source share
1 answer

Generally speaking, CDNs use pull-based caching rather than push-based replication.

This is due to the fact that pushing a large amount of content (taking into account all their customers) into any significant number of distributed nodes is a difficult problem with distributed systems, and forecasting future traffic patterns to optimize this distribution is even more difficult.

(, Akamai) , " ", , .

" ", , CDN; , CDN , . , ( FTP, SSH ).

TTL (, Cache-Control: max-age), , URL-, .

+3

Source: https://habr.com/ru/post/1744457/


All Articles