Cache

Caching is vital, the higher the cache HIT percentage, the more effectively resources can be scaled towards application availability.

Skipper uses CloudFront as it's caching layer to provide the best performance for your applications.

Configuration

Skipper provisions a CloudFront distribution for each environment, allowing for an environment to methodically receive updates eg. dev / staging / prod workflow.

Distrubtions can be configured with the following:

# .skpr/defaults.yaml
ingress:
  # Which cookies to forward to the application.
  cookies:
   - SESS*
   - SSESS*
  # Which headers to forward and cache by.
  headers:
   - Accept
   - Authorization
   - CloudFront-Forwarded-Proto
   - Host
   - User-Agent

Usage

Developers are able to purge the caches when they feel there are immediate updates which need to be rolled out.

List all purge requests

skpr purge dev

Request to clear all paths

skpr purge dev '/*'

Request to clear specific paths

skpr purge dev '/foo' '/bar'

Deep Dive

Purge requests are handled by the CloudFrontInvalidation Operator