Skip to content

ivanj26/sonic

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sonic

Sonic is a high-performance tool designed for seamless slot migration in Redis clusters. It enables parallel operations, ensuring minimal downtime and efficient resharding of keys between nodes. Built with simplicity and reliability in mind, Sonic helps manage Redis cluster operations with ease.


Features

  • Parallel Slot Migration: Perform concurrent migrations to minimize operation time.
  • Redis Cluster Compatibility: Fully supports Redis cluster architecture.
  • Error Handling: Handles common Redis MIGRATE issues such as authentication, NOKEY, and BUSYKEY.
  • Customizable Configuration: Easily adjust migration parameters such as timeouts and authentication.
  • Logging: Provides detailed logs for tracking migration progress and troubleshooting.
  • Retry Mechanism: Automatically retries migration for busy keys or transient errors.

Sonic Installation

  1. Build the application using the following command:

    make build
  2. Run the application by using the following command and options:

    ./sonic -s <source_ip_without_port> -d <dest_ip_without_port> -a <password> -n <slots>           

Usage

Sonic provides an intuitive interface to manage slot migrations.

Command-Line Arguments

Argument Description Default Example
-s Address of the source Redis node without port, default port is 6379. Should be a master node. N/A 10.21.123.12
-d Address of the destination Redis node without port, default ort is 6379. Should be a master node. N/A 10.21.123.13
-l Range of slot or Exact slot. Comma-separated list of slots to migrate. N/A 1365,1380 or 1365 (single slot)
-n Number of slots if you do not want to use -l flag. N/A 10
-enable-info-log To disable info log, set as false. N/A true
-log-path Path to log file. N/A sonic.log
-a Redis password. N/A
-p Number of parallel migrations to execute. By default: 5 at max concurrent 5 5

About

Sonic: Redis Parallel Resharding Tool

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published