Open spring-projects-issues opened 5 years ago
Akash Kengunte Jayachandra commented
Mark Paluch please let me know when you have some time to discuss more on this? I would like to set up some time so that we can go over the approach and contribute back.
Akash Kengunte Jayachandra opened DATAREDIS-964 and commented
After discussion with Mark Paluch in https://gitter.im/spring-projects/spring-data
We at Intuit want to use spring-data-redis for redis-streams and as discussed, when I did a POC with reactive version of spring-data-redis, I noticed that there is a new connection open for every stream that is subscribed. This would not be a scalable solution for us as we will be subscribing to large number of streams at a time.
As we discussed it would be helpful if we can use connections from connection pool and do a XREAD in a round robin so that we can limit number of connections that are established and use the connections form the connection pool.
Could we please discuss more on this?
Usecase:
Given a node there will be 10,000 streams that we are listening/subscribing to at a time. That means using spring-data-redis we will have 10,000 connections open with redis streams. We do not want that and would like to use connection pooling, that way if we limit the number to 500 available in the connection pool then we would be subscribing to 10,000 streams using that 500 connections.
I tried this out and set the connection pool to
spring.redis.lettuce.pool.max-active=9
,Runtime.getRuntime().availableProcessors() = 8
and number of streams we are subscribing to are 12. In this case we are getting an error sayingSo, using spring-data-redis subscribe to number of streams that is more than number of connections available in the connection pool? will spring-data-redis handle that?
Affects: 2.2 M2 (Moore)