Git Product home page Git Product logo

Comments (6)

odeke-em avatar odeke-em commented on May 5, 2024

Thank you for filing this bug @sethvargo!

@sethvargo @mikehelmick to tackle this, I'd recommend perhaps a distributed cache like Redis/Memcached as our caching layer, given that the app will be scaled out and caching in RAM means a trip if a request gets load balanced differently.
The alleviation am thinking of is to have the distributed here as an optional passthrough cache, whereby the CRUD calls pass through the Redis cache, but if Redis isn't available or the data isn't available, it'll fallback to fetching from the database.
Screen Shot 2020-07-30 at 11 17 29 AM

If that sounds good I can send a PR implementing this logic. Thank you!

from exposure-notifications-verification-server.

odeke-em avatar odeke-em commented on May 5, 2024

I see per

* Redis cache used for distributed rate limiting.
we already use Redis as the rate limiter. That makes it the clear choice then for this task too.

from exposure-notifications-verification-server.

mikehelmick avatar mikehelmick commented on May 5, 2024

Yeah, we already have a Redis instance in the mix, so that is a safe choice.

I think it's fine to move forward with that and have the caching disabled by default (dev instance)

from exposure-notifications-verification-server.

sethvargo avatar sethvargo commented on May 5, 2024

Yea, generic read-through cache. The reason I haven't been tackling this is because all the redis libraries for Go have various tradeoffs and I haven't had time to weigh them.

from exposure-notifications-verification-server.

odeke-em avatar odeke-em commented on May 5, 2024

Not a problem, I've got y'all :) I examined a bunch of the libraries and I have used redigo by Gary Burd, and even rolled out an instrumented version of it https://godoc.org/github.com/opencensus-integrations/redigo/redis. I'll send a PR for it.

SGTM, turned off by default works.

from exposure-notifications-verification-server.

sethvargo avatar sethvargo commented on May 5, 2024

This is done!

from exposure-notifications-verification-server.

Related Issues (20)

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.