Upload Data to a Push Zone
There are a couple of ways to upload data to a KeyCDN Push Zone. This guide walks through how to upload data to our CDN storage cloud through FTP(S) and rsync over SSH. A Push Zone should be used for larger files (> 10 MB), which do not change frequently. The maximum file size should not exceed 5 GB.
How to upload data with FTP(S)
If a new Push Zone was just created you will need to wait a few minutes until the Zone has been deployed. Follow the steps below to successfully upload your data to KeyCDN using FTP(S):
From the KeyCDN dashboard, navigate to Subusers and add a user for the specified Push Zone.
Connect to the FTP server:
Hostname:
ftp.keycdn.com
Port:21
Username:{subuser_username}
Password:{subuser_password}
Upload data to your Push Zone.
We recommend using FTPS (explicit FTP over TLS) to avoid plaintext transfer of your credentials over the network and using an FTP client like FileZilla.
How to upload data with rsync over SSH
If you are interested in lsyncd read our lsyncd over SSH article. Follow the steps below to successfully upload your data to KeyCDN using rsync:
From the KeyCDN dashboard, navigate to Account > Authentication. From here upload your SSH public key (
ssh-rsa
orssh-ed25519
). It takes a few minutes for the key to be distributed to the responsible servers.Add your SSH private key on your system:
ssh-add /path/to/your/private.key
Upload/synchronise data to your Push Zone using the following rsync command:
rsync -rtvz --chmod=D2755,F644 {path_to_your_folder}/ {keycdn_username}@rsync.keycdn.com:{zone_name}/
Example:
rsync -rtvz --chmod=D2755,F644 /Users/example/examplepush/ example@rsync.keycdn.com:examplepush/
In addition to the above, you might find the following flags useful:
-n
(Perform a trial run with no changes made.)--delete
(Delete extraneous files from destination directories.)--delete-excluded
(Also delete excluded files from destination directories, which requires the--exclude
options.)
If you want to list the content in your Push Zone use the following command:
rsync --list-only {keycdn_username}@rsync.keycdn.com:{zone_name}/
For verification purposes, the SSH fingerprint for rsync.keycdn.com
corresponds to the following:
SHA256:Z/h7sNSBHNJpD7WwLLAeWAXD+ZaxBGLM+RwPHTMKk1k
How data gets deployed to a Push Zone
Now that your data is uploaded to our storage cluster, there are a few things to consider when it comes to deploying this data:
- New content is instantly uploaded to our storage cluster and is immediately available.
- If a change is made to an existing file, it takes approximately 15 minutes for that file to be updated (seen as
REVALIDATED
in the logs). - If a file is deleted from the storage cluster, it takes up to 30 minutes for that file to be removed from the edge servers.
- It is not possible to purge the entire CDN cache in a Push Zone. Only Purge URL can be used in a Push Zone. If you require this functionality please use a Pull Zone instead.
- Although your content has been uploaded to our storage cluster, data is only deployed to a POP if it has been requested.