Giter Club home page Giter Club logo

Comments (8)

John-Connolly avatar John-Connolly commented on May 14, 2024

I think pooling would only be useful with pub/sub or blocking commands, which is probably not the most common scenario. It would be nice if this was opt in, so it doesn't exhaust connection limits on cloud providers.

from redis.

jdmcd avatar jdmcd commented on May 14, 2024

Exhausting connection limits on cloud providers is actually what I was worried about. I use Redis to store session tokens and I don't my whole massive setup to come down just cause the caching service is out of connections (and is only used on session lookup). I see what you're saying though. I'd love to see a middleground

from redis.

tanner0101 avatar tanner0101 commented on May 14, 2024

Maybe we can have it configurable such that if you set max connections to ‘nil’ it will just create a new connection each time. Note also the connection pooling is for the KeyedCache impl. Creating a Redis client manually will not be affected by this.

from redis.

Joannis avatar Joannis commented on May 14, 2024

I don't see a reason to pool redis connections since they support pipelining. There's little to no performance gain. Actually, I think it'll worsen the performance very slightly.

from redis.

John-Connolly avatar John-Connolly commented on May 14, 2024

Yeah the only way I see it being useful is for blocking commands. I believe blocking commands put the client in a blocked state and the client is unable to send or receive other commands until that blocking call returns or times out.

from redis.

Joannis avatar Joannis commented on May 14, 2024

I agree, but we don't support blocking operations in the Redis Client. We have a separate static method for setting up a blocking client for pub/sub.

from redis.

John-Connolly avatar John-Connolly commented on May 14, 2024

I see, creating a new RedisClient instance for those commands makes more sense anyways. The only problem I see is there is no way to send commands before subscribe is sent, like AUTH or SELECT for instance.

from redis.

tanner0101 avatar tanner0101 commented on May 14, 2024

Fixed by #95

from redis.

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.