Help,when use the redis client with default options, will it manage the connection pool ? #1919
Replies: 3 comments 1 reply
-
same here. need clarification. any expert here ? |
Beta Was this translation helpful? Give feedback.
-
I also want to know Looking at the source code, Pipeline's Exec() does not call close |
Beta Was this translation helpful? Give feedback.
-
go-redis automatically manages connections - it should open new connections when needed and also close idle connections. See Options.PoolSize, Options.IdleTimeout, and Options.MaxConnAge.
You should close the pipeline when it is not needed. |
Beta Was this translation helpful? Give feedback.
-
I'm a new man for the go-redis. Now I wonder that if the redis client manage the connection pool automatically?
What means "manage automatically" ? For example, I mean that:
As the code, if the sentence "myRedis.Get("key")" is done by a lot of goroutine, will the redis client automatically create some new connections to get a better performance ?
And when the sentence is not done frequently, will the redis client close the redundant connections automatically ?
Thanks for your help !
Beta Was this translation helpful? Give feedback.
All reactions