- Add
DynamicPoolinterface - Add
actix-webexample - Add
tcp-user-timeoutsfeature flag
- Fix unresponsive checks with blocked connections
- Fix potential hanging calls to
quitwhen called concurrently by multiple tasks
- Support SCAN functions in mocks
- Fix intermittent transaction timeouts
- Fix reconnection errors when no connections exist
- Reduced memory footprint and significant write throughput improvements
- Rename common interfaces to remove
Redisprefixes - Add
WITHSCOREStoZRANKandZREVRANK - Add
GT|LT|NX|XXoptions toEXPIREandEXPIREAT - Add
scan_pageinterface - Add optional message to
PING - Remove deprecated or redundant config options
- Refactor public types into submodules
- Add
i-hexpirefeature flag - Support async blocks in
on_*event handler functions - Add an interface to cancel scanning functions
- Update
rustls-native-certsto 0.8 - Support
valkey://scheme inConfig::from_url. - Support combining
OptionsandReplicasclients
This update contains some significant performance improvements in the form of reduced Tokio scheduling overhead and reduced memory usage during the frame encoding process. It also contains several cosmetic changes designed to support future scenarios where Valkey and Redis start to diverge from one another.
The compiler should guide callers through most of these changes.
- The
auto_pipelineconfig option was removed. All clients now automatically pipeline commands across Tokio tasks. - The
BackpressureConfigstruct was removed. Callers should usemax_command_buffer_leninstead. - The
HEXPIRE,HTTL, etc, commands are now gated by ani-hexpirefeature flag. Note that this requires Redis > =7.2.5. - Some potentially redundant
ReplicaConfigfields were removed. The client now uses the associatedReconnectPolicyfields instead, where applicable. - The
typesmodule was becoming too large and needed refactoring. Many types were moved to submodules, which likely requires changes to certain import statements. - Many of the common public types were renamed to remove the
Redisprefix, such asRedisConfig,RedisClient,RedisPool, etc. rustls-native-certswas upgraded to 8.x.- The
specialize-into-bytesfeature flag was removed. This is now the default behavior. - The
on_erroranderror_rxevent handler interface now contains an optional server identifier.
- In the past
fredspawned a separate task per connection in order to read from all sockets concurrently. In 10.0.0 each client reads and writes to all connections in a single task. - Write throughput is improved by a factor of 3-5x depending on the use case.
- All transactions are now pipelined automatically.
- Change scanning functions to automatically continue when the current page is dropped
- Add
scan_bufferedandscan_cluster_bufferedinterfaces - Add
specialize-into-bytesfeature flag
- Add
SETNX,ECHO,TYPE,EXPIRETIME, andPEXPIRETIMEcommands - Add hashmap expiration commands (
HTTL,HEXPIRE, etc) - Change
active_connectionsto preempt reconnections
- Fix docs.rs documentation features
- Add initial support for the Glommio runtime
- Add
credential-providerfeature - Fix pipeline processing in mocks
- Support pipelined transactions
- Fix
FT.AGGREGATEcommand withSORTBYoperation
- Fix tracing span names and missing fields
- Add RediSearch interface.
- Adapt testing and CI processes to test Redis and Valkey
- Add
FromIteratorimpl toRedisMap - Add
ExclusivePoolclient - Support
redis+unixconfig URLs for Unix domain sockets - Add
PEXPIREandPEXPIREAT - Replace
trust-dns-resolverwithhickory-resolver
- Fix
bytes_utilsmin version - Fix rustls reexports with
enable-rustls-ring
- Add
enable-rustls-ringfeature flag
- Fix
partial-tracingimports
This version should reduce compilation times for most use cases.
- RPITIT / AFIT
- Set MSRV to 1.75
- Upgrade
rustlsto 0.23 - Upgrade
redis-protocolto 5.0.0 - Split public interfaces with new feature flags.
- Add
ClusterDiscoveryPolicyconfiguration options. - Add
SORTandSORT_RO - Add
cluster_hashpolicy toOptions - Change tracing span names to follow OpenTelemetry naming conventions.
- Callers that use certain managed services or Kubernetes-based deployment models should review the
new
ClusterDiscoveryPolicy. - Double-check the new feature flags. The
codecfeature was also moved to redis-protocol. - Rustls - Check the new aws-lc-rs requirements or switch
back to
rustls/ring. - Note the new tracing span names.
- Add
TransactionInterfacetoRedisPool
- Add conversion from
HashMaptoMultipleOrderedPairs. - Remove
lazy_static - Update examples
- Fix tracing span annotations.
- Box large futures to reduce stack usage.
- Fix cluster replica failover at high concurrency.
- Fix potential race condition initializing the mocking layer.
- Add a shorthand
initinterface. - Fix cluster replica failover with unresponsive connections.
- Fix RESP3 connection init when used without a password.
- Remove the
globalsinterface. - Support unix domain sockets.
- Add a Redis TimeSeries interface.
- Improve unresponsive connection checks.
- Move several feature flags to configuration options.
- Add a benchmarking tool.
- Update to Rustls 0.22.
- Add several new connection configuration options.
- Add a
fail_fastflag to commands. - Switch to crossbeam types internally.
Using ..Default::default() with the various configuration structs can avoid most of the breaking changes here.
Notable changes:
- Several configuration options were moved from
globalstoConnectionConfigandPerformanceConfig. - Several feature flags were moved to configuration fields, including:
ignore-auth-errorpool-prefer-activereconnect-on-auth-errorauto-client-setname
- The
on_messageandon_keyspace_eventfunctions were renamed and moved to theEventInterface. They now use the same naming conventions as the other event streams.
- Fix intermittent cluster routing errors
- Fix cluster failover in transactions
- Fix panic when reconnect delay jitter is 0
- Support percent encoding in URLs
- Support tuples for
RedisValueandMultipleKeys - Make
CLIENT IDchecks optional - Update dependencies
- Added a new client builder and configuration interface.
- Reworked or removed the majority of the
globalsinterface. - Support multiple IP addresses in the
Resolveinterface. - Add
with_optionscommand configuration interface. - Replaced the
no-client-setnamefeature flag withauto-client-setname. - Add an interface to configure TCP socket options.
- Removed the automatic
serde_json::Value->RedisValuetype conversion logic.- This unintentionally introduced some ambiguity on certain interfaces.
- The
RedisValue->serde_json::Valuetype conversion logic was not changed.
- Reworked the majority of the
RedisPoolinterface. - Moved and refactored the
on_*functions into a newEventInterface. - Fixed bugs with the
Replicarouting implementation. - Fixed bugs related to parsing single-element arrays.
- Changed several
FromRedistype conversion rules. See below or theFromRedisdocs for more information. - Add a RedisJSON interface.
- Add a RESP2 and RESP3 codec interface.
Notable interface changes:
ArcStrhas been replaced withbytes_utils::Str.- Timeout arguments or fields now all use
std::time::Duration. - Many of the old global or performance config values can now be set on individual commands via the
with_optionsinterface. - The
RedisPoolinterface now directly implementsClientLikerather than relying onDerefshenanigans. - The
on_*event functions were moved and renamed. Reconnection events now include the associatedServer. - The
tls_server_namefield onServeris now properly gated by the TLS feature flags. - Mocks are now optional even when the feature flag is enabled.
Notable implementation Changes:
PipelineandTransactionstructs can now be reused. Callingexec,all,last, ortry_allno longer drains the inner command buffer.- Many of the default timeout values have been lowered significantly, often from 60 sec to 10 sec.
- In earlier versions the
FromRedistrait implemented a few inconsistent or ambiguous type conversions policies.- Most of these were consolidated under the
default-nil-typesfeature flag. - It is recommended that callers review the updated
FromRedisdocs or see the unit tests in responses.
- Most of these were consolidated under the
- The
connectfunction can now be called more than once to force reset all client state.
- Fix a bug with connection errors unexpectedly ending the connection task.
- Update various dependencies
- Move
pretty-env-loggertodev-dependencies - Update rustfmt.toml
- Fix cluster replica discovery with Elasticache
- Fix cluster replica
READONLYusage - Fix compilation error with
full-tracing - Support
Vec<(T1, T2, ...)>withFromRedis
- Fix cluster failover with paused nodes
- Add
Pipeline::try_all - Add missing pubsub commands
- Improve docs, examples
- Add a client tracking interface.
- Add a global config value for broadcast channel capacity.
- Add an interface to interact with individual cluster nodes.
- Fix missing
impl StreamInterface for Transaction - Add all
RedisClientcommand traits toSubscriberClient
- Refactored the connection and protocol layer.
- Add a manual
Pipelineinterface for pipelining commands within a task. - Add a
Replicaclient for interacting with replica nodes. - Rework the
Transactioninterface to buffer commands in memory before EXEC/DISCARD. - Rework the cluster discovery and failover implementation.
- Rework the MOVED/ASK implementation to more quickly and reliably follow cluster redirects.
- Rework the sentinel interface to more reliably handle failover scenarios.
- Fix several bugs related to detecting closed connections.
- Support the
functionsinterface. - Add
Script,Library, andFunctionstructs. - Add
MessageandMessageKindpubsub structs. - Add a DNS configuration interface.
- Rework the
native-tlsinterface to support fully customizable TLS configurations. - Add
rustlssupport.- Note: both TLS feature flags can be used at the same time.
- Add a mocking layer interface.
Potentially breaking changes in 6.x:
- Switched from
(String, u16)tuples to theServerstruct for all server identifiers. - New TLS feature flags:
enable-rustlsandenable-native-tls.vendored-tlsis nowvendored-openssl
- New TLS configuration process: see the example.
- New transaction interface.
Transactioncommands are now buffered in memory before callingexec()ordiscard().
- New backpressure configuration options, most notably the
Drainpolicy. This is now the default. - Changed the type and fields on
BackpressurePolicy::Sleep. - New custom command interface for managing cluster hash slots.
- Removed or renamed some fields on
RedisConfig. - Changed the pubsub receiver interface to use
Messageinstead of(String, RedisValue)tuples. - Changed the
on_*family of functions to return a BroadcastReceiver. - The
FromRedistrait convertsRedisValue::Nullto"nil"withStringandStr.
- Reduce number of
tokiofeatures - Use 6379 as default cluster port in
from_url - Fix RESP3 auth error (#54)
- Reduce number of
tokiofeatures - Use 6379 as default cluster port in
from_url - Fix RESP3 auth error (#54)
- Reduce number of
tokiofeatures - Use 6379 as default cluster port in
from_url - Fix RESP3 auth error (#54)
- Update
redis-protocolandnom - Add
no-client-setnamefeature flag
- Bug fixes
- Support URL parsing into a
RedisConfig - Update
bzpopminandbzpopmaxreturn type - Remove unimplemented
mocksfeature
- Rewrite the protocol parser, so it can decode frames without moving or copying the underlying bytes
- Change most command implementations to avoid unnecessary allocations when using static str slices
- Rewrite the public interface to use different traits for different parts of the redis interface
- Relax some restrictions on certain commands being used in a transaction
- Implement the Streams interface (XADD, XREAD, etc.)
- RESP3 support
- Move most perf configuration options from
globalsto client-specific config structs - Add backpressure configuration options to the client config struct
- Fix bugs that can occur when using non-UTF8 byte arrays as keys
- Add the
serde-jsonfeature - Handle more complicated failure modes with Redis clusters
- Add a more robust and specialized pubsub subscriber client
- Ergonomics improvements on the public interfaces
- Improve docs
- More tests
- Fix authentication bug with
sentinel-authtests - Update tests and CI config for
sentinel-authfeature - Add more testing scripts, update docs
- Switch to CircleCI
- Add
sentinel-authfeature
- Add
NotFounderror kind variant - Use
NotFounderrors when castingnilserver responses to non-nullable types
- Remove some unnecessary async locks
- Fix client pool
wait_for_connectimplementation
- Fix #11
- Support Sentinel clients
- Fix broken doc links
- Support Redis Sentinel
- Sentinel tests
- Move metrics behind compiler flag
- Add generic response interface.
- Add tests
See below.
- Add support for the
MONITORcommand.
- Redo cluster state change implementation to diff
CLUSTER NODESchanges - MOVED/ASK errors no longer initiate reconnection logic
- Fix chaos monkey tests
- Extend and refactor RedisConfig options
- Change RedisKey to work with bytes, not str
- Support unblocking clients with a control connection
- First draft of chaos monkey tests
- Custom reconnect errors feature
- Rewrite to use async/await
- Add Lua support
- Add transaction support
- Add hyperloglog, geo, acl, memory, slowlog, and cluster command support
- Add tests
- Add pipeline_test application
See the old repository at azuqua/fred.rs.