Databases 3 min read

How to Quickly Compare Data Consistency Between Two Redis Instances

This article explains what constitutes data inconsistency in Redis, outlines key and value mismatch scenarios, and introduces the open‑source redis‑full‑check tool with usage instructions for efficiently comparing two Redis instances across various deployment modes.

Java Architecture Diary
Java Architecture Diary
Java Architecture Diary
How to Quickly Compare Data Consistency Between Two Redis Instances
Recently revisiting Huang's "Redis Design and Implementation", I thought of several interview questions and summarized steps from real production.

Problem

How can we quickly compare two Redis instances to identify data inconsistencies?

What is Data Inconsistency

Key inconsistency

Same key name but different data types across instances

Key exists in source Redis but not in target Redis

Key exists in target Redis but not in source Redis

Value inconsistency

String‑type values differ between instances

For other types, compare the key similarly

Tool Recommendation

redis‑full‑check is an open‑source tool from Alibaba Cloud's Redis & MongoDB team that verifies whether two Redis datasets are consistent. It supports single‑node, master‑slave, cluster, and various proxies, works for both homogeneous and heterogeneous comparisons, and supports Redis versions 2.x‑5.x.

Download Tool

RedisFullCheck

Currently only supports Linux environments; for other platforms, compile yourself using Golang.

Running Usage

Parameter description:

-t target
-s source

Example command:

./redis-full-check -t 127.0.0.1:6379 -s 172.16.1.1:6379

View Results

# Three‑round comparison generates three db files
sqlite3 result.db.1
> .tables
FINAL_RESULT  field_1       key_1
> select * from key_1;
Project recommendation: Spring Cloud, Spring Security OAuth2 RBAC permission management system – follow for updates. Free time now, more fancy series coming – stay tuned.
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.

redisData Consistencydatabase comparisontoolRedisFullCheck
Java Architecture Diary
Written by

Java Architecture Diary

Committed to sharing original, high‑quality technical articles; no fluff or promotional content.

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.