Giter Site home page Giter Site logo

envoy-cache's Introduction

envoy-cache

Caching in Istio using Envoy filters

Easy way to implement Caching in istio using Envoy filter. This working code can cache responses irrespective of the cache control the upstream server sends. The code modifies the cache-control header of the request call and of the upstream response.

Modifications to be made before using the filter:

  1. Restricting the domain/host over which to apply caching: Change the domain name (line 29) as per your need. You can also restrict the route/uri over which caching can be applied.

  2. Control the caching time: Modify the max age of caching by changing the max-age=600 value (line 36 & 89).

  3. The app deployment/pods needs to be enabled in filter for caching: Change the labels in workload selector to those of the application pods ehich are to be cached (line 71). Also chnge the namespace to where the app pod is deployed (line 67).

  4. There are 2 types of caching in envoy

    • SimpleHTTPCache (line 56)
    • FileSystemHttpCache (line 57-61)

    You can use either of them but not both.

Demo:

A demo directory is available containing a python app, Dockerfile, K8s & Istio manifest file to test the envoy caching.

envoy-cache's People

Contributors

ankan-devops avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.