wuxibin89 / redis-go-cluster

redis cluster client implementation in Go
Apache License 2.0
488 stars 145 forks source link

what is the default size of the cluster pool? #9

Open deamonwatcher opened 7 years ago

deamonwatcher commented 7 years ago

what is the default size of the cluster pool? Can i change it ?

wuxibin89 commented 7 years ago

A Cluster instance keeps a connection pool for each node. The maximum number of conns in each pool is controlled by KeepAlive in Options. When the pool ran out, it always starts a new conn. After finishing a redis operation, if not reaching the maximum number, conn will be release to its node pool. Otherwise, it will be closed immediately.

mjmanav4 commented 5 years ago

You mean new connection will be created when the pool size is reached, and closed immediately if number of connection is greater than the pool size and otherwise it will be kept alive if a new connection doesn't increase the pool size??