Pritam
Pritam

Reputation: 1400

What is the use of Following Redis Config entries

i am not getting Use of Following Redis Config entries.

key="RedisPoolSize" value="5"

key="RedisPoolTimeoutSeconds" value="1"

Upvotes: 1

Views: 133

Answers (1)

Cybermaxs
Cybermaxs

Reputation: 24556

I suppose this is related to ServiceStack.Redis, even if it's not specified.

As ServiceStack.Redis does not provides any custom configuration section, it will do nothing without a little piece of code.

Besides, ServiceStack.Redis provides a PooledRedisClientManager, a manager that utilizes a pool of redis client connections. It's the typical connection pool pattern like for Sql Connections.

A connection pool is like a "cache" of connections maintained so that the connections can be reused when future requests to the redis db are required. Opening a connection for each request is costly, wastes resources and failry unefficient. That's we need a connection pool.

You give two common settings to configure a pool :

  • RedisPoolSize : Number of client connections that should be keep in the pool
  • RedisPoolTimeoutSeconds : Number of seconds to wait when trying to get a connection from the pool. Throw TimeoutException if timeout has expired.

Upvotes: 1

Related Questions