redis / rueidis

A fast Golang Redis client that supports Client Side Caching, Auto Pipelining, Generics OM, RedisJSON, RedisBloom, RediSearch, etc.
Apache License 2.0
2.46k stars 158 forks source link

perf: use dedicated connections for DoMulti() with 2000+ commands by default #631

Closed rueian closed 2 months ago

rueian commented 2 months ago

Related to https://github.com/redis/rueidis/issues/626

Automatically switch to use dedicated connections for DoMulti() with 2000+ commands by default to avoid head-of-line blocking. The threshold can be adjusted with the new BlockingPipeline option.

The switch is done at the mux level so that users don't need to use Dedicated manually and no more cross slot errors.