So far I have decided that I want the files to be downloaded into CDN node only when requested by client and files that won't be read for a week will be deleted.
Except that I am not sure how to approach the distribution because I could overwhelm the source of files with too many request for files from the nodes. Also I am not sure if using websocket is good enough to transfer files(so I can re-use the source's api http server connection) or whether I should send data directly via length-value "protocol" or some another one. Compression is obvious. But other than that I am not sure what modern CDNs use today.
What are some standard CDN architectures for distributing the files these days?