Support

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

Upload Data to a Push Zone

Updated on November 6, 2021

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.

Note: Push Zones are limited to 250,000 inodes (files).

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.

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 > 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}/ {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
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 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.
KeyCDN uses cookies to make its website easier to use. Learn more