CDPCDN is the delivery module of CDPShare.
It publishes files under short, stable web addresses, builds scaled image sizes for responsive websites and serves every file directly from the web server once it has been prepared.
Note on the examples: <CDN_HOST>, <DRIVE_HOST> and <STORAGE_HOST> stand for the host names of your own installation, e.g. cdn.example.com, drive.example.com and storage.example.com;<ZONE> is the zone name (normally the project or bucket name).
What CDPCDN is
CDPShare is the umbrella label for three products that run as one self-written application (CDPDrive, version 0.7.0) with three modules: CDPStorage (S3 API), CDPDrive (web interface and sharing) and CDPCDN (delivery and image sizes).
CDPCDN is the CDN module of that application.
It answers on its own host name and is switched on or off with the setting module_cdn.
Delivery runs on the server of your installation: the web server hands out files that already exist in the delivery folder without involving PHP;
only a file that is requested for the first time (or after the delivery files were cleared) is built once by the application and then handed back to the web server.
Main functions
- Zones: a zone is the public address space
https://<CDN_HOST>/<ZONE>/…. Every project (bucket) gets its zone automatically; the zone name is the project name. - Image sizes: raster images get scaled copies in the configured widths (default 480, 960 and 1440 pixels) as WebP; AVIF, JPG or PNG can be chosen per zone. Address example:
…/photo-960.webp. - Two address forms: the plain address (cached for 1 day, replaced on a new upload) and an optional address with an 8-character version code (cached for the zone's cache time, default 1 year, immutable).
- Origin pull: an advanced zone type that fetches files from an existing website once and then delivers them, including image sizes.
- Clearing: the button "Clear delivery files" removes all prepared files of a zone; the next request builds them again.
- Safe defaults: SVG files are cleaned and delivered with a sandbox policy, HTML files from project zones are offered as download only, CORS is open for embedding.
Limits and defaults
| Item | Value |
|---|---|
| Default image widths | 480, 960, 1440 px |
| Widths per zone | up to 8, each 16–8192 px |
| Image formats for sizes | WebP (default), AVIF, JPG, PNG |
| Quality | 30–100 (default 82) |
| Cache time per zone | 60 s to 1 year (default 1 year) |
| Plain addresses | browser cache 1 day |
| Largest image that is scaled | 50 megapixels (larger: original is delivered) |
| Origin pull, single file | up to 200 MB, 60 s download time |
| Rate limit for files that must be built | 30 per second per IP address, burst 60 (HTTP 429) |
| Largest source file (via CDPStorage/CDPDrive) | 5120 MB |
How CDPCDN relates to CDPStorage and CDPDrive
A file is uploaded once –
in the CDPDrive file browser or through the S3 API of CDPStorage –
and is then available three ways: as a share link, as an S3 object and as a CDN address.
CDPCDN reads the current version of the object from the storage and builds its delivery files from it.
Origin-pull zones are the exception: they take their files from an external website and do not need the Storage module.
Zones, sizes and the cache are managed in the CDPDrive web interface on the page Delivery, which is available to administrators.
Who it is for
- Website operators who want images, stylesheets, scripts and fonts on a separate delivery host.
- Shops and CMS sites that need responsive images with
srcsetwithout manual export of several sizes. - Teams that already store their files in CDPStorage or CDPDrive and want a public address for selected projects.