Support

Find answers, guides, and tutorials to supercharge your content delivery.

Upload Data to a Push Zone

Updated on November 13, 2019

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.

NOTE: Push Zones are limited to 250,000 inodes (files and directories) and have a maximum file size of 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):

  1. From the KeyCDN dashboard, navigate to Subusers and add a user for the specified Push Zone.
  2. Connect to the FTP server:

    Hostname: ftp.keycdn.com
    Port: 21
    Username: {subuser_username}
    Password: {subuser_password}

  3. 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.

For verification purposes, the fingerprint for ftp.keycdn.com corresponds to the following:

SHA256: c5:ef:8c:cb:7c:15:20:d4:b0:12:c7:d5:21:75:7f:e8:cf:9f:d9:fb:4c:4d:61:20:96:2c:b2:37:dc:65:ba:c3
NOTE: If FTPS is used please ensure data is being transferred over TLS 1.2 or TLS 1.3.

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:

  1. From the KeyCDN dashboard, navigate to Account Settings > Authentication. From here upload your SSH public key (ssh-rsa or ssh-ed25519). It takes a few minutes for the key to be distributed to the responsible servers.
  2. Add your SSH private key on your system:

    ssh-add /path/to/your/private.key
    
  3. Upload/synchronise data to your Push Zone using the following rsync command:

    rsync -rtvz --chmod=D2755,F644 {path_to_your_folder}/ {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:

  • --delete (Delete extraneous files from destination directories. We also allow the other --delete flags.)
  • --delete-excluded (Also delete excluded files from destination directories, which is to be used with the --exclude options.)
  • -n (Perform a trial run with no changes made.)

If you want to list the content in your Push Zone use the following command:

rsync --list-only {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
NOTE: We limit the allowed rsync flags. Some older rsync versions behave differently in regards to what flags they use for common operations. Please ensure rsync version 3.0.0 or greater is used.

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 CDN cache 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.
KeyCDN uses cookies to make its website easier to use. Learn more about cookies.