4

I was using a Docker-based setup with an nginx reverse proxy forwarding to Dockerized Microservices for some time. Right now I am evaluating a switch to a Kubernetes-based approach and the Traefik Ingress Controller.

The Ingress Controller provides all functionality required for this, except for one: It doesn't support caching.

The Microservices aren't very performant when it comes to serving static resources, and I would prefer to reduce the load so they can concentrate on their actual purpose, handling dynamic REST requests.

Is there any way to add caching support for Traefik-based Ingress? As there are many yet small services, I'd prefer not to spinup a dedicated Pod per Microservice if possible. Additionally, a configuration-based approach would be appreciated, if possible (maybe using a custom Operator?).

muffel
  • 7,004
  • 8
  • 57
  • 98

3 Answers3

5

Caching functionality is still on the wish list in Traefik project.
As a kind of workaround please check this scenario where NGINX is put in front to do caching.
I don't see any contraindications to apply the same idea in front of Traefik Ingress Controller.

Nepomucen
  • 4,449
  • 3
  • 9
  • 24
3

This is an enterprise feature. You have to buy Traefik enterprise to get caching functionality.

Sebi2020
  • 1,966
  • 1
  • 23
  • 40
1

Came accross this and alltough we are still testing it, apparently cache is finally been implemented directly in traeffik, including selective per path whish was our main concern. Unsure of the limitations/performance alltough I've read that only memory allocated per router is currently available as a storage:

https://github.com/traefik/traefik/issues/878

luison
  • 1,850
  • 1
  • 19
  • 33