The Upload Content Delivery Network (CDN) includes a permanent cache to store processed files (e.g. optimized images).
The Upload CDN's permanent cache:
Eliminates file reprocessing on edge cache misses.
Reduces download latency.
Reduces processing costs.
Upload's permanent cache is a configurable cache that stores processed files (e.g. optimized images) for near-instant subsequent requests.
By default, files that take longer than 500 milliseconds to process will be permanently cached.
When permanent caching is enabled:
Processed files will be automatically saved to Upload's permanent cache after generation.
Processed files will be served from the permanent cache or edge cache on all subsequent requests to the same URL.
Processed files will remain in the permanent cache until you reset your cache.
The download performance of a perma-cached file is identical to that of downloading a static asset (i.e. very fast).
Permanent caching adds ~100ms of latency to the initial response.
This occurs once per URL: when both the permanent cache and edge cache are missed.
Example download performance of a 4000×2667 JPEG with image processing applied:
|Upload.io (TTFB)||Alternative Solution (TTFB)||Edge Cache||Permanent Cache|
The Upload CDN further reduces latency by routing edge cache misses to a master edge cache node. This additional optimization reduces edge cache misses by keeping traffic within the edge network where possible: requests are only forwarded to the central permanent cache when both the regional edge cache nodes and the master edge cache node don't have a copy of the requested file.
Using these techniques, Upload is able to ensure there is only one file processing request per URL.
Without permanent caching or origin shielding, alternative solutions will perform file reprocessing on regional edge cache misses. Depending on the structure of the CDN, this could result in thousands of file processing requests per URL.
Time to First Byte (TTFB) is a key metric for measuring the performance of a file processing solution.
TTFB measures the end-to-end latency of a request, and includes DNS resolution, TLS handshakes, and file processing.
We recommend using a TTFB tool like SpeedVitals TTFB when evaluating file processing solutions.
Asia Pacific & Africa: get a performance boost for these regions by using Upload's Extended Coverage option.
The Upload CDN includes the following HTTP response headers to help users identify cache hits and misses:
HTTP/2 200...x-cache: Hitx-cache-perma: Missx-cpu-on-cache-miss: 971...
x-cache: header values containing Hit indicate the request was served from the edge cache, else:
x-cache-perma: header values containing Hit indicate the request was served from the permanent cache, else:
x-cpu-on-cache-miss: shows the file processing time (in milliseconds) spent on the request (if both of the above report Miss).
To reset your edge cache and permanent cache, click "Clear Cache" on the cache settings page in the Upload Dashboard.
Upload's permanent cache can be configured via the URL (per request) and also via your account's settings (to control default cache behaviour).
Your account's default cache behaviour is configured via the Upload Dashboard and determines:
Edge cache TTL duration.
The maximum amount of time a file will stay in a regional edge cache node.
Default: 1 year.
Permanent cache behaviour.
Default: permanently cache files that take > 500 milliseconds to process.
You can override your account's default cache behaviour via the URL for each request:
Forces an edge cache miss and permanent cache miss each time 123 is changed to a unique value.
Forces an edge cache miss and permanent cache miss on each request.
Specifies the maximum time to store the file in the edge cache.
Specifies whether to permanently cache the processed file.
Permanent caching adds ~100ms of latency to the initial request. This latency is incurred once per URL: when both the permanent cache and edge cache are missed (i.e. when the URL is first requested).
If auto is used, the file will be permanently cached if it takes > 500 milliseconds to process.
Your account's default cache behaviour is used for cache_ttl and cache_perm when they are omitted from the querystring.
This website requires a modern web browser -- the latest versions of these browsers are supported: