Redis Learning 01

Source: Internet
Author: User
Tags benchmark redis desktop manager redis server

Redis is a lightweight, memory-based key-value database (Key-value);

Official website: https://redis.io/

Download page: Https://redis.io/download

Current stable version: 4.0.11

Docker Image address: https://hub.docker.com/r/library/redis/

First, the following describes the Docker environment installation Redis

1. Download the image

$ Docker Pull redis:4.0.11

2. Start Redis

$ docker Run--name redis-server-p 6379:6379-d redis:4.0.11 redis-server--appendonly Yes

3. View

$ Docker exec-it eea5 redis-cli-h 127.0.0.1-p 6379-a '

or Docker exec-it Eea5 redis-cli

Default native 6379 default port

$ set Test test

$ set Test1 test1

$ get Test

$ info

Output all metrics for the currently connected Redis instance, including:

Server: Basic information about the Redis server

Clients: Status and metrics for client connections

Memory: Approximate RAM consumption metrics

Persistence: Data persistence-related status and metrics

Stats: Overall statistics

Replication: status and metrics related to master-slave replication

Cpu:cpu Use Cases

Cluster:redis Status of Cluster

Keyspace: Statistics that the database thinks about

4. Stop

$ docker Stop Eea5

Recommended stop mode by REDIS-CLI down with shutdown

5. Start a stopped container

$docker Start EEA5

Executable files include:

Redis-server:redis Service Side

Redis-sentinel:redis Sentinel

Redis-cli:redis command-line tools

Redis-check-rdb:redis RDB Check Tool

Redis-check-aof:redis Append only Files (aof) Check tool

Redis-benchmark:redis Benchmark/Performance testing tools

Second, Mac installation Redis Visualizer-redis Desktop Manager

Ref: 71378551

Direct download: https://pan.baidu.com/s/10vpdhw7YfDD7G4yZCGtqQg

Three, Redis event model

Single-threaded, non-blocking, multiplexed I/O models; (in some cases, threads or sub-threads are also created to perform certain tasks)

Contains a simple but powerful library of asynchronous events called AE, which encapsulates the polling mechanisms of different operating systems (non-blocking I/O related mechanisms) such as Epoll, Kqueue, select, etc.

Most common problem: latency issues (Redis cannot process other commands until a command is processed)

Redis Learning 01

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.