This is a major release of the redis and redis-clustering gems. The headline change is that the client now speaks RESP3 by default, alongside first-class support for the Redis Query Engine and the JSON module, a batch of new Redis 6.2–8.10 commands, and experimental support for the Redis 8.10 HIMPORT bulk-ingestion command family.
Command return values are unchanged from 5.x with one exception (GEO coordinates, see below), so for most applications this upgrade is a Gemfile bump.
Requires Ruby 3.2+ and works with Redis server 6.0+ (older servers are handled via automatic RESP2 fallback).
RESP3 by default
RESP3's richer wire types (native maps, doubles, booleans) let the parser deliver replies already in their final Ruby shape. Under RESP2, structured replies arrive as flat arrays of bulk strings that the client must re-shape in Ruby — e.g. HGETALL builds a Hash from a flat [field, value, ...] array, and sorted-set scores are converted String → Float pair by pair. Under RESP3 that re-shaping pass disappears.
Measured with bench/resp_comparison.rb (redis-rb 6.0.0, Ruby 3.4.1, Redis 8.8, localhost, 100-element replies):
Pure-Ruby driver (default):
| Workload | RESP2 → RESP3 RPS (8 threads) | RESP2 → RESP3 µs CPU/op |
|---|---|---|
| GET (50B string) | 4251 → 4436 (+4%) | 23.4 → 22.9 (~0) |
| HGETALL (100 fields) | 2361 → 2560 (+8%) | 164 → 129 (−22%) |
| ZRANGE WITHSCORES (100) | 2597 → 2459 (−5%) | 130 → 147 (~0, noise) |
| XRANGE (100 entries) | 1544 → 1570 (+2%) | 346 → 328 (~0) |
hiredis driver (C parser):
| Workload | RESP2 → RESP3 RPS (8 threads) | RESP2 → RESP3 µs CPU/op |
|---|---|---|
| GET | 12756 → 12620 (~0) | 69 → 70 (~0) |
| HGETALL | 10175 → 10592 (+4%) | 97 → 89 (−8%; 1 thread: 88 → 63, −28%) |
| ZRANGE WITHSCORES | 10036 → 11629 (+16%) | 108 → 85 (−22%) |
| XRANGE | 7053 → 6999 (~0) | 152 → 152 (~0) |
In short: hash reads use ~10–25% less client CPU per call on both drivers; sorted-set reads with scores gain up to 16% throughput and ~20% less CPU with hiredis (unchanged on the pure-Ruby driver, where parsing RESP3 doubles costs roughly what the re-shaping pass did); simple string and stream commands are unaffected — their reply shapes are the same in both protocols. RESP3 pairs best with the hiredis driver, which moves all reply construction out of Ruby and into C.
Methodology note: figures are per-reply CPU measurements against a localhost server; wall-clock throughput gains in production depend on how network-bound your workload is.
Beyond performance, RESP3 also lays the groundwork for push-based features — such as server-assisted client-side caching (CLIENT TRACKING invalidation events) — in future 6.x releases, without another protocol migration.
🔥 Breaking changes
- RESP3 by default (see above); pass
protocol: 2to keep RESP2. The only return-value change is GEO coordinates asFloat. (#1351) - Requires Ruby 3.2+ (previously 2.7/2.6). Bundler will keep older Rubies on the 5.4.x series automatically. (#1353, #1365)
Cluster gem (redis-clustering) only
- Commands are now routed by their server-declared command tips (redis-cluster-client 0.16.6+):
SLOWLOG GETreturns one entry list per master;SLOWLOG LENandLATENCY RESETreturn the sum across all masters;FUNCTION LOAD/DELETE/FLUSH/RESTOREnow execute on all masters (previously a single arbitrary node — this also fixesFCALLfailing for keys on other masters); commands with keys in subcommands (e.g.XINFO STREAM) route to the key's slot owner.
🚀 New features
- Redis Query Engine (RediSearch,
FT.*):ft_create,ft_alter,ft_dropindex,ft_info,ft_search,ft_aggregate, vector and hybrid search, suggestions, dictionaries, synonyms, aliases, and spellcheck. Not supported byRedis::Distributed. (#1356, #1359, #1360, #1361) - JSON module:
json_set,json_get,json_mset,json_mget,json_del,json_forget,json_clear,json_merge,json_arr*,json_obj*,json_str*,json_numincrby,json_toggle,json_type,json_debug_memory. (#1346, #1347, #1348, #1349) lmovemandblmovem— multi-element list moves (Redis 8.10). (#1363)sunioncardandsdiffcard(Redis 8.10). (#1357)xread/xreadgroupnow acceptmax_count:andmax_size:(Redis 8.10). (#1358)- Hash field TTLs:
hexpire,hpexpire,httl,hpttl(Redis 7.4). (#1324, #1325, #1331) hscan/hscan_eachnow acceptnovalues: true(Redis 7.4). (#1327)geosearchandgeosearchstore(Redis 6.2); geo commands are now available onRedis::Distributed. (#1342)geoaddnow acceptsnx:,xx:,ch:; geo radius searches acceptcount_any:;xaddacceptslimit:(Redis 6.2). (#1345)Redis::Distributednow implementshscan,hscan_eachandhstrlen. (#1319)- Identify the client to the server via
CLIENT SETINFO (lib-name=redis-rb, lib-ver=<version>). Extend the reported name withdriver_info:, or disable withdriver_info: false. See the README "Client identification" section. (#1369)
⚠️ Experimental
HIMPORTcommand family (Redis 8.10, hinted hash templates):himport_prepare,himport_set,himport_discard,himport_discard_all, available on standalone clients, pipelines/transactions,Redis::Distributed, and the cluster client. Lost fieldsets (reconnect, failover,RESET) are re-prepared and retried automatically; disable withhimport_auto_prepare: false. In cluster mode, prepare/discard fan out to all masters andhimport_setroutes by its key's hash slot. The API may change in a future minor release. See the README "Bulk hash ingestion (HIMPORT)" section. (#1364)
🐛 Bug fixes
- Fix
FloatifyPairsto not re-transform already transformed replies. (#1354) unlinknow returns0for an empty keyset, consistent withdel. (#1316)
🧰 Maintenance
redis-rbis now maintained by Redis Ltd.- Pin
redis-clientto the exact version0.30.1(previously>= 0.22.0); includes the reply-desynchronization fix from 0.26.4. The cluster gem pinsredis-cluster-clientto0.16.7. Driver upgrades are now deliberate, suite-verified releases. (#1350, #1352) - Test suite now runs against prebuilt
redislabs/client-libs-testDocker images; CI covers MRI 3.2/3.3/3.4/4.0 and TruffleRuby against Redis 7.2–8.10. (#1317, #1318, #1344) - Drop the unused
executablesconfig from the gemspec. (#1322)
Upgrade notes
- Requires Ruby 3.2+. Applications on older Rubies will keep resolving to redis 5.4.x.
- If you post-process GEO coordinates as strings, adapt to
Floatvalues — or passprotocol: 2and migrate at your own pace. - Cluster users relying on single-node behavior of
SLOWLOG/LATENCY/FUNCTIONcommands should review the routing changes above. - Everything else is drop-in.