Skip to content
CAI
Software that uses CAICheck a score

zio/zio-redis

56.6

Adequate · 20 September 2026

10.4k

lines of production code

Scala

primary language

1

measurement over time

CAI band scale
CAI lens gauges

What this system is

This system is a ZIO-based Redis client library that provides a modular, type-safe API for interacting with Redis, including support for standard data structures, clusters, and Pub/Sub. It enables developers to integrate Redis into ZIO applications with configurable connection handling, SSL/TLS security, and pluggable data codecs. The project also includes utilities for local testing via embedded Redis, performance benchmarking against other clients, and comprehensive integration tests to ensure reliability across single-node and cluster deployments.

How it got here

2020 — Project initialization and build migration

5 changes.

The repository was initialized with standard infrastructure, including licensing, documentation, and development tooling. The build system was subsequently migrated to the ZIO SBT ecosystem, updating core dependencies and supporting multiple Scala versions. Internal implementation details and example code were removed during this restructuring phase.

2023 — Redis client restructuring and cluster support

10 changes.

The ZIO Redis client underwent a major architectural restructuring to introduce pluggable codec layers, explicit configuration models, and a modular trait-based API. This period also delivered foundational support for Redis Cluster operations and Pub/Sub subscriptions, alongside comprehensive integration and unit testing to validate the new protocol handling and serialization logic.

Features

Add embedded Redis support for local testing

The \modules/embedded\ module now provides an \EmbeddedRedis\ ZIO layer that automatically finds a free local port and starts an embedded Redis server, allowing users to run integration tests without an external Redis instance. This includes the core implementation in \EmbeddedRedis.scala\ and a corresponding test suite in \EmbeddedRedisSpec.scala\ that validates basic set/get operations using ZIO Schema and ProtobufCodec.

modules/embedded · high confidence

Add example application for fetching GitHub contributors with Redis caching

This change introduces a complete example application in the \zio.redis.example\ package that demonstrates caching GitHub repository contributors. The application defines domain models (Contributor, Repository, ApiError) with ZIO Schema and JSON codecs, implements a \ContributorsCache\ layer that fetches data from the GitHub API and stores it in Redis, and exposes an HTTP endpoint via ZIO HTTP at \/repositories/:owner/:name/contributors\. The entry point (\Main.scala\) wires together the HTTP server, Redis connection, and configuration using ZIO Config.

modules/example/src/main/scala · high confidence

Added Redis connection configuration

A new application configuration file has been introduced that defines connection details for a Redis instance, specifically setting the host to 0.0.0.0 and the port to 6379.

modules/example/src/main/resources · high confidence

Added Redis4Cats and ZIO Redis benchmark suite

The benchmarks module now includes a new JMH-based performance comparison between the Redis4Cats and ZIO Redis libraries. This addition introduces setup and teardown infrastructure for both clients, along with a SetGetBenchmark that measures throughput for parallel SET and GET operations, allowing users to evaluate the relative performance of these two Redis client implementations.

modules/benchmarks · high confidence

Initial implementation of Redis cluster support and Pub/Sub subscriptions

This change introduces the internal infrastructure required for Redis Cluster and Pub/Sub features. It adds a CRC16 hash implementation for key slot calculation, a ClusterConnection and ClusterExecutor to manage multi-node connections and command routing, and a new PubSub module with SubscriptionExecutor and SingleNodeSubscriptionExecutor to handle channel/pattern subscriptions and message streams. It also includes foundational internal components like RespCommand, RespValue, and RedisConnection with SSL/TLS support.

modules/redis/src/main/scala/zio/redis/internal · high confidence

New modular Redis API traits for cluster, connection, and data types

The Redis client API has been reorganized into distinct, trait-based modules (Cluster, Connection, Geo, Hashes, HyperLogLog, Keys, Lists, Publishing, Scripting, Sets, and SortedSets). This change introduces dedicated interfaces for managing Redis cluster operations (such as slot migration and the ASKING command), connection management (including AUTH with username/password, CLIENT SETNAME, and PING), and all standard data structure commands (Strings, Lists, Sets, Sorted Sets, Hashes, Geo, HyperLogLog, Streams, and Scripting). Users now interact with these capabilities through specific, composable API traits rather than a single monolithic interface.

modules/redis/src/main/scala/zio/redis/api · high confidence

Project initialization and tooling configuration

The repository has been initialized with standard project infrastructure, including an Apache 2.0 license, a Contributor License Agreement (CLA), and a generated README.md documenting the ZIO Redis client usage and embedded testing capabilities. Build and development tooling has been configured by adding sbt-extras (version 1.10.2), a .mergify.yml file to automate Scala Steward dependency updates, and a .scalafmt.conf file updated to version 3.11.5 with Scala 2.13 dialect support. Additionally, .scalafix.conf has been added to enforce code quality rules such as removing unused imports and disabling procedure syntax.

(repo-wide) · high confidence

Removals

Removal of internal Redis client and socket options implementation

The internal implementation of the Redis client library has been removed from the source code. This change deletes the core protocol handling and connection management logic found in \src/main/scala/zio/redis/RedisIO.scala\, including the socket channel handling and reply parsing. It also removes the \HashApi\ trait that defined Redis hash commands (such as \hget\, \hdel\, \hexists\, and \hgetall\) and the \StandardSocketOptions\ object that mapped Java socket options. Additionally, the \HelloWorld.scala\ example application, which demonstrated usage of these Redis features, has been deleted.

src/main · high confidence

Behavioural changes

Redis client API restructured with new configuration and codec layers

The ZIO Redis client has been restructured to introduce a pluggable \CodecSupplier\ trait, allowing users to customize how data is encoded and decoded via \BinaryCodec\ and \ZIO Schema\. Connection handling is now driven by explicit \RedisConfig\ and \RedisClusterConfig\ case classes that support SSL/TLS (\ssl\ flag), Server Name Indication (\sni\), configurable request queue sizes, and optional username/password authentication. The \RedisUri\ model has been updated to include \ssl\, \sni\, and \verifyCertificate\ fields, and new factory methods allow users to configure certificate verification. The core API is unified under \GenRedis\, which composes specific command APIs (Strings, Lists, SortedSets, Streams, etc.) and exposes both synchronous and asynchronous execution modes through \Redis\ and \AsyncRedis\ interfaces.

modules/redis/src/main/scala/zio/redis · high confidence

Test coverage

Added tests for Redis internal protocol components; Added unit tests for Redis input encoders and output decoders; New integration test suite for Redis commands and cluster support; Removed HelloWorldSpec test suite.

Dependencies

Major build system and dependency upgrade

The project has upgraded its build infrastructure, moving sbt from version 1.3.6 to 1.13.0 and replacing legacy plugins (scalafmt, explicit-dependencies, tpolecat) with the zio-sbt ecosystem (website, ecosystem) alongside updated tools for API mappings, scalafix, CI release, and binary compatibility checking. Core library dependencies have been significantly updated, including ZIO to 2.1.26, Cats Effect to 3.7.1, ZIO JSON to 1.1.0, ZIO Schema to 1.9.0, and Sttp to 4.0.26, ensuring the project uses the latest stable versions of these frameworks.

project · high confidence

Migrate build system to ZIO SBT plugins and update Scala/ZIO versions

The project build has been restructured to adopt the ZIO SBT ecosystem plugins, replacing the previous manual configuration with standardized settings for multi-module aggregation (client, benchmarks, docs, embedded, example, integrationTest). This change updates the supported Scala versions to 2.12.21, 2.13.18, and 3.9.0, and aligns the ZIO dependency version to the latest stable release defined in the build configuration. Additionally, new \package.json\ files were added for the documentation sites to support NPM registry publishing.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Baseline

  • First survey — no prior run to compare against. CAI 57.

Lenses

  • Code Health 93
  • Architecture 63
  • Maturity 40
  • Readiness 83
  • Security 69
  • Domain Modelling 100

Changes since last survey

  • 300 commits — 290 feature/other, 10 fixes

By area

  • project/Dependencies.scala — 109 commits
  • (root) — 57 commits
  • project/plugins.sbt — 51 commits
  • project/build.properties — 32 commits
  • modules/redis — 22 commits
  • .github/workflows — 19 commits
  • modules/example — 6 commits
  • modules/redis-it — 3 commits
  • website/docs — 1 commit

Notable commits

  • fix: Fix SingleNodeExecutor hanging forever (#1143)
  • fix: Fix SingleNodeExecutor hanging forever (#1165)
  • fix: Fix encoding of non-ascii characters (#946)
  • fix: Fix non terminating scan command and add flushall command (#1069)
  • fix: Send AUTH on subscription connections - fixes #1249 (#1250)
  • fix: add auto auth - fixes #1149 (#1205)
  • fix: add config to disable certificate verification - fixes #1195 (#1196)
  • fix: fix .mergify.yml (#1090)
  • fix: fix auto-approve.yml (#1089)
  • fix: fix infinity loop in RedisUri, add tests for ClusterPartitionOutput (#984)
  • change: Add XAUTOCLAIM command to Streams API (#949)
  • change: Add PING support (#1059)
  • change: Add basic reconnect method to RedisConnection (#1144)
  • change: Add missing sortedSet commands and update ZRange command (#1065)
  • change: Add ssl parameter to RedisUri factory methods (#1179)
  • change: Add support SSL/TLS connection (#930)
  • change: Build(deps): Bump actions/setup-java from 5 to 6 (#1309)
  • change: Build(deps): Bump scala-steward-org/scala-steward-action from 2.92.0 to 2.96.0 (#1301)
  • change: Bump actions/checkout from 4 to 5 (#1125)
  • change: Bump actions/checkout from 5 to 6 (#1168)
  • …and 280 more

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

zio/zio-redis was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 20 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit fc01afaf1e160dc2c5b959b433014ede12c93b5d — the exact code this score is about.
  • Scored under rubric-2026.09.15 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-b51f968c9b10.