Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Sharing of common tools in redis

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Today, the editor to share with you is the common tools in redis, many people do not understand, today, in order to let you know more about the common tools in redis, so give you a summary of the following content, let's look down. I'm sure you'll get something.

This paper lists some practical redis tools commonly used in our work, including redis migration tools redis-port, redis-migrate-tool, memory analysis tool redis-rdb-tools, query analysis tool redis-faina.

1.redis-port

Introduction

Expansion and contraction of redis Cluster

Heterogeneous data synchronization, from redis to mysql, etc.

The original cluster of redis is split into multiple clusters according to the line of business.

Redis current memory usage, key proportion analysis

Detection and removal of useless data

For backup of rdb files

Principle

To put it simply, it is to disguise yourself as slave and deceive master to achieve the goal of data flow synchronization.

Send sync command-> receive rdb- > parse rdb- > filter-> playback rdb- > play back synchronous data pushed by master

Note: this tool is mainly used to migrate non-redis clusters to redis cluster. The advantage is that it supports the migration of the specified prefix keys, but the disadvantage is that it does not support real-time migration to redis cluster.

2.redis-migrate-tool

Features:

fast.

Multithreading.

Based on redis replication.

Live migration.

In the process of migration, the source cluster does not affect the provision of services.

Heterogeneous migration.

Support Twemproxy cluster, redis cluster cluster, rdb file and aof file.

Filtering function.

When the target cluster is Twemproxy, the data is skipped Twemproxy and directly imported to the backend redis.

Migration status is displayed.

Perfect data sampling and verification.

The source of the migration tool can be: individual redis instance, twemproxy cluster, redis cluster,rdb file, aof file.

The target of the migration tool can be: individual redis instance, twemproxy cluster, redis cluster,rdb file.

Note: this tool is mainly used to migrate non-redis clusters to redis cluster. The advantage is that it supports real-time migration (the program can use double-write strategy to make up for it), while the disadvantage is that it does not support keys migration with specified prefix.

3.redis-rdb-tools

Introduction

Parse the dump.rdb file of redis, analyze memory, and export the data in JSON format.

The features provided are:

Generate memory report

Dump files to JSON

Compare two dump files using standard diff tools

Redis-rdb-tools is developed in the python language.

Note: this tool is mainly used to analyze redis memory usage and key sample distribution.

4.redis-faina

Introduction

Redis-faina is a redis query analysis gadget developed and open source by Instagram. It is realized through the monitor command of redis. By monitoring the query executed on redis, the query characteristics of a period of time are counted. Regular sampling can be used for sample analysis for a period of time.

Redis-faina is developed in the Python language.

These are the details of the commonly used tools in redis. Have you gained anything after reading them? If you want to know more, welcome to the industry information!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report