Content Cache K8s charm

A Juju charm deploying and managing a static web content cache with NGINX on Kubernetes. Use it to cache any HTTP or HTTPS web site, and to build a content delivery network (CDN).

The charm runs NGINX as a caching reverse proxy in front of a web site. When a client sends a request, the cache returns a saved copy of the response if it has one and the copy is still valid. Otherwise, the cache fetches the response from the backend, stores it, and passes it to the client. This lowers the load on the origin web site and shortens response times for repeated requests.

Like any Juju charm, this charm supports one-line deployment, configuration, integration, scaling, and more. For Content Cache K8s, this includes:

  • Caching any HTTP or HTTPS web site, with tuning for the cache size, the cached response codes, and the lifetime of cached content.

  • Scaling the number of cache instances to match your traffic.

  • Serving as the cache for another charmed application that uses the nginx-proxy relation, or caching a web site that you configure directly with the site and backend options.

  • Observability through the Canonical Observability Stack, with a Grafana dashboard, Prometheus metrics, and Loki logs.

  • Deployment on many different Kubernetes platforms, from Canonical Kubernetes to public cloud Kubernetes offerings.

This service was developed to provide front-end caching for web sites run by Canonical’s IS team, and to reduce the need for third-party CDNs by providing high-bandwidth access to web sites via this caching front-end. It is currently used for services including the Snap Store, most of Canonical’s web properties such as ubuntu.com and canonical.com, and Ubuntu Extended Security Maintenance.

This charm will make operating a content cache straightforward for DevOps and SRE teams through Juju’s clean interface.

In this documentation

How this documentation is organized

This documentation uses the Diátaxis documentation structure.

  • The Tutorial takes you step-by-step through a basic deployment of the Content Cache K8s charm, and how to integrate it with a backend application.

  • How-to guides assume basic familiarity with the charm. They cover key operations and common tasks, such as caching content from an OpenStack Swift container, upgrading the charm, and contributing to the project.

  • Reference provides technical details on actions, configurations, relation endpoints, and the charm architecture.

  • Explanation includes topic overviews, background, and context, such as the security design of the charm.

  • The Changelog lists user-relevant changes for each revision of the charm.

Contributing to this documentation

Documentation is an important part of this project, and we take the same open-source approach to the documentation as the code. As such, we welcome community contributions, suggestions, and constructive feedback on our documentation. Read How to contribute to learn how to report a problem or propose a change.

If there’s a particular area of documentation that you’d like to see that’s missing, please file a bug, or open a pull request with your change.

Project and community

The Content Cache K8s charm is a member of the Ubuntu family. It’s an open-source project that warmly welcomes community projects, contributions, suggestions, fixes, and constructive feedback.

Governance and policies

Get involved

Releases

Thinking about using the Content Cache K8s charm for your next project? Get in touch!