Redis, as a
nosql database, has become an indispensable technology for daily development. For a developer, it is not only as simple as using Redis, but also how to manage and monitor Redis services.
For the management of Redis, we can use command tools to manage it. It is better if it is only a single machine service. If there is a cluster or multiple services management, it is particularly cumbersome to operate through the command line. At this time, we can use some visual interface tools to manage. There are also many such tools.
Some of the above tools are chargeable, and some have functions that can only query and modify some keys, and their functions are relatively single. Generally, I use
redisdesktopmanager for daily Redis management tools. It is a cross-platform Redis management tool that supports more functions.
Official website address: https://rdm.dev/
When I was using Redis' Bloom filter recently, I accidentally discovered a Redis artifact. It's really super easy to use and very powerful. By comparison, it should be the best Redis management artifact in the world.
Official website address: https://redislabs.com/redis-enterprise/redis-insight/#insight-form
I won't introduce how to use the several tools recommended above, anyway, it is a foolish operation. The one that can be used as soon as possible.
Introduction to redislabs
Let me talk about what the redislabs website does. Redis Labs is a
cloud database service provider. It is committed to providing cloud hosting services for popular NoSQL open source databases such as Redis and Memcached. It has launched a fully managed Redis Cloud service and a Redis Labs Enterprise Cluster that creates and manages Redis databases. Company address: North America-United States Company size: less than 10 people Financing stage: round D official website: https://redislabs.com/
Log in to the official website of redislabs, you can see that there are many Redis plugins supported. For example, RedisJson, Redisgraph, Redisfliter, etc. Specific introduction: https://redislabs.com/redis-enterprise/modules/
Step into the topic
The above feels that there are a lot of miscellaneous introductions, but the following is not as good as the topic, leading to today's protagonist.
RedisInsight aims to simplify the development of Redis applications.
Visualize and interact with Redis database
Scan existing keys, add new keys, perform CRUD or batch operations. Display objects in a beautifully printed JSON object format, and support friendly keyboard navigation.
Built-in support for Redis modules
Query, visualize and interactively manipulate graphs, streams and time series data. Use the multi-line query editor to generate queries, browse results, optimize and iterate quickly. Supports RedisJSON, RediSearch, RedisGraph, Streams, RedisTimeSeries and RedisGears.
Redis memory analysis
Analyze memory usage offline, identify memory problems through key mode, key expiration, and advanced search without affecting Redis performance. Use suggestions to reduce memory usage.
Trace Redis command
Identify top keys, key patterns and commands. Filter by client IP address, key, or command on all nodes in the cluster. Debug Lua scripts effectively.
When a GUI is not enough, our command line interface uses redis cli to provide syntax highlighting and auto-completion, and uses integrated help to provide intuitive instant help.
In-depth understanding of real-time performance indicators, check slow commands, and directly manage Redis configuration through the interface.
Installation and use
Various installation methods are also supported, including Mac, Linux, Windows, and docker build. In the following demonstration, I also apply docker installation, and I also recommend that you use docker to operate.
Before using it, you need to fill in a personal basic information.
Specific operation documents: https://docs.redislabs.com/latest/ri/
- docker installation
First create a new directory in our local, my directory is
redisinsight . The main purpose is to mount the data inside the docker to the local disk.
// 创建挂载目录 mkdir redisinsight // 拉取镜像并启动容器 docker run -v -d redisinsight:/db -p 8001:8001 redislabs/redisinsight:latest
kert@192 ~ docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES c2772f255565 redislabs/redisinsight:latest "bash ./docker-entry…" 37 minutes ago Up 37 minutes 0.0.0.0:8001->8001/tcp, :::8001->8001/tcp xenodochial_taussig 8aeeca3792c4 php_dnmp_nginx "/docker-entrypoint.…" 4 weeks ago Up About an hour 0.0.0.0:80->80/tcp, :::80->80/tcp nginx 057860a8a2ff php_dnmp_php "docker-php-entrypoi…" 4 weeks ago Up 34 hours 9000/tcp, 0.0.0.0:9501-9504->9501-9504/tcp, :::9501-9504->9501-9504/tcp php
Seeing the 8001 port and status above shows that we have successfully installed it.
- Access and initialize configuration
After setting up the service, we visit
http://127.0.0.1:8001/ through the browser. The following interface will appear for the first time, we can check all of them.
Next, if we use the local Redis service, we can directly select the button on the left. If you don't have Redis locally, select the button on the right to perform step-by-step operations, which is also very simple.
Next, set up our Redis link information. I am here by default is the local host address to write
127.0.0.1 , the port number to write
6379 can, Name field is to create a connection name, free to fill in.
- First look at the effect
After the above steps, we have created all the basic work, and then you can use it directly. The first entry is the overview page.
It is very intuitive to display information such as the number of client connections, total memory usage, total number of keys, hit rate, and service startup time.
- Browse left and right keys
Click brower on the left to browse the keys that exist in the database.
- Use the cli tool.
Click on the CLI on the left, we can use Redis commands directly. Not only executes the Redis command, but also displays some search patterns of the command.
The following functions will not be introduced one by one, you can directly use the interface operation.