Databases 12 min read

What Makes Alibaba’s ApsaraCache, Codis, and Redisson Stand Out in the Redis Ecosystem?

This article summarizes key insights from the Redis track at the Cloud Xi Conference, covering Alibaba Cloud ApsaraCache's unique features, Redis Enterprise's market dominance and modules, Codis's evolution and asynchronous migration techniques, and Redisson's advanced Java client capabilities for distributed caching and locking.

dbaplus Community
dbaplus Community
dbaplus Community
What Makes Alibaba’s ApsaraCache, Codis, and Redisson Stand Out in the Redis Ecosystem?

Alibaba Cloud ApsaraCache

ApsaraCache is Alibaba Cloud's open‑source fork of Redis (GitHub: https://github.com/alibaba/ApsaraCache). It is based on the community 2.8 branch with selected 3.0 features back‑ported. Compared with vanilla Redis it adds:

Disaster‑recovery reinforcement : rewrites the kernel sync mechanism to avoid full‑sync interruptions on weak networks (the community 2.8 branch introduced psync to mitigate similar issues).

Memcached protocol compatibility : supports dual‑replica Memcached with persistence, preventing data loss on instance restart.

Short‑link optimization : reduces latency for short‑connection workloads (e.g., PHP short‑connections) by more than 30%.

AOF strengthening : disables frequent AOF rewrite, adds second‑level point‑in‑time recovery via the cronsave configuration.

Hot‑upgrade : updates an instance within 3 ms, minimizing service impact.

Instance health detection and other reliability features.

Additional work on Redis Cluster adds support for SELECT, PUB/SUB, BLPOP, hot‑key awareness, read‑write separation, multi‑data‑center disaster recovery, and stable AOF‑log based replication.

Redis Enterprise

Redis Labs co‑founder & CTO Yiftach Shoolman highlighted that China ranks first among Redis users worldwide. Redis modules, originated by Redis Labs, extend core functionality. Notable modules include ReJSON, Redis‑ML, and RediSearch.

Codis Cluster Evolution and Asynchronous Migration

Codis was created to overcome the static sharding and scaling limits of early Redis + Twemproxy and Redis Cluster deployments. Development started in 2014, with the first release in 2015. Core goals:

Language‑agnostic client compatibility.

Scalability from gigabytes to terabytes.

Maintain Redis‑level throughput and latency.

High availability.

Key capabilities:

Multi‑language client support and massive horizontal scaling.

Command pipelining for high throughput.

Support for up to 16 logical databases per instance.

Access control via command blacklist, SessionAuth (proxy‑level) and ProductAuth (cluster‑wide).

Read‑write separation with cross‑IDC optimization (consistency trade‑off).

Sentinel‑based HA.

Since version 3.2 Codis supports asynchronous migration, enabling smooth scaling without the service blocking seen in Redis Cluster. The migration workflow consists of:

Initialize the send window.

Select transfer mode (simple or sharded).

Establish the connection (start).

Apply REPLACE semantics on the target.

Send data in chunks.

Set a temporary TTL equal to RTT × 3.

Mark migration as complete.

Reset TTL and mark the key as done.

Asynchronously delete the source key using a BIO thread.

To avoid the pitfalls of synchronous migration (service blocking, HA mis‑triggers, data loss, size limits <2 MB recommended, RESP limit <512 MB, network‑induced latency, and complex error handling), Codis employs:

Command decomposition : split heavy commands into many lightweight ones, achieving micro‑second execution and supporting AUTH and SELECT.

Asynchronous I/O with pipelining : connection reuse, flow control via send windows, and batch migration.

Dirty‑data handling : proactive cleanup and expiration‑based cleanup.

Conflict resolution : handling key‑missing gaps and read/write conflicts during migration.

Future roadmap includes compatibility with Redis 4.2, minimal code changes for sharding strategy migration, enhanced Kubernetes support, automated deployment, transaction support, and deeper Sentinel integration.

Redisson

Redisson (GitHub: https://github.com/redisson/redisson) is a Java client that turns Redis into a high‑performance in‑memory data grid for the JVM. It provides distributed data structures, caches, and locks with minimal boilerplate.

Key features:

Maps Redis hashes to Java Map and ConcurrentMap interfaces, supporting cache patterns such as read‑through, write‑through, and write‑behind, as well as data pre‑loading.

Mitigates cache penetration with built‑in strategies.

Advanced distributed locking algorithms that improve safety and performance in multi‑node environments.

Provides a unified API for common Redis data types (strings, lists, sets, sorted sets, hashes, bitmaps, hyperloglog, geospatial indexes).

By abstracting Redis operations into familiar Java collections and offering robust distributed synchronization primitives, Redisson reduces implementation complexity, boosts application performance, and accelerates development of distributed systems.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Distributed SystemsRediscachingredissonCodisApsaraCache
dbaplus Community
Written by

dbaplus Community

Enterprise-level professional community for Database, BigData, and AIOps. Daily original articles, weekly online tech talks, monthly offline salons, and quarterly XCOPS&DAMS conferences—delivered by industry experts.

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.