chore(deps): bump the redis group across 1 directory with 2 updates
Bumps the redis group with 2 updates in the / directory: github.com/redis/go-redis/extra/redisotel/v9 and github.com/redis/go-redis/v9.
Updates github.com/redis/go-redis/extra/redisotel/v9 from 9.21.0 to 9.23.0
Release notes
Sourced from github.com/redis/go-redis/extra/redisotel/v9's releases.
9.23.0
This is a minor release. It contains everything from 9.23.0-beta.1, so these notes cover the full 9.22.0 → 9.23.0 upgrade.
⚠️ Changes to check when you upgrade from 9.22.0:
- Go 1.26 is now the minimum Go version (#4060). The
godirective of the root module and of the submodules moved from1.24to1.26, as part of the dependency bumps forgovulncheckfindings. Projects that build with Go 1.24 or 1.25 must upgrade the toolchain.- Each
Clienthas a dedicated pipeline connection pool (#4002). This includes failover clients and cluster node clients.Pipeline,TxPipeline, and autopipeline operations use this pool, so they do not compete with regular commands for main-pool connections. The pool is for burst capacity only: it dials only when necessary, an unused pool holds zero connections, and if the pool is full an operation uses the main pool. SetPipelinePoolSize: -1to get the previous single-pool behavior.AutoPipelineOptions.MaxBatchByteshas a default of 128 KiB (before, there was no limit). The default prevents a write/reply deadlock; it is not a throughput control. The buffers of the pipeline pool also have a default of 128 KiB.⚠️ Changes to experimental APIs since 9.23.0-beta.1 (no effect if you upgrade from 9.22.0):
AutoPipelineOptions.FullDuplexFastSubmitis removed (#4018). The submit channel is replaced by a queue that takes a full wave of commands in one lock, so the separate fast path is not necessary. Remove the field from your options.Options.ClientSideCacheRefreshRecencyWindowis removed (#4034). Refresh-on-invalidate now reads again every cached entry of an invalidated key and does not look at how recently the entry was read. On a write-heavy keyspace this means refresh traffic across the full resident cache. Remove the field from your options.LocalCache.LRUClock()is removed (#4034). It returned the recency token that the removed recency window used, and has no replacement. Remove calls to it.ClientSideCacheInvalidationBatchWindowserved stale values in beta.1 (#4033). Under load the batcher applied only ~15% of invalidations, and the cache served invalidated values with a ~100% hit rate. 9.23.0 applies all of them. If you used this option on beta.1, upgrade.🚀 Highlights
Full-Duplex Auto-Pipelining (Experimental)
Set
AutoPipelineOptions.FullDuplexto enable the full-duplex mode of the automatic pipeliner. The default mode sends one batch per round trip. In full-duplex mode the engine holds one pipeline-pool connection, and a writer goroutine and a reader goroutine move the ordered command stream in both directions at the same time. On a high-latency link each command completes in approximately one round-trip time (RTT) on a single connection. On a 50 ms WAN profile: ~389k ops/s at 52 ms p50, against ~207k ops/s at 116 ms on the half-duplex ordered path.The mode works on both faces of a standalone
Client(AutoPipeline()andAsyncAutoPipeline()), and natively on aClusterClientwhen routing goes to masters only. On a cluster, one child engine per master sends each command to the node that owns its slot, and followsMOVED/ASKredirects and retryable replies (LOADING,READONLY, ...) through the usual cluster redirect path. With replica routing (ReadOnly,RouteByLatency, orRouteRandomly), the autopipeliner uses the half-duplex shard flushers, which obey the shard picker.Config().FullDuplexreports the mode in effect.Options:
FullDuplexWindow— the maximum number of commands in flight (backpressure).FullDuplexIdleTimeoutandFullDuplexMaxHold— when the engine returns the held connection to the pool. The pool hooks then do re-authentication and maintenance-notification handoffs.MaxFlushDelay— now also used in full-duplex mode (#4014). The writer waits only when enough commands are in flight, so low-concurrency callers keep the 1×RTT behavior. WithMaxFlushDelay=250µsat 1024 callers: +22% ops/s and −26% p99. The default is 0, so this is opt-in.NumShards— on a standaloneClient, the number of full-duplex engines (#4022). See below.
Pipeline()on the full-duplex connection (#4021). StandaloneClientonly. Before,ap.Pipeline()used a pooled connection for eachExec. It now submits the batch to the engine as one contiguous run (FDPipelined), so replies come back in submit order, as on a dedicated connection. At 256–1024 callers with 10 commands perExec: +49% to +52% throughput on one socket instead of ~150. Errors, retries, hooks, and metrics behave like an ordinary pipeline. A batch that cannot use the stream (a blocking command, a per-command read timeout, a diverted command, or a batch larger than the queue) falls back to the ordinary pipeline.TxPipelinestays on a pooled connection, becauseMULTI/EXECneeds connection affinity. On aClusterClient,ap.Pipeline()is still the ordinary cluster pipeline. A batch that the queue cannot admit now reserves its slots and waits in a first-come line, so single commands cannot starve a long pipeline (#4057, merged as part of #4021) by@vlady-kotsev.Several engines on one client (#4022). With
FullDuplex,NumShards > 1now means N engines on one client: one pool, one hook chain, N held connections. Commands route by a hash of their first key, so commands on the same key stay on one connection and keep their order withoutUnordered. Keyless commands are distributed round-robin. AnFDPipelinedbatch stays on one engine. The pipeline pool must hold at leastNumShardsconnections for each full-duplex autopipeliner. More engines help only under high concurrency: with 10-command pipelines, 8 engines were 30% slower than 1 at 8 callers, equal at about 128 callers, and 2.2× faster at 1024 callers.The full-duplex path supports blocking commands,
Options.Limiter(one admission per written batch), per-command and pipeline hooks, OTel metrics, retry budgets (aNoRetrycommand is never sent again after it is on the wire), and seamless maintenance handoffs. Limits of the stream model:
- A hook can observe a command, but cannot stop it. A
ProcessHookthat returns without callingnextdoes not cancel the command on the full-duplex path; the command is already queued on the held connection. Run policy or kill-switch hooks on a plain client or on the half-duplex autopipeliner.- Diverted commands are not ordered with the stream. The engine diverts blocking commands, connection-hostile commands, and managed
HIMPORTcommands. On the async face, wait for the result of a diverted command before you submit a command that depends on it.- Single commands on the full-duplex stream do not use the client-side cache. If CSC is enabled, a cacheable command on the stream does not read or write the cache.
- Duration metrics are recorded per reply. A command that fails before it reaches the reader (lease failure, limiter denial, retry exhaustion, close) calls the error callback but records no operation-duration sample.
rdb := redis.NewClient(&redis.Options{ Addr: "localhost:6379", AutoPipelineOptions: &redis.AutoPipelineOptions{ FullDuplex: true, // stream commands on one held connection, ~1 RTT each }, }) defer rdb.Close() </tr></table>
... (truncated)
Changelog
Sourced from github.com/redis/go-redis/extra/redisotel/v9's changelog.
9.23.0 (2026-10-05)
This is a minor release. It contains everything from 9.23.0-beta.1, so these notes cover the full 9.22.0 → 9.23.0 upgrade. The release adds:
- An experimental full-duplex mode for the automatic pipeliner, now with
Pipeline()on the full-duplex connection and several engines on one client.- Refresh-on-invalidate and miss coalescing for client-side caching, and a faster cache read path.
- Better distribution of cluster reads under latency-based routing.
Client.EphemeralConn, an opt-in limit on queued autopipeline commands, and many stability fixes.⚠️ Changes to check when you upgrade from 9.22.0:
- Go 1.26 is now the minimum Go version (#4060). The
godirective of the root module and of the submodules moved from1.24to1.26, as part of the dependency bumps forgovulncheckfindings. Projects that build with Go 1.24 or 1.25 must upgrade the toolchain.- Each
Clienthas a dedicated pipeline connection pool (#4002). This includes failover clients and cluster node clients.Pipeline,TxPipeline, and autopipeline operations use this pool, so they do not compete with regular commands for main-pool connections. The pool is for burst capacity only: it dials only when necessary, an unused pool holds zero connections, and if the pool is full an operation uses the main pool. SetPipelinePoolSize: -1to get the previous single-pool behavior.AutoPipelineOptions.MaxBatchByteshas a default of 128 KiB (before, there was no limit). The default prevents a write/reply deadlock; it is not a throughput control. The buffers of the pipeline pool also have a default of 128 KiB.⚠️ Changes to experimental APIs since 9.23.0-beta.1 (no effect if you upgrade from 9.22.0):
AutoPipelineOptions.FullDuplexFastSubmitis removed (#4018). The submit channel is replaced by a queue that takes a full wave of commands in one lock, so the separate fast path is not necessary. Remove the field from your options.Options.ClientSideCacheRefreshRecencyWindowis removed (#4034). Refresh-on-invalidate now reads again every cached entry of an invalidated key and does not look at how recently the entry was read. On a write-heavy keyspace this means refresh traffic across the full resident cache. Remove the field from your options.LocalCache.LRUClock()is removed (#4034). It returned the recency token that the removed recency window used, and has no replacement. Remove calls to it.ClientSideCacheInvalidationBatchWindowserved stale values in beta.1 (#4033). Under load the batcher applied only ~15% of invalidations, and the cache served invalidated values with a ~100% hit rate. 9.23.0 applies all of them. If you used this option on beta.1, upgrade.🚀 Highlights
Full-Duplex Auto-Pipelining (Experimental)
Set
AutoPipelineOptions.FullDuplexto enable the full-duplex mode of the automatic pipeliner. The default mode sends one batch per round trip. In full-duplex mode the engine holds one pipeline-pool connection, and a writer goroutine and a reader goroutine move the ordered command stream in both directions at the same time. On a high-latency link each command completes in approximately one round-trip time (RTT) on a single connection. On a 50 ms WAN profile: ~389k ops/s at 52 ms p50, against ~207k ops/s at 116 ms on the half-duplex ordered path.The mode works on both faces of a standalone
Client(AutoPipeline()andAsyncAutoPipeline()), and natively on aClusterClientwhen routing goes to masters only. On a cluster, one child engine per master sends each command to the node that owns its slot, and followsMOVED/ASKredirects and retryable replies (LOADING,READONLY, ...) through the usual cluster redirect path. With replica routing (ReadOnly,RouteByLatency, orRouteRandomly), the autopipeliner uses the half-duplex shard flushers, which obey the shard picker.Config().FullDuplexreports the mode in effect.Options:
FullDuplexWindow— the maximum number of commands in flight (backpressure).FullDuplexIdleTimeoutandFullDuplexMaxHold— when the engine returns the held connection to the pool. The pool hooks then do re-authentication and maintenance-notification handoffs.MaxFlushDelay— now also used in full-duplex mode (#4014). The writer waits only when enough commands are in flight, so low-concurrency callers keep the 1×RTT behavior. WithMaxFlushDelay=250µsat 1024 callers: +22% ops/s and −26% p99. The default is 0, so this is opt-in.NumShards— on a standaloneClient, the number of full-duplex engines (#4022). See below.
Pipeline()on the full-duplex connection (#4021). StandaloneClientonly. Before,ap.Pipeline()used a pooled connection for eachExec. It now submits the batch to the engine as one contiguous run (FDPipelined), so replies come back in submit order, as on a dedicated connection. At 256–1024 callers with 10 commands perExec: +49% to +52% throughput on one socket instead of ~150. Errors, retries, hooks, and metrics behave like an ordinary pipeline. A batch that cannot use the stream (a blocking command, a per-command read timeout, a diverted command, or a batch larger than the queue) falls back to the ordinary pipeline.TxPipelinestays on a pooled connection, becauseMULTI/EXECneeds connection affinity. On aClusterClient,ap.Pipeline()is still the ordinary cluster pipeline. A batch that the queue cannot admit now reserves its slots and waits in a first-come line, so single commands cannot starve a long pipeline (#4057, merged as part of #4021) by@vlady-kotsev.Several engines on one client (#4022). With
FullDuplex,NumShards > 1now means N engines on one client: one pool, one hook chain, N held connections. Commands route by a hash of their first key, so commands on the same key stay on one connection and keep their order withoutUnordered. Keyless commands are distributed round-robin. AnFDPipelinedbatch stays on one engine. The pipeline pool must hold at leastNumShardsconnections for each full-duplex autopipeliner. More engines help only under high concurrency: with 10-command pipelines, 8 engines were 30% slower than 1 at 8 callers, equal at about 128 callers, and 2.2× faster at 1024 callers.The full-duplex path supports blocking commands,
Options.Limiter(one admission per written batch), per-command and pipeline hooks, OTel metrics, retry budgets (aNoRetrycommand is never sent again after it is on the wire), and seamless maintenance handoffs. Limits of the stream model:
- A hook can observe a command, but cannot stop it. A
ProcessHookthat returns without callingnextdoes not cancel the command on the full-duplex path; the command is already queued on the held connection. Run policy or kill-switch hooks on a plain client or on the half-duplex autopipeliner.- Diverted commands are not ordered with the stream. The engine diverts blocking commands, connection-hostile commands, and managed
HIMPORTcommands. On the async face, wait for the result of a diverted command before you submit a command that depends on it.- Single commands on the full-duplex stream do not use the client-side cache. If CSC is enabled, a cacheable command on the stream does not read or write the cache.
- Duration metrics are recorded per reply. A command that fails before it reaches the reader (lease failure, limiter denial, retry exhaustion, close) calls the error callback but records no operation-duration sample.
rdb := redis.NewClient(&redis.Options{ </tr></table>
... (truncated)
Commits
6f2b263chore(release): v9.23.0 (#4074)ec50c69feat(conn): add DisposableConn to discard on Close (#4039)e3d2548fix(pool): fix ConnStateMachine waiter races (#4072)2ee6d86fix(pool): wake waiters when a connection is released to the pool (#4028)83d45edfix:(proto): support uintptr in WriteArg (#4054)c2002afdocs(example): add full-duplex examples (#4061)b5f8864feat(autopipeline): add MaxQueuedCommands hard limit (#4070)89ecbc5fix(options): reject invalid skip_verify values in ParseURL (#4064)f813adcfeat(autopipeline): run N full-duplex engines on one client (#4022)349bcf4feat(autopipeline): run Pipeline on the full-duplex connection (#4021)- Additional commits viewable in compare view
Updates github.com/redis/go-redis/v9 from 9.21.0 to 9.23.0
Release notes
Sourced from github.com/redis/go-redis/v9's releases.
9.23.0
This is a minor release. It contains everything from 9.23.0-beta.1, so these notes cover the full 9.22.0 → 9.23.0 upgrade.
⚠️ Changes to check when you upgrade from 9.22.0:
- Go 1.26 is now the minimum Go version (#4060). The
godirective of the root module and of the submodules moved from1.24to1.26, as part of the dependency bumps forgovulncheckfindings. Projects that build with Go 1.24 or 1.25 must upgrade the toolchain.- Each
Clienthas a dedicated pipeline connection pool (#4002). This includes failover clients and cluster node clients.Pipeline,TxPipeline, and autopipeline operations use this pool, so they do not compete with regular commands for main-pool connections. The pool is for burst capacity only: it dials only when necessary, an unused pool holds zero connections, and if the pool is full an operation uses the main pool. SetPipelinePoolSize: -1to get the previous single-pool behavior.AutoPipelineOptions.MaxBatchByteshas a default of 128 KiB (before, there was no limit). The default prevents a write/reply deadlock; it is not a throughput control. The buffers of the pipeline pool also have a default of 128 KiB.⚠️ Changes to experimental APIs since 9.23.0-beta.1 (no effect if you upgrade from 9.22.0):
AutoPipelineOptions.FullDuplexFastSubmitis removed (#4018). The submit channel is replaced by a queue that takes a full wave of commands in one lock, so the separate fast path is not necessary. Remove the field from your options.Options.ClientSideCacheRefreshRecencyWindowis removed (#4034). Refresh-on-invalidate now reads again every cached entry of an invalidated key and does not look at how recently the entry was read. On a write-heavy keyspace this means refresh traffic across the full resident cache. Remove the field from your options.LocalCache.LRUClock()is removed (#4034). It returned the recency token that the removed recency window used, and has no replacement. Remove calls to it.ClientSideCacheInvalidationBatchWindowserved stale values in beta.1 (#4033). Under load the batcher applied only ~15% of invalidations, and the cache served invalidated values with a ~100% hit rate. 9.23.0 applies all of them. If you used this option on beta.1, upgrade.🚀 Highlights
Full-Duplex Auto-Pipelining (Experimental)
Set
AutoPipelineOptions.FullDuplexto enable the full-duplex mode of the automatic pipeliner. The default mode sends one batch per round trip. In full-duplex mode the engine holds one pipeline-pool connection, and a writer goroutine and a reader goroutine move the ordered command stream in both directions at the same time. On a high-latency link each command completes in approximately one round-trip time (RTT) on a single connection. On a 50 ms WAN profile: ~389k ops/s at 52 ms p50, against ~207k ops/s at 116 ms on the half-duplex ordered path.The mode works on both faces of a standalone
Client(AutoPipeline()andAsyncAutoPipeline()), and natively on aClusterClientwhen routing goes to masters only. On a cluster, one child engine per master sends each command to the node that owns its slot, and followsMOVED/ASKredirects and retryable replies (LOADING,READONLY, ...) through the usual cluster redirect path. With replica routing (ReadOnly,RouteByLatency, orRouteRandomly), the autopipeliner uses the half-duplex shard flushers, which obey the shard picker.Config().FullDuplexreports the mode in effect.Options:
FullDuplexWindow— the maximum number of commands in flight (backpressure).FullDuplexIdleTimeoutandFullDuplexMaxHold— when the engine returns the held connection to the pool. The pool hooks then do re-authentication and maintenance-notification handoffs.MaxFlushDelay— now also used in full-duplex mode (#4014). The writer waits only when enough commands are in flight, so low-concurrency callers keep the 1×RTT behavior. WithMaxFlushDelay=250µsat 1024 callers: +22% ops/s and −26% p99. The default is 0, so this is opt-in.NumShards— on a standaloneClient, the number of full-duplex engines (#4022). See below.
Pipeline()on the full-duplex connection (#4021). StandaloneClientonly. Before,ap.Pipeline()used a pooled connection for eachExec. It now submits the batch to the engine as one contiguous run (FDPipelined), so replies come back in submit order, as on a dedicated connection. At 256–1024 callers with 10 commands perExec: +49% to +52% throughput on one socket instead of ~150. Errors, retries, hooks, and metrics behave like an ordinary pipeline. A batch that cannot use the stream (a blocking command, a per-command read timeout, a diverted command, or a batch larger than the queue) falls back to the ordinary pipeline.TxPipelinestays on a pooled connection, becauseMULTI/EXECneeds connection affinity. On aClusterClient,ap.Pipeline()is still the ordinary cluster pipeline. A batch that the queue cannot admit now reserves its slots and waits in a first-come line, so single commands cannot starve a long pipeline (#4057, merged as part of #4021) by@vlady-kotsev.Several engines on one client (#4022). With
FullDuplex,NumShards > 1now means N engines on one client: one pool, one hook chain, N held connections. Commands route by a hash of their first key, so commands on the same key stay on one connection and keep their order withoutUnordered. Keyless commands are distributed round-robin. AnFDPipelinedbatch stays on one engine. The pipeline pool must hold at leastNumShardsconnections for each full-duplex autopipeliner. More engines help only under high concurrency: with 10-command pipelines, 8 engines were 30% slower than 1 at 8 callers, equal at about 128 callers, and 2.2× faster at 1024 callers.The full-duplex path supports blocking commands,
Options.Limiter(one admission per written batch), per-command and pipeline hooks, OTel metrics, retry budgets (aNoRetrycommand is never sent again after it is on the wire), and seamless maintenance handoffs. Limits of the stream model:
- A hook can observe a command, but cannot stop it. A
ProcessHookthat returns without callingnextdoes not cancel the command on the full-duplex path; the command is already queued on the held connection. Run policy or kill-switch hooks on a plain client or on the half-duplex autopipeliner.- Diverted commands are not ordered with the stream. The engine diverts blocking commands, connection-hostile commands, and managed
HIMPORTcommands. On the async face, wait for the result of a diverted command before you submit a command that depends on it.- Single commands on the full-duplex stream do not use the client-side cache. If CSC is enabled, a cacheable command on the stream does not read or write the cache.
- Duration metrics are recorded per reply. A command that fails before it reaches the reader (lease failure, limiter denial, retry exhaustion, close) calls the error callback but records no operation-duration sample.
rdb := redis.NewClient(&redis.Options{ Addr: "localhost:6379", AutoPipelineOptions: &redis.AutoPipelineOptions{ FullDuplex: true, // stream commands on one held connection, ~1 RTT each }, }) defer rdb.Close() </tr></table>
... (truncated)
Changelog
Sourced from github.com/redis/go-redis/v9's changelog.
9.23.0 (2026-10-05)
This is a minor release. It contains everything from 9.23.0-beta.1, so these notes cover the full 9.22.0 → 9.23.0 upgrade. The release adds:
- An experimental full-duplex mode for the automatic pipeliner, now with
Pipeline()on the full-duplex connection and several engines on one client.- Refresh-on-invalidate and miss coalescing for client-side caching, and a faster cache read path.
- Better distribution of cluster reads under latency-based routing.
Client.EphemeralConn, an opt-in limit on queued autopipeline commands, and many stability fixes.⚠️ Changes to check when you upgrade from 9.22.0:
- Go 1.26 is now the minimum Go version (#4060). The
godirective of the root module and of the submodules moved from1.24to1.26, as part of the dependency bumps forgovulncheckfindings. Projects that build with Go 1.24 or 1.25 must upgrade the toolchain.- Each
Clienthas a dedicated pipeline connection pool (#4002). This includes failover clients and cluster node clients.Pipeline,TxPipeline, and autopipeline operations use this pool, so they do not compete with regular commands for main-pool connections. The pool is for burst capacity only: it dials only when necessary, an unused pool holds zero connections, and if the pool is full an operation uses the main pool. SetPipelinePoolSize: -1to get the previous single-pool behavior.AutoPipelineOptions.MaxBatchByteshas a default of 128 KiB (before, there was no limit). The default prevents a write/reply deadlock; it is not a throughput control. The buffers of the pipeline pool also have a default of 128 KiB.⚠️ Changes to experimental APIs since 9.23.0-beta.1 (no effect if you upgrade from 9.22.0):
AutoPipelineOptions.FullDuplexFastSubmitis removed (#4018). The submit channel is replaced by a queue that takes a full wave of commands in one lock, so the separate fast path is not necessary. Remove the field from your options.Options.ClientSideCacheRefreshRecencyWindowis removed (#4034). Refresh-on-invalidate now reads again every cached entry of an invalidated key and does not look at how recently the entry was read. On a write-heavy keyspace this means refresh traffic across the full resident cache. Remove the field from your options.LocalCache.LRUClock()is removed (#4034). It returned the recency token that the removed recency window used, and has no replacement. Remove calls to it.ClientSideCacheInvalidationBatchWindowserved stale values in beta.1 (#4033). Under load the batcher applied only ~15% of invalidations, and the cache served invalidated values with a ~100% hit rate. 9.23.0 applies all of them. If you used this option on beta.1, upgrade.🚀 Highlights
Full-Duplex Auto-Pipelining (Experimental)
Set
AutoPipelineOptions.FullDuplexto enable the full-duplex mode of the automatic pipeliner. The default mode sends one batch per round trip. In full-duplex mode the engine holds one pipeline-pool connection, and a writer goroutine and a reader goroutine move the ordered command stream in both directions at the same time. On a high-latency link each command completes in approximately one round-trip time (RTT) on a single connection. On a 50 ms WAN profile: ~389k ops/s at 52 ms p50, against ~207k ops/s at 116 ms on the half-duplex ordered path.The mode works on both faces of a standalone
Client(AutoPipeline()andAsyncAutoPipeline()), and natively on aClusterClientwhen routing goes to masters only. On a cluster, one child engine per master sends each command to the node that owns its slot, and followsMOVED/ASKredirects and retryable replies (LOADING,READONLY, ...) through the usual cluster redirect path. With replica routing (ReadOnly,RouteByLatency, orRouteRandomly), the autopipeliner uses the half-duplex shard flushers, which obey the shard picker.Config().FullDuplexreports the mode in effect.Options:
FullDuplexWindow— the maximum number of commands in flight (backpressure).FullDuplexIdleTimeoutandFullDuplexMaxHold— when the engine returns the held connection to the pool. The pool hooks then do re-authentication and maintenance-notification handoffs.MaxFlushDelay— now also used in full-duplex mode (#4014). The writer waits only when enough commands are in flight, so low-concurrency callers keep the 1×RTT behavior. WithMaxFlushDelay=250µsat 1024 callers: +22% ops/s and −26% p99. The default is 0, so this is opt-in.NumShards— on a standaloneClient, the number of full-duplex engines (#4022). See below.
Pipeline()on the full-duplex connection (#4021). StandaloneClientonly. Before,ap.Pipeline()used a pooled connection for eachExec. It now submits the batch to the engine as one contiguous run (FDPipelined), so replies come back in submit order, as on a dedicated connection. At 256–1024 callers with 10 commands perExec: +49% to +52% throughput on one socket instead of ~150. Errors, retries, hooks, and metrics behave like an ordinary pipeline. A batch that cannot use the stream (a blocking command, a per-command read timeout, a diverted command, or a batch larger than the queue) falls back to the ordinary pipeline.TxPipelinestays on a pooled connection, becauseMULTI/EXECneeds connection affinity. On aClusterClient,ap.Pipeline()is still the ordinary cluster pipeline. A batch that the queue cannot admit now reserves its slots and waits in a first-come line, so single commands cannot starve a long pipeline (#4057, merged as part of #4021) by@vlady-kotsev.Several engines on one client (#4022). With
FullDuplex,NumShards > 1now means N engines on one client: one pool, one hook chain, N held connections. Commands route by a hash of their first key, so commands on the same key stay on one connection and keep their order withoutUnordered. Keyless commands are distributed round-robin. AnFDPipelinedbatch stays on one engine. The pipeline pool must hold at leastNumShardsconnections for each full-duplex autopipeliner. More engines help only under high concurrency: with 10-command pipelines, 8 engines were 30% slower than 1 at 8 callers, equal at about 128 callers, and 2.2× faster at 1024 callers.The full-duplex path supports blocking commands,
Options.Limiter(one admission per written batch), per-command and pipeline hooks, OTel metrics, retry budgets (aNoRetrycommand is never sent again after it is on the wire), and seamless maintenance handoffs. Limits of the stream model:
- A hook can observe a command, but cannot stop it. A
ProcessHookthat returns without callingnextdoes not cancel the command on the full-duplex path; the command is already queued on the held connection. Run policy or kill-switch hooks on a plain client or on the half-duplex autopipeliner.- Diverted commands are not ordered with the stream. The engine diverts blocking commands, connection-hostile commands, and managed
HIMPORTcommands. On the async face, wait for the result of a diverted command before you submit a command that depends on it.- Single commands on the full-duplex stream do not use the client-side cache. If CSC is enabled, a cacheable command on the stream does not read or write the cache.
- Duration metrics are recorded per reply. A command that fails before it reaches the reader (lease failure, limiter denial, retry exhaustion, close) calls the error callback but records no operation-duration sample.
rdb := redis.NewClient(&redis.Options{ </tr></table>
... (truncated)
Commits
6f2b263chore(release): v9.23.0 (#4074)ec50c69feat(conn): add DisposableConn to discard on Close (#4039)e3d2548fix(pool): fix ConnStateMachine waiter races (#4072)2ee6d86fix(pool): wake waiters when a connection is released to the pool (#4028)83d45edfix:(proto): support uintptr in WriteArg (#4054)c2002afdocs(example): add full-duplex examples (#4061)b5f8864feat(autopipeline): add MaxQueuedCommands hard limit (#4070)89ecbc5fix(options): reject invalid skip_verify values in ParseURL (#4064)f813adcfeat(autopipeline): run N full-duplex engines on one client (#4022)349bcf4feat(autopipeline): run Pipeline on the full-duplex connection (#4021)- Additional commits viewable in compare view