GaussDB(for Redis)

174
GaussDB(for Redis) Issue 16 Date 2021-06-15 HUAWEI TECHNOLOGIES CO., LTD.

Transcript of GaussDB(for Redis)

Page 1: GaussDB(for Redis)

GaussDB(for Redis)

Issue 16

Date 2021-06-15

HUAWEI TECHNOLOGIES CO., LTD.

Page 2: GaussDB(for Redis)

Copyright © Huawei Technologies Co., Ltd. 2021. All rights reserved.

No part of this document may be reproduced or transmitted in any form or by any means without priorwritten consent of Huawei Technologies Co., Ltd. Trademarks and Permissions

and other Huawei trademarks are trademarks of Huawei Technologies Co., Ltd.All other trademarks and trade names mentioned in this document are the property of their respectiveholders. NoticeThe purchased products, services and features are stipulated by the contract made between Huawei andthe customer. All or part of the products, services and features described in this document may not bewithin the purchase scope or the usage scope. Unless otherwise specified in the contract, all statements,information, and recommendations in this document are provided "AS IS" without warranties, guaranteesor representations of any kind, either express or implied.

The information in this document is subject to change without notice. Every effort has been made in thepreparation of this document to ensure accuracy of the contents, but all statements, information, andrecommendations in this document do not constitute a warranty of any kind, express or implied.

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. i

Page 3: GaussDB(for Redis)

Contents

1 Engine Overview......................................................................................................................11.1 What Is GaussDB(for Redis)?.............................................................................................................................................. 11.2 Typical Application Scenarios.............................................................................................................................................. 21.3 Comparison Between GaussDB(for Redis) and Open-source Redis...................................................................... 41.4 Compatible APIs and Versions............................................................................................................................................ 71.5 DB Instance Specifications................................................................................................................................................... 71.6 DB Instance Statuses.............................................................................................................................................................. 81.7 Constraints................................................................................................................................................................................. 9

2 Getting Started with GaussDB(for Redis)....................................................................... 102.1 Overview.................................................................................................................................................................................. 102.2 Buying a DB Instance.......................................................................................................................................................... 112.3 Instance Connections........................................................................................................................................................... 172.3.1 Connection Methods........................................................................................................................................................ 172.3.2 Connect to a DB Instance over a Private Network................................................................................................ 182.3.3 Connecting to a DB Instance over a Public Network............................................................................................202.3.4 Connecting to a DB Instance Using a Load Balancer IP Address......................................................................222.3.5 Connecting to a DB Instance Using Jedis.................................................................................................................. 232.3.6 Connecting to a DB Instance Using HiRedis............................................................................................................ 252.3.7 Connecting to a DB Instance Using Node.js............................................................................................................ 272.3.8 Connecting to a DB Instance Using PHP................................................................................................................... 282.3.9 Connecting to a DB Instance Using Python............................................................................................................. 30

3 Working with GaussDB(for Redis).................................................................................... 323.1 Permissions............................................................................................................................................................................. 323.1.1 Creating a User Group and Assigning Permissions................................................................................................323.1.2 Creating a Custom Policy................................................................................................................................................333.2 Instance Lifecycle.................................................................................................................................................................. 353.2.1 Restarting a DB instance.................................................................................................................................................353.2.2 Deleting a DB Instance.................................................................................................................................................... 363.2.3 Recycling a DB Instance.................................................................................................................................................. 373.3 Instance Modifications........................................................................................................................................................ 383.3.1 Changing a DB Instance Name.................................................................................................................................... 383.3.2 Resetting the Administrator Password....................................................................................................................... 39

GaussDB(for Redis) Contents

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. ii

Page 4: GaussDB(for Redis)

3.3.3 Scaling Up Storage Space............................................................................................................................................... 403.3.4 Adding Nodes..................................................................................................................................................................... 423.3.5 Deleting Nodes...................................................................................................................................................................453.3.6 Managing Tags................................................................................................................................................................... 463.4 Connection Management.................................................................................................................................................. 483.4.1 Creating a Private Zone...................................................................................................................................................483.4.2 Configuring Security Group Rules................................................................................................................................523.4.3 Binding and Unbinding an EIP...................................................................................................................................... 553.4.4 Viewing the IP Address and Port Number................................................................................................................ 573.5 Database Commands.......................................................................................................................................................... 583.5.1 Supported and Restricted Commands........................................................................................................................583.6 Backups and Restorations.................................................................................................................................................. 683.6.1 Overview...............................................................................................................................................................................683.6.2 Managing Automated Backups.................................................................................................................................... 693.6.3 Managing Manual Backups........................................................................................................................................... 733.6.4 Restoring Data to a New DB Instance....................................................................................................................... 753.7 Monitoring and Alarming.................................................................................................................................................. 763.7.1 GaussDB(for Redis) Monitoring Metrics....................................................................................................................773.7.2 Setting Alarm Rules........................................................................................................................................................1293.7.3 Viewing Monitoring Metrics........................................................................................................................................ 1303.8 Auditing................................................................................................................................................................................. 1313.8.1 Key Operations Supported by CTS............................................................................................................................ 1313.8.2 Viewing Tracing Records............................................................................................................................................... 1323.9 Billing Management.......................................................................................................................................................... 1333.9.1 Renewing DB instances................................................................................................................................................. 1333.9.2 Changing the Billing Mode from Pay-per-Use to Yearly/Monthly................................................................. 1343.9.3 Changing the Billing Mode from Yearly/Monthly to Pay-per-Use................................................................. 1353.9.4 Unsubscribing a Yearly/Monthly DB Instance....................................................................................................... 1363.10 Migrating Data..................................................................................................................................................................1373.10.1 From Redis to GaussDB(for Redis)......................................................................................................................... 1373.10.2 From Kvrocks to GaussDB(for Redis).....................................................................................................................1393.10.3 From Pika to GaussDB(for Redis)........................................................................................................................... 1403.10.4 From SSDB to GaussDB(for Redis)......................................................................................................................... 1413.10.5 From LevelDB to GaussDB(for Redis)....................................................................................................................1433.10.6 From RocksDB to GaussDB(for Redis)...................................................................................................................144

4 Best Practices....................................................................................................................... 1464.1 Performance Comparison Between GaussDB(for Redis) and Open-Source Redis Cluster........................146

5 Performance White Paper.................................................................................................1535.1 Test Method..........................................................................................................................................................................1535.2 Test Data............................................................................................................................................................................... 156

6 FAQs....................................................................................................................................... 159

GaussDB(for Redis) Contents

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. iii

Page 5: GaussDB(for Redis)

6.1 Product Consulting.............................................................................................................................................................1596.1.1 What Should I Pay Attention to When Using GaussDB(for Redis)................................................................1596.1.2 What Is the Availability of a GaussDB(for Redis) Instance.............................................................................. 1596.1.3 What Are the Differences Between GaussDB(for Redis) and Open Source Redis?................................. 1606.2 Billing...................................................................................................................................................................................... 1636.2.1 What Are the Differences Between Yearly/Monthly and Pay-per-use Billing Mode?............................. 1636.2.2 Can I Switch Between Yearly/Monthly and Pay-per-Use Payments?............................................................ 1636.3 Database Usage.................................................................................................................................................................. 1646.3.1 Why Is the Returned Value Empty When the Key Matching a Specified Pattern Exists?...................... 1646.3.2 How Do I Select Specifications and Nodes When Creating a GaussDB(for Redis) Instance?.............. 1646.3.3 Which Commands Are Supported and Restricted by GaussDB(for Redis)?................................................1656.3.4 How Do I Process Existing Data Shards After Switching to GaussDB(for Redis)?....................................1656.4 Database Connection........................................................................................................................................................ 1656.4.1 How Do I Connect to GaussDB(for Redis)?........................................................................................................... 1656.4.2 How Do I Use the IP Addresses of Multiple GaussDB(for Redis) Nodes?................................................... 1656.4.3 How Does Load Balancing Work in GaussDB(for Redis)?................................................................................ 1656.4.4 How Can I Create and Connect to an ECS?........................................................................................................... 1666.4.5 Can I Change the VPC of a GaussDB(for Redis) Instance?...............................................................................1666.5 Backup and Restoration................................................................................................................................................... 1666.5.1 How Long Can a GaussDB(for Redis) Instance Backup Be Saved?............................................................... 1666.6 Regions and AZs................................................................................................................................................................. 1666.6.1 What Is AZ and How Can I Select an AZ?.............................................................................................................. 1666.6.2 How Do I Select a Region?.......................................................................................................................................... 1676.6.3 Can Different AZs Communicate with Each Other?........................................................................................... 1676.6.4 Can I Change the Region of a GaussDB(for Redis) Instance........................................................................... 167

A Change History....................................................................................................................168

GaussDB(for Redis) Contents

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. iv

Page 6: GaussDB(for Redis)

1 Engine Overview

1.1 What Is GaussDB(for Redis)?GaussDB(for Redis) is a cloud-native NoSQL time-series database with decoupledcompute and storage and full compatibility with InfluxDB. GaussDB(for Redis)breaks through the memory limit of native Redis and separates cold data from hotdata to. Hot data in compute nodes meets the low latency requirements ofservices, and cold data is persistently stored in the distributed storage pool,minimizing the usage costs.

It provides high compatibility, cost-effectiveness, high reliability, elastic scalability,and high availability.

● High compatibilityYou can migrate your on-premises Redis databases to GaussDB(for Redis)without modifying any code.

● Cost effectiveness– Thanks to a shared storage pool, GaussDB(for Redis) is able to

inexpensively process massive amounts of data.– All data is stored in disks with cold and hot data separated. Hot data can

be read from the cache directly, improving read efficiency.● High reliability

– Multi-copy, strong consistency based on a shared storage pool ensuresdata security and reliability.

– Stateless compute nodes can automatically take over services from anynode that becomes faulty.

– Storage pools can be deployed across AZs● Hitless scale-out

– RocksDB has been customized to allow the storage capacity to be scaledup in seconds.

– Data does not need to be migrated during scaling, which is fast andsmooth.

– A proxy is used to ensure that upper-layer applications are not affectedby underlying sharding.

GaussDB(for Redis) 1 Engine Overview

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 1

Page 7: GaussDB(for Redis)

● High availability

– Stateless compute nodes can automatically take over services from anynode that becomes faulty.

– Storage pools can be deployed across AZs

● Cold and hot data separation

– Hot data resides in the memory, and cold data is stored persistently,replacing the cold and hot separation architecture of Redis+MySQL.

– Cold and hot data is automatically exchanged, reducing labor costs indata exchange and simplifying code development.

1.2 Typical Application ScenariosAs a key-value database compatible with Redis APIs, GaussDB(for Redis) extendsthe application scenarios of the native Redis so that it can better meet diversifiedservice requirements such as persistent and hybrid storage.

E-commerce● For e-commerce applications, some commodity data is more frequently

queried than others. GaussDB(for Redis) stores frequently queried commodityinformation in memory as hot data, and cold data in the shared storage pool.This not only meets the quick access requirements of popular commodities,but also avoid excessive in-memory storage costs

● GaussDB(for Redis) can permanently store massive amounts of historicalorder data of e-commerce applications. GaussDB(for Redis) allows you toaccess data through the Redis API and provides TB-level storage.

● E-commerce promotions cause a large number of concurrent access requestsin a short period of time. GaussDB(for Redis) can be used as a front-endcache (large memory required) to help back-end databases cope with servicepeaks. GaussDB(for Redis) supports hitless scale-out of compute nodes inseconds, making it easy for you to handle the expected peak traffic.

Gaming● The schema of gaming services is simple. You can select GaussDB(for Redis)

as a persistent database and use simple Redis APIs to quickly develop andlaunch services. For example, the sorted set structure of Redis can be used todisplay game rankings in real time.

● In delay-sensitive gaming scenarios, GaussDB(for Redis) can be used as thefront-end cache (large memory required) to accelerate access to applications.

Live streaming

The most-viewed live streaming content usually dominates most traffic of the livestreaming applications. GaussDB(for Redis) can efficiently use memory resourcesby retaining popular live streaming data in the memory and other data in theshared storage, reducing your business costs.

GaussDB(for Redis) 1 Engine Overview

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 2

Page 8: GaussDB(for Redis)

Online educationOnline education applications store a large amount of data such as courses andQ&A. However, only hot data (including most-viewed courses, latest questionlibraries, and lectures by famous teachers) is frequently accessed. GaussDB(forRedis) can determine whether to save data to the memory or shared storageaccording to data access frequency, achieving a balance between performance andcosts.

Persistent Storage for Other ApplicationsWith the rapid development of the Internet, various large-scale applications haveincreasing requirements for persistent storage. Specifically, a massive amount ofdata needs to be stored, including historical orders, feature engineering, logrecords, location coordinates, machine learning, and user profiles. A commonfeature of these scenarios is large data volume and long validity period. Therefore,a large-capacity and low-cost key-value storage service is required to collect andtransfer data. Redis is the most widely used key-value service. Its various datastructures and operation APIs have innate advantages in storing such data.However, the native Redis can only be used as a cache and cannot guaranteepersistence.

In addition to compatibility with Redis APIs, GaussDB(for Redis) provides large-capacity, low-cost, and high-reliability data storage capabilities, making it well-suited to persistent storage scenarios.

GaussDB(for Redis) 1 Engine Overview

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 3

Page 9: GaussDB(for Redis)

1.3 Comparison Between GaussDB(for Redis) andOpen-source Redis

Table 1-1 Difference between GaussDB(for Redis) and open-source Redis

Item Open-source Redis GaussDB(for Redis)

Cost ● Open-source Redis dataneeds to be loaded to thememory for operations. Asthe data volume increases,the memory usageincreases. As a result, thenumber of servers increasesand the cost increasessharply.

● When you perform RDBoperations using forks, thememory usage of a singleprocess is about 50% toensure system security. Inaddition, to meet highavailability requirements,the master-slavearchitecture is generallyused. As a result, thememory required is 4 timesthe actual data volume,which is costly.

● By separating hot and colddata, massive amounts ofcold data can be stored ondisks. The compute andstorage decoupledarchitecture of GaussDB(forRedis) enables flexibleexpansion of compute andstorage resources, avoidingpassively adding servers tohandle growing in-memorydata and reducing costs toa tenth of native Redis.

● Without fork calls, you donot need to reserve 50% ofthe memory. In addition,the compute and storagedecoupled architectureenables multiple datacopies to be sent to storagenodes without doubling thememory, solving theproblem of wastingmemory in Redis.

Storage The maximum capacity of thenative Redis is usually 100 GB.

TB-level storage

Security ● You need to build your ownnetwork security system,which poses great technicalchallenges and is costly.

● You need to use third-partytools to implement SSLencryption.

● GaussDB(for Redis)provides the VPC andsecurity group to isolatetenants and control accessto networks.

● GaussDB(for Redis)supports SSL to ensuresecurity and data integrity.

GaussDB(for Redis) 1 Engine Overview

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 4

Page 10: GaussDB(for Redis)

Item Open-source Redis GaussDB(for Redis)

Reliability ● Data is flushed to disks inseconds, which may causedata loss.Native Redis provides theRDB+AOF persistencesolution. Generally, thefsync policy is set to fsyncevery second instead offsync at every query for agood write performance.However, in a high-concurrency scenario (forexample, 100,000 QPS), if aprocess restarts, you maylose tens of thousands ofrecords even within onesecond.In addition, AOF rewrite isperiodically performed,which triggers forks. As aresult, the latency of thenative Redis in large-capacity scenarios jitterssignificantly, which severelyaffects latency-sensitiveapplications.

● Asynchronous replicationbetween the master andslave databases causesdata inconsistency and therisk of dirty reads.The native Redis masterand slave databases usethe asynchronousreplication mode. If theslave database is blockedor the network jitters, databetween the master andslave databases may beinconsistent. In this case, ifdata needs to be read fromthe database, dirty readswill occur.

● Commands are flushed todisks one by one, and thereis no risk of data loss.GaussDB(for Redis)database-level persistenceto persist each write in realtime, avoiding data lossrisks of the native Redis.

● Multiple copies are stronglyconsistent, avoiding dirtyreads.The multi-copy strongconsistency technologyensures that each write iswritten to disks in the threeAZs, resolving the datainconsistency problembetween the master andslave Redis nodes andensuring high datareliability.

GaussDB(for Redis) 1 Engine Overview

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 5

Page 11: GaussDB(for Redis)

Item Open-source Redis GaussDB(for Redis)

Fault recovery ● Slow data restorationIn the process restartscenario, when the datavolume is large, therestoration of the nativeRedis may take hours.

● Master/Slavesynchronization is costly.If there is a large amountof data, fullsynchronization takes along time and is more likelyto fail. For example, thereare one master databaseand multiple slavedatabases deployed andthe master databasebecomes faulty. After theslave database is upgradedto the new masterdatabase, all other slavedatabases need to performfull synchronization withthe new master database,which takes a long time.

● Fast recoveryIn the process restartscenario, you do not haveto load all data, but restorethe hot data that is recentlywritten. In this way, thedata restoration duration isirrelevant to the total datavolume, and can be cut tominutes.

● The load balancingcapability is provided, andno master/slavesynchronization problemoccurs– The compute and

storage decoupledarchitecture enables allcompute nodes toprovide services in loadbalancing mode.

– If any node is faulty,other nodes can takeover services in seconds.

– After the faulty node isrecovered, services canbe switched back inseconds, and data doesnot need to be loadedfrom other nodes.

Scale out Operations are complex andrequire service interruption.Operations such as datamigration have high risks andcannot meet the requirementsfor quick scaling during peakhours of Internet services(such as e-commercepromotions and hot events).

GaussDB(for Redis) supportsone-click capacity expansion.Compute nodes can be addedin seconds, and storage nodescan be added in minutes.Capacity expansion does notinvolve data migration, whichis secure and reliable.

GaussDB(for Redis) 1 Engine Overview

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 6

Page 12: GaussDB(for Redis)

Item Open-source Redis GaussDB(for Redis)

O&M You need to prepare theserver, install and commissionthe Redis software, set up themonitoring system, and investmanpower and materials formaintenance, which is costly.

GaussDB(for Redis) provides avisualized console thatsupports one-click instancecreation and provides morethan 50 monitoring metrics,including system resources,network traffic, QPS of variouscommands, and latency. Youcan customize monitoringthresholds and alarm policiesto detect system exceptions ina timely manner.

Expertsupport

A team needs to be built tomaintain Redis.

HUAWEI CLOUD databaseexpert team provides 24/7support, including routinevulnerability fixing and versionupdate.

1.4 Compatible APIs and VersionsThis section describes the compatible APIs and versions supported by GaussDB(forRedis).

Table 1-2 Compatible APIs and versions

Compatible API Instance Type Version

Redis Cluster 5.0

1.5 DB Instance SpecificationsNO TE

The DB instance specifications depend on the selected DB engine.

Table 1-3 GaussDB(for Redis) instance specifications

InstanceType

Flavor vCPUs Min.PersistentStorage perNode (GB)

Max.PersistentStorage perNode (GB)

Cluster geminidb.redis.large.4 2 8 64

geminidb.redis.xlarge.4

4 16 128

GaussDB(for Redis) 1 Engine Overview

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 7

Page 13: GaussDB(for Redis)

InstanceType

Flavor vCPUs Min.PersistentStorage perNode (GB)

Max.PersistentStorage perNode (GB)

geminidb.redis.2xlarge.4

8 32 256

geminidb.redis.4xlarge.4

16 64 512

geminidb.redis.8xlarge.4

32 128 1024

1.6 DB Instance StatusesThe status of a DB instance indicates the health of the instance. You can view theDB instance statuses on the management console.

Table 1-4 DB instance statuses

Status Description

Available DB instance is available.

Abnormal DB instance is faulty.

Creating DB instance is being created.

Creation failed DB instance creation fails.

Restarting DB instance is being restarted.

Resettingpassword

Administrator password is being reset.

Adding node Nodes are being added to a DB instance.

Deleting node Nodes are being deleted from a DB instance.

Scaling up The storage space of the DB instance is being expanded.

Changinginstance class

The CPU or memory of a DB instance is being changed.

Backing up Backup is being created.

Checkingrestoration

The backup of the current DB instance is being restored to anew DB instance.

Frozen DB instances are frozen when there is no balance in theaccount.

Unfreezing DB instance is unfrozen after the overdue payments arecleared.

GaussDB(for Redis) 1 Engine Overview

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 8

Page 14: GaussDB(for Redis)

1.7 ConstraintsTo ensure service quality and maximize performance, there are some constraintson the use of keys and values.

This section describes the constraints on using various data types in theGaussDB(for Redis) database.

Table 1-5 Constraints

Data Type Command Example Field Value Range (Less Than orEqual to)

String SET key value key: 100 KBvalue: 1 MB

Hash HSET key field value key+field: 100 KBvalue: 1 MB

List LPUSH key value key: 100 KBvalue: 1 MB

Set SADD key member key+member: 100 KB

ZSET ZADD key score member key+member: 100 KB

Integer Counters INCR key key: 100 KB

Float Counters INCRBYFLOAT keyincrement

key: 100 KB

STREAM XADD key ID field value key: 100 KB

Geo GEOADD key longitudelatitude member

key+member: 100 KB

GaussDB(for Redis) 1 Engine Overview

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 9

Page 15: GaussDB(for Redis)

2 Getting Started with GaussDB(for Redis)

2.1 OverviewThis section describes how to buy a DB instance and connect to it, helping youunderstand the process of connecting to and managing DB instances.

Flowchart

Figure 2-1 Flowchart

ProcedurePerform the following operations before you buy a DB instance.

Step 1: Log in to the GaussDB NoSQL console.

Step 2: Buy a DB instance.

Step 3: Connect to a DB instance.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 10

Page 16: GaussDB(for Redis)

2.2 Buying a DB InstanceThis section describes how to buy a DB instance that is compatible with RedisAPIs.

By default, each tenant can have up to 50 GaussDB(for Redis) instances. To applyfor a higher quota, choose Service Tickets > Create Service Ticket in the upperright corner of the management console and submit the application.

Prerequisites● You have registered a HUAWEI CLOUD account.

Procedure

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click Buy DB Instance.

Step 3 On the displayed page, select a billing mode, select your DB instance specificationsand click Next.

Figure 2-2 Billing mode and basic information

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 11

Page 17: GaussDB(for Redis)

Table 2-1 Billing mode

Parameter Description

Billing mode Select Yearly/Monthly or Pay-per-use.● Yearly/Monthly

– Specify Required Duration, and the system deductsthe fees incurred from your account based on theservice price.

– If you will no longer use the instance for a long timeafter it expires, you can change the billing mode fromyearly/monthly to pay-per-use. For details, seeChanging the Billing Mode from Yearly/Monthly toPay-per-Use.NOTE

DB instances paid in yearly/monthly mode cannot be deleted,but only unsubscribed. For details, see Unsubscribing aYearly/Monthly DB Instance.

● For pay-per-use DB instances– The system deducts the fees incurred from your

account based on the service duration.– If you want to use a DB instance at a low cost for a

long period of time, you can change its billing modefrom pay-per-use to yearly/monthly. For details, seeChanging the Billing Mode from Pay-per-Use toYearly/Monthly.

Table 2-2 Basic information

Parameter Description

Region The region where the tenant is located.NOTICE

Select the region nearest where you will be accessing the instance from solatency can be kept to a minimum and response time will be faster. DBinstances in different regions cannot communicate with each otherthrough a private network, and once you buy a DB instance, you cannotchange the region of it. Therefore, exercise caution when selecting aregion.

DB InstanceName

The new name can be the same as an existing instance name. Itmust start with a letter and consist of 4 to 64 characters. Onlyletters (case-sensitive), digits, hyphens (-), and underscores (_)are allowed.After a DB instance is created, you can change the DB instancename. For details, see section Changing a DB Instance Name.

CompatibleAPI

Redis

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 12

Page 18: GaussDB(for Redis)

Parameter Description

DB InstanceType

Cluster

DB EngineVersion

5.0

AZ An AZ is a part of a region with its own independent powersupplies and networks. AZs are physically isolated but cancommunicate through an internal network connection.Instances can be deployed in a single AZ or three AZs.● If you want to deploy an instance in a single AZ, select one AZ.● If you want to deploy an instance across AZs for disaster

recovery, select three AZs. In this deployment mode, the nodesare evenly distributed in the three AZs.

If you need to deploy an instance in three AZs, choose ServiceTickets > Create Service Ticket in the upper right corner of themanagement console and submit the application.

Figure 2-3 Specifications and storage

Table 2-3 Specifications and storage

Parameter Description

InstanceSpecifications

Larger vCPU specifications can provide better performance.Select the specifications that meet your service requirements.For details about the DB instance specifications, see DBInstance Specifications.

Nodes Select the number of nodes based on the site requirements.After a DB instance is created, you can add nodes. For details,see Adding Nodes.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 13

Page 19: GaussDB(for Redis)

Parameter Description

PersistentStorage

You have exactly as much persistent storage as there is data.Select enough storage space to meet your service requirements.After a DB instance is created, you can scale up its storagespace. For details, see Scaling Up Storage Space.

Load BalancerIP Address

This option is selected by default and cannot be changed.After an instance is created, click the instance to go to theBasic Information page. In the Network Information area,you can find the load balancer IP address in Load Balancer IPAddress field, which can be used to connect to the instance.For details, see Connecting to a DB Instance Using a LoadBalancer IP Address.If you need to use this function, choose Service Tickets >Create Service Ticket in the upper right corner of themanagement console and submit the application.

Figure 2-4 Network and database configuration

Table 2-4 Network

Parameter Description

VPC The virtual network where your DB instances are located. AVPC isolates networks for different services. You can select anexisting VPC or create a VPC.For details about how to create a VPC, see section "Creating aVPC" in the Virtual Private Cloud User Guide.If there are no VPCs available, the system allocates resourcesto you by default.NOTE

● After the GaussDB(for Redis) instance is created, the VPC where theinstance resides cannot be changed.

● If you want to connect to a GaussDB(for Redis) instance through anECS over an internal network, the GaussDB(for Redis) instance andthe ECS must be in the same VPC. If they are not in the same VPC,you can create a VPC peering connection to enable access.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 14

Page 20: GaussDB(for Redis)

Parameter Description

Subnet A subnet provides dedicated network resources that arelogically isolated from other networks, improving networksecurity.

Security Group A security group controls access between GaussDB(for Redis)instances and other services. When you select a security group,you must ensure that it allows the client to access DBinstances.If there are no security groups available, the system allocatesresources to you by default.

Table 2-5 Database configuration

Parameter Description

DatabasePassword

Set a password for the administrator. The password:● Must be 8 to 32 characters long.● Must contain uppercase letters, lowercase letters, digits, and

any of the following special characters: ~!@#%^*-_=+?● For security reasons, you must select a strong password.

The system will verify the password strength.Keep this password secure. If you lose it, the system cannotretrieve it.

ConfirmPassword

The value must be the same as the database password.

EnterpriseProject

This parameter is provided for enterprise users.An enterprise project facilitates project-level management andgrouping of cloud resources and users. The default project isdefault.Select an enterprise project from the drop-down list. For moreinformation about enterprise project, see EnterpriseManagement User Guide.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 15

Page 21: GaussDB(for Redis)

Table 2-6 Tags

Parameter Description

Tags The setting is optional. Adding tags helps you better identifyand manage your DB instances. Each DB instance can have upto 2010 tags.A tag is composed of a key-value pair.● Key: Mandatory if the DB instance is going to be tagged

Each tag key must be unique for each DB instance. The keycan include up to 36 characters, including digits, letters,underscores (_), and hyphens (-).

● Value: Optional if the DB instance is going to be taggedThe value can contain up to 43 characters, including digits,letters, underscores (_), periods (.), and hyphens (-).

After a DB instance is created, you can view its tag details onthe Tags tab. In addition, you can add, modify, and delete tagsfor existing DB instances. For details, see Managing Tags.

Table 2-7 Required duration

Parameter Description

RequiredDuration

Sets the service duration if you select the Yearly/Monthlybilling mode. The service duration ranges from one month tothree years.

Auto-renewal ● By default, this option is not selected.● If you select this option, the auto-renew cycle is determined

by the selected required duration.

Step 4 On the displayed page, confirm the DB instance details.● For yearly/monthly DB instances

– If you need to modify the specifications, click Previous to return to theprevious page.

– If you do not need to modify the specifications, read and agree to theservice agreement and click Pay Now to go to the payment page andcomplete the payment.

● For pay-per-use DB instances– If you need to modify the specifications, click Previous to return to the

previous page.– If you do not need to modify the specifications, read and agree to the

service agreement and click Submit to start creating the instance.

Step 5 On the Instance Management page, view and manage your DB instances.● After the creation is complete, the status changes to Available.

You can click in the upper right corner of the page to refresh the DBinstance statuses.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 16

Page 22: GaussDB(for Redis)

● After a DB instance is created, the default database port is 8635 and cannotbe changed.

----End

2.3 Instance Connections

2.3.1 Connection MethodsYou can connect to a GaussDB(for Redis) instance through a private network,public network, load balancer IP address, or program code.

Table 2-8 Connection methods

Method Scenario Description

Privatenetwork

GaussDB NoSQL provides a private IPaddress by default.Your applications are deployed on an ECSthat is in the same region and VPC as yourinstances.

High security andperformance

Publicnetwork

If you cannot access a DB instancethrough a private IP address, bind an EIPto the DB instance first and connect theECS to the DB instance through the EIP.

● Low security● For faster

transmission andimproved security,you are advised tomigrate yourapplications to anECS that is in thesame subnet as yourinstance and use aprivate IP address toaccess the instance.

Loadbalancer IPaddress

A load balancer IP address is provided bydefault.

● High security andperformance

● High reliability,eliminating theimpact of singlepoints of failure

Jedis JedisCluster and JedisPool can be used toaccess GaussDB(for Redis) instances.

-

HiRedis HiRedis can be used to access aGaussDB(for Redis) instance.

-

NodeJs NodeJs can be used to access aGaussDB(for Redis) instance.

-

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 17

Page 23: GaussDB(for Redis)

Method Scenario Description

PHP PHP can be used to access a GaussDB(forRedis) instance.

-

Python Python can be used to access aGaussDB(for Redis) instance.

-

2.3.2 Connect to a DB Instance over a Private Network

ScenariosThis section uses the Linux operating system as an example to describe how toconnect an ECS to a GaussDB(for Redis) instance over a private network.

You can use either of the following methods to connect to a GaussDB(for Redis)instance through a private network:

Method 1: Connect to the private IP address of each node to access the DBinstance.

Method 2: Configure a private zone for the DB instance to access the DB instance.

Precautions● The default port of the GaussDB(for Redis) instance is 8635.● The DB instances must be in the same VPC subnet as the ECS.● The ECS must be allowed in a security group that has access to the DB

instances.Scenario 1: If the security group that the target DB instance belongs to is thedefault security group, you do not need to configure security group rules.Scenario 2: If the security group that the target DB instance belongs to is notthe default security group, check whether the security group rules allow theECS to connect to the DB instance.– If the security group rules allow the access from the ECS, the ECS can

connect to the DB instance.– If the security group rule does not allow the access from the ECS, add an

inbound rule to the security group.For details about how to configure a security group, see ConfiguringSecurity Group Rules.

Prerequisites● Create an ECS running Linux. For details, see the section Purchasing an ECS

in the Getting Started with Elastic Cloud Server.

NO TICE

The DB instances must be in the same VPC subnet as the ECS.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 18

Page 24: GaussDB(for Redis)

● Download the Redis client installation package.

Connecting to a DB Instance over a Private Network

Step 1 Log in to the ECS. For details, see the section Logging In to an ECS in the GettingStarted with Elastic Cloud Server.

Step 2 Obtain the Redis client.

Method 1

Run the following command to download the Redis client.

wget http://download.redis.io/releases/redis-5.0.7.tar.gz

Method 2

Download the Redis client and upload the Redis client installation package to theECS.

Step 3 Decompress the client tool package.

tar -xzf redis-5.0.7.tar.gz

Step 4 Connect to the DB instance in the src directory.

cd redis-5.0.7

make

cd src

./redis-cli -h <DB_HOST> -p <DB_PORT> -a <DB_PWD>

Example:

./redis-cli -h 192.168.0.208 -p 8635 -a Aa@12345

NO TE

● <DB_HOST> indicates the private IP address of the node to be connected. Obtain thevalue from the Private IP Address column in the node list on the Basic Informationpage.

● <DB_PORT> indicates the port of the DB instance. The default value is 8635.

● <DB_PWD> indicates the administrator password.

Step 5 Check the connection result. If the following information is displayed, theconnection is successful.IP:port>

----End

Connecting to a DB Instance Through a Private Domain Name

Step 1 Configure the private domain name for the GaussDB(for Redis) instance. Fordetails, see Creating a Private Zone.

Step 2 Log in to the ECS. For details, see the section Logging In to an ECS in the GettingStarted with Elastic Cloud Server.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 19

Page 25: GaussDB(for Redis)

Step 3 Obtain the Redis client.

Method 1

Run the following command to download the Redis client.

wget http://download.redis.io/releases/redis-5.0.7.tar.gz

Method 2

Download the Redis client and upload the Redis client installation package to theECS.

Step 4 Decompress the client tool package.

tar -xzf redis-5.0.7.tar.gz

Step 5 Connect to the DB instance in the src directory.

cd redis-5.0.7

make

cd src

./redis-cli -h <DB_Domain_Name> -p <DB_PORT> -a <DB_PWD>

Example:

./redis-cli -h guassdbforredis.com -p 8635 -a Aa@12345

NO TE

● <DB_Domain_Name> indicates the private zone name of the DB instance to beconnected. The private zone name is the one created in Step 1.

● <DB_PORT> indicates the port of the DB instance. The default value is 8635.

● <DB_PWD> indicates the administrator password.

Step 6 Check the connection result. If the following information is displayed, theconnection is successful.Domain_Name:port>

----End

2.3.3 Connecting to a DB Instance over a Public Network

Scenarios

This section uses the Linux operating system as an example to describe how toconnect an ECS to a GaussDB(for Redis) instance over a public network.

Prerequisites● Bind an EIP to the GaussDB(for Redis) instance node and set security group

rules. For details, see Binding and Unbinding an EIP and ConfiguringSecurity Group Rules.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 20

Page 26: GaussDB(for Redis)

NO TE

If a GaussDB(for Redis) instance has multiple nodes, the EIP can be bound to anynode of the instance.

● Create an ECS running Linux. For details, see the section Purchasing an ECSin the Getting Started with Elastic Cloud Server.

● Download the Redis client installation package.

Procedure

Step 1 Log in to the ECS. For details, see the section Logging In to an ECS in the GettingStarted with Elastic Cloud Server.

Step 2 Obtain the Redis client.

Method 1

Run the following command to download the Redis client.

wget http://download.redis.io/releases/redis-5.0.7.tar.gz

Method 2

Download the Redis client and upload the Redis client installation package to theECS.

Step 3 Decompress the client tool package.

tar -xzf redis-5.0.7.tar.gz

Step 4 Connect to the DB instance in the src directory.

cd redis-5.0.7

make

cd src

./redis-cli -h <DB_HOST> -p <DB_PORT> -a <DB_PWD>

Example:

./redis-cli -h 192.168.0.208 -p 8635 -a Aa@12345

NO TE

● <DB_PWD> indicates the administrator password.

● <DB_HOST> is the EIP of the node to be connected. Obtain the EIP from the NodeInformation area on Basic Information page of the instance.

● <DB_PORT> indicates the port number. The default value is 8635 and cannot bechanged.

Step 5 Check the connection result. If the following information is displayed, theconnection is successful.IP:port>

----End

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 21

Page 27: GaussDB(for Redis)

2.3.4 Connecting to a DB Instance Using a Load Balancer IPAddress

ScenariosThis section uses the Linux operating system as an example to describe how toconnect an ECS to a GaussDB(for Redis) instance using a load balancer IP address.

Precautions● The default port of the GaussDB(for Redis) instance is 8635.● The DB instances must be in the same VPC subnet as the ECS.● The ECS must be allowed in a security group that has access to the DB

instances.Scenario 1: If the security group that the target DB instance belongs to is thedefault security group, you do not need to configure security group rules.Scenario 2: If the security group that the target DB instance belongs to is notthe default security group, check whether the security group rules allow theECS to connect to the DB instance.– If the security group rules allow the access from the ECS, the ECS can

connect to the DB instance.– If the security group rule does not allow the access from the ECS, add an

inbound rule to the security group.For details about how to configure a security group, see ConfiguringSecurity Group Rules.

Prerequisites● Create an ECS running Linux. For details, see the section Purchasing an ECS

in the Getting Started with Elastic Cloud Server.

NO TICE

The DB instances must be in the same VPC subnet as the ECS.

● Download the Redis client installation package.

Procedure

Step 1 Log in to the ECS. For details, see the section Logging In to an ECS in the GettingStarted with Elastic Cloud Server.

Step 2 Obtain the Redis client.

Method 1

Run the following command to download the Redis client.

wget http://download.redis.io/releases/redis-5.0.7.tar.gz

Method 2

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 22

Page 28: GaussDB(for Redis)

Download the Redis client and upload the Redis client installation package to theECS.

Step 3 Decompress the client tool package.

tar -xzf redis-5.0.7.tar.gz

Step 4 Connect to the DB instance in the src directory.

cd redis-5.0.7

make

cd src

./redis-cli -h <DB_HOST> -p <DB_PORT> -a <DB_PWD>

Example:

./redis-cli -h 192.168.0.208 -p 8635 -a Aa@12345

NO TE

● <DB_HOST> indicates the load balancer IP address of the DB instance to be connected,that is, the Load Balancer IP Address in the Network area on the Basic Informationpage of the DB instance. If you want to enable load balancer IP address, choose ServiceTickets > Create Service Ticket in the upper right corner of the management consoleand submit the application.

● <DB_PORT> indicates the port of the DB instance. The default value is 8635.● <DB_PWD> indicates the administrator password.

Step 5 Check the connection result. If the following information is displayed, theconnection is successful.IP:port>

----End

2.3.5 Connecting to a DB Instance Using JedisThis section describes how to connect to a GaussDB(for Redis) instance usingJedis.

Using JedisCluster to Access GaussDB(for Redis)Example code:

import org.apache.commons.pool2.impl.GenericObjectPoolConfig;import redis.clients.jedis.HostAndPort;import redis.clients.jedis.JedisCluster;

public class ClusterTests {

private static void testCluster() { String pwd = "a"; //Enter the GaussDB(for Redis) IP address and port. JedisCluster cluster = new JedisCluster(new HostAndPort("172.200.48.76", 8635), 200, 2000, 5, pwd, new GenericObjectPoolConfig()); System.out.println(cluster.hgetAll("676296")); System.out.println(cluster.set("key1", "value1")); }

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 23

Page 29: GaussDB(for Redis)

public static void main(String[] args) { testCluster(); }}

NO TE

● For details about the supported and restricted commands, see Supported andRestricted Commands.

● The mset and msetnx commands of GaussDB(for Redis) use a hash algorithm differentfrom that used by the open-source Redis cluster. In GaussDB(for Redis), all keys mustcontain hash tags for access. Otherwise, unexpected errors may occur.

● The HA feature of GaussDB(for Redis) is also different from that of the open-sourceRedis clusters. When a node breaks down, GaussDB(for Redis) clusters may beunavailable for a short period of time. To avoid this situation, you are advised to accessGaussDB(for Redis) using JedisPool through the load balancer IP address for highavailability.

Using JedisPool to Access GaussDB(for Redis)JedisPool is recommended for connecting to GaussDB(for Redis). With JedisPool,load balancer IP address can be used to achieve high availability.

Example code:

import org.apache.commons.pool2.impl.GenericObjectPoolConfig;import redis.clients.jedis.Jedis;import redis.clients.jedis.JedisPool;

public class JedisPoolTests {

private static void testPool() { String pwd = "a"; //Enter the IP address or load balancer IP address and port of GaussDB(for Redis). To achieve high availability, the load balancer IP address is recommended. JedisPool pool = new JedisPool(new GenericObjectPoolConfig(), "172.200.48.76", 8635, 2000, pwd); Jedis jedis = pool.getResource(); try { System.out.println(jedis.hgetAll("676296")); System.out.println(jedis.set("key1", "value1")); } finally { jedis.close(); } pool.destroy(); }

public static void main(String[] args) { testPool(); }}

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 24

Page 30: GaussDB(for Redis)

NO TE

● For details about the supported and restricted commands, see Supported andRestricted Commands.

● When you use the mset and mstenx commands, all keys must contain hash tags foraccess. Otherwise, unexpected errors may occur.

● To achieve high availability, you can apply for a load balancer IP address. To obtain theload balancer IP address, choose Service Tickets > Create Service Ticket in the upperright corner of the management console. After the instance is created, click the instancename to go to the Basic Information page and obtain the load balancer IP address inthe Network Information area.

2.3.6 Connecting to a DB Instance Using HiRedis

Prerequisites● A GaussDB(for Redis) instance has been created and is running properly. For

details about how to create a GaussDB(for Redis) instance, see Buying a DBInstance.

● An ECS has been created. For details about how to create an ECS, see sectionPurchasing an ECS in Getting Started with Elastic Cloud Server.

● The GCC compilation tool has been installed on the ECS.

Procedure

Step 1 Obtain the private IP address, domain name, or port of the instance.● For details about how to query the internal IP address and port number, see

Viewing the IP Address and Port Number.● For details about how to obtain the private network domain name, see

Creating a Private Zone.

Step 2 Log in to the ECS. For details, see Logging In to an ECS in Getting Started withElastic Cloud Server.

Step 3 Run the following command to download and decompress the hiredis package.

wget https://github.com/redis/hiredis/archive/master.zip;

Step 4 Go to the directory where the decompressed hiredis package is saved, and compileand install hiredis.

make

make install

Step 5 Write the test code connRedisTst.cc.

NO TE

For details about how to use HiRedis, see the usage description on the Redis officialwebsite.

The code is as follows:

#include <stdio.h>#include <stdlib.h>#include <string.h>

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 25

Page 31: GaussDB(for Redis)

#include <hiredis.h>int main(int argc, char **argv) { unsigned int j; redisContext *conn; redisReply *reply; if (argc < 3) { printf("Usage: example {instance_ip_address} 6379 {password}\n"); exit(0); } const char *hostname = argv[1]; const int port = atoi(argv[2]); const char *password = argv[3]; struct timeval timeout = { 1, 500000 }; // 1.5 seconds conn = redisConnectWithTimeout(hostname, port, timeout); if (conn == NULL || conn->err) { if (conn) { printf("Connection error: %s\n", conn->errstr); redisFree(conn); } else { printf("Connection error: can't allocate redis context\n"); } exit(1); } /* AUTH */ reply = redisCommand(conn, "AUTH %s", password); printf("AUTH: %s\n", reply->str); freeReplyObject(reply); /* Set */ reply = redisCommand(conn,"SET %s %s", "key", "hiredis test ok!"); printf("SET: %s\n", reply->str); freeReplyObject(reply); /* Get */ reply = redisCommand(conn,"GET key"); printf("GET key: %s\n", reply->str); freeReplyObject(reply); /* Disconnects and frees the context */ redisFree(conn); return 0;}

Step 6 Run the following command to perform compilation:

gcc connRedis.c -o connRedis -I /usr/local/include/hiredis -lhiredis

If an error is reported, locate the directory where the hiredis.h file is stored andmodify the compilation command.

After the compilation, an executable connRedis file is obtained.

Step 7 Run the following command to connect to the DB instance.

export LD_LIBRARY_PATH=/usr/local/lib/:$LD_LIBRARY_PATH

./connRedis <redis_ip_address> 8635 <password>

Replace the following information based on the site requirements:

● <redis_ip_address> indicates the private IP address or domain name of theinstance obtained in GaussDB(for Redis).

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 26

Page 32: GaussDB(for Redis)

● 8635 is the default port number of the instance.● <password> indicates the password set when the instance is created.

Step 8 If the following information is displayed, the instance is successfully connected.AUTH: OKSET: OKGET key: Hello, hiredis test ok!

----End

2.3.7 Connecting to a DB Instance Using Node.js

Prerequisites● A DB instance has been created and is in the Available status.● An ECS has been created. For details about how to create an ECS, see section

Purchasing an ECS in Getting Started with Elastic Cloud Server.● If the Linux operating system is used, ensure that compilation tools such as

GCC have been installed on the ECS.

Procedure

Step 1 Obtain the private IP address, domain name, or port of the instance.● For details about how to query the internal IP address and port number, see

Viewing the IP Address and Port Number.● For details about how to obtain the private network domain name, see

Creating a Private Zone.

Step 2 Log in to the ECS. For details, see Logging In to an ECS in Getting Started withElastic Cloud Server.

Step 3 Run the following command to install Node.js:● Method 1: Run the following command to install NodeJs.

yum install nodejs

NO TE

CentOS (Red Hat series) is used as an example. If Ubuntu (Debian series) is used, runthe corresponding installation command.

● Method 2: If the method 1 fails, use the following method to install it.wget https://nodejs.org/dist/v0.12.4/node-v0.12.4.tar.gz --no-check-certificate ;tar -xvf node-v0.12.4.tar.gz;cd node-v0.12.4;./configure;make;make install;

NO TE

CentOS (Red Hat series) is used as an example. If Ubuntu (Debian series) is used, runthe corresponding installation command.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 27

Page 33: GaussDB(for Redis)

Step 4 After the Node.js is installed, run the following command to check the versionnumber and ensure that the Node.js is successfully installed.

node -v

Step 5 Install the JS package management tool npm.

yum install npm

Step 6 Install the Node.js Redis client ioredis.

npm install ioredis

Step 7 Edit the sample script for connecting to the instance.var Redis = require('ioredis');var redis = new Redis({ port: 8635, //Port number of the instance obtained in step 1. host: '192.168.1.18', //Enter the private IP address obtained in step 1, for example, 192.168.1.18. family: 4, //4 indicates IPv4, and the 6 indicates IPv6. password: 'pwd', //Replace pwd with the actual password. db: 0});redis.set('key', 'Nodejs tst ok!');redis.get('key', function (err, result) { console.log(result);});

Step 8 Run the sample script and verify that the result is normal.

node ioredisdemo.js

----End

2.3.8 Connecting to a DB Instance Using PHP

Prerequisites● A DB instance has been created and is in the Available status.● An ECS has been created. For details about how to create an ECS, see section

Purchasing an ECS in Getting Started with Elastic Cloud Server.● The GCC compilation tool has been installed on the ECS.

Procedure

Step 1 Obtain the private IP address, domain name, or port of the instance.● For details about how to query the internal IP address and port number, see

Viewing the IP Address and Port Number.● For details about how to obtain the private network domain name, see

Creating a Private Zone.

Step 2 Log in to the ECS. For details, see Logging In to an ECS in Getting Started withElastic Cloud Server.

Step 3 Install the PHP development kit and command line tool.

Run the following yum command to install the PHP development package:

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 28

Page 34: GaussDB(for Redis)

yum install php-devel php-common php-cli

NO TE

CentOS (Red Hat series) is used as an example. If Ubuntu (Debian series) is used, run thecorresponding installation command.

Step 4 After the installation is complete, check the version number to ensure that theinstallation is successful.

php --version

Step 5 Install the PHP client of Redis.

1. Run the following command to download the source phpredis package:wget http://pecl.php.net/get/redis-4.1.0RC3.tgz

NO TE

The preceding clients are of the latest version. You can download the phpredis client ofother versions from the PHP official website.

2. Run the following commands to decompress the source phpredis package:tar -zxvf redis-4.1.0RC3.tgzcd redis-4.1.0RC3

3. Run the following extension command before compilation:phpize

4. Run the following command to configure the php-config file:./configure --with-php-config=/usr/bin/php-config

NO TE

The PHP installation method and location depend on the operating system. Before theconfiguration, run the find / -name php.ini command to check the directory of thefile.

5. Run the following command to compile and install the phpredis client:make && make install

6. After the installation, add the extension configuration in the php.ini file toreference the Redis module.Run the following command to find the php.ini file:vim /usr/local/php/etc/php.iniAdd the following configuration item to the php.ini file:extension = "/usr/lib64/php/modules/redis.so"

NO TE

The directories of the php.ini and redis.so files may be different. You can run thefollowing command to query the directories.find / -name php.inifind / -name redis.so

7. Save the configuration and exit. Then, run the following command to checkwhether the extension takes effect:php -m |grep redisIf redis is returned, the PHP Redis client environment has been set up.

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 29

Page 35: GaussDB(for Redis)

Step 6 Use the phpredis client to connect to the instance.

1. Compile the test code redis.php.<?php $redis_host = "192.168.1.18"; // (Assume that the Redis IP address is 192.168.1.18.) $redis_port = 8635; $user_pwd = "pwd"; $redis = new Redis(); if ($redis->connect($redis_host, $redis_port) == false) { die($redis->getLastError()); } if ($redis->auth($user_pwd) == false) { die($redis->getLastError()); } if ($redis->set("key", "php test ok!") == false) { die($redis->getLastError()); } $value = $redis->get("key"); echo $value; $redis->close();?>

2. Run the redis.php command to check whether the result is normal.

----End

2.3.9 Connecting to a DB Instance Using Python

Prerequisites● A DB instance has been created and is in the Available status.● An ECS has been created. For details about how to create an ECS, see section

Purchasing an ECS in Getting Started with Elastic Cloud Server.

Procedure

Step 1 Obtain the private IP address, domain name, or port of the instance.● For details about how to query the internal IP address and port number, see

Viewing the IP Address and Port Number.● For details about how to obtain the private network domain name, see

Creating a Private Zone.

Step 2 Log in to the ECS. For details, see Logging In to an ECS in Getting Started withElastic Cloud Server.

Step 3 Install the Python client Redis-py of Python and Redis.

1. If the system does not provide Python, you can use yum to install it.yum install python

2. Run the following command to download and decompress the redis-pypackage:wget https://github.com/andymccurdy/redis-py/archive/master.zip;

3. Go to the decompression directory and install the Python client Redis-py ofRedis.python setup.py install

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 30

Page 36: GaussDB(for Redis)

4. After the installation, run the python command. If the following informationis displayed, Redis-py is successfully installed:Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import redis>>>

Step 4 Use the Redis-py client to connect to the instance.

In the following steps, commands are executed in CLI mode. (Alternatively, writethe commands into a Python script and then execute the script.)

1. Run the python command to enter the command line mode.You have entered CLI mode if the following command output is displayed:Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37) [GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2Type "help", "copyright", "credits" or "license" for more information.>>> import redis>>>

2. Run the following command in the CLI to check whether the result is normal.>>> r = redis.StrictRedis(host='192.168.1.18', port=8635, password='pwd');>>> r.set('key', 'Python tst ok!')True>>> r.get('key')'Python tst ok!'

NO TE

Modify the following information based on the site requirements before running thepreceding command.– In the preceding command, host and port indicate the private network IP address/

domain name and port number of the instance obtained in Step 1.– password indicates the password of the instance.

----End

GaussDB(for Redis) 2 Getting Started with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 31

Page 37: GaussDB(for Redis)

3 Working with GaussDB(for Redis)

3.1 Permissions

3.1.1 Creating a User Group and Assigning PermissionsThis section describes how to use IAM to implement fine-grained permissionscontrol for your GaussDB NoSQL resources. With IAM, you can:

● Create IAM users for employees based on your enterprise's organizationalstructure. Each IAM user will have their own security credentials for accessingGaussDB NoSQL resources.

● Grant only the permissions required for users to perform a specific task.● Entrust a HUAWEI CLOUD account or cloud service to perform efficient O&M

on your GaussDB NoSQL resources.

If your HUAWEI CLOUD account does not require individual IAM users, skip thissection.

The following describes the procedure for granting permissions (see Figure 3-1).

PrerequisitesLearn about the permissions (see Permissions Management) supported byGaussDB NoSQL and choose policies or roles according to your requirements. Forthe system policies of other services, see Permissions Policies.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 32

Page 38: GaussDB(for Redis)

Process Flow

Figure 3-1 Process of granting GaussDB NoSQL permissions

1. Create a user group and assign permissions to it.Create a user group on the IAM console, and attach the GaussDBNoSQLReadOnlyAccess policy to the group.

2. Create an IAM user.Create a user on the IAM console and add the user to the group created in 1.

3. Log in and verify permissions.Log in to the management console using the created user, and verify that theuser only has read permissions.– Choose Service List > GaussDB NoSQL and click Buy DB Instance. If you

cannot buy an instance, the GaussDB NoSQLReadOnlyAccess permissionhas taken effect.

– Choose any other service in the Service List (for example, there is onlythe GaussDB NoSQLReadOnlyAccess policy). If a message appearsindicating insufficient permissions to access the service, the GaussDBNoSQLReadOnlyAccess policy has already taken effect.

3.1.2 Creating a Custom PolicyCustom policies can be created to supplement the system-defined policies ofGaussDB NoSQL. For the actions supported for custom policies, see PermissionsPolicies and Supported Actions.

You can create custom policies in either of the following ways:

● Visual editor: Select cloud services, actions, resources, and request conditions.This does not require knowledge of policy syntax.

● JSON: Edit JSON policies from scratch or based on an existing policy.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 33

Page 39: GaussDB(for Redis)

For details, Creating a Custom Policy. The following contains examples ofcommon GaussDB NoSQL custom policies.

Example Custom Policy● Example 1: Allowing users to create GaussDB NoSQL instances

{ "Version": "1.1", "Statement": [ { "Effect": "Allow", "Action": [ "nosql:instance:create" ] } ]}

● Example 2: Deny users the permission to delete GaussDB NoSQL instances.

A policy with only "Deny" permissions must be used in conjunction with otherpolicies to take effect. If the policies assigned to a user contain both Allowand Deny actions, the Deny actions take precedence over the Allow actions.

The following method can be used if you need to assign permissions of theGaussDB NoSQLFullAccess policy to a user but you want to prevent the userfrom deleting GaussDB NoSQL instances. Create a custom policy for denyingGaussDB NoSQL instance deletion, and attach both policies to the group towhich the user belongs. Then, the user can perform all operations onGaussDB NoSQL instances except deleting GaussDB NoSQL instances. Thefollowing is an example of the deny policy:{ "Version": "1.1", "Statement": [ { "Effect": "Deny" "Action": [ "nosql:instance:delete" ], } ]}

● Example 3: Defining permissions for multiple services in a policy

A custom policy can contain the actions of multiple services that are of theglobal or project-level type. The following is an example policy containingactions of multiple services:{ "Version": "1.1", "Statement": [ { "Action": [ "nosql:instance:create", "nosql:instance:rename", "nosql:instance:delete", "vpc:publicIps:list", "vpc:publicIps:update" ], "Effect": "Allow" }

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 34

Page 40: GaussDB(for Redis)

] }

3.2 Instance Lifecycle

3.2.1 Restarting a DB instance

ScenariosYou may need to occasionally restart a DB instance to perform routinemaintenance.

Precautions● If the instance status is Available, Abnormal, or Checking restoration, you

can restart the instance.● Restarting a DB instance interrupts services, so exercise caution when

performing this operation.● If you restart a DB instance, all nodes in the instance are also restarted.● If you enable operation protection to improve the security of your account

and cloud products, two-factor authentication is required for sensitiveoperations. For details about how to enable operation protection, see theIdentity and Access Management User Guide.

Procedure

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, locate the instance you wish to restart andin the Operation column choose Restart or More > Restart.

Alternatively, click the target DB instance, and on the displayed Basic Informationpage, click Restart in the upper right corner of the page.

Step 3 If you have enabled operation protection, click Start Verification in the RestartDB Instance dialog box. On the displayed page, click Send Code, enter theverification code, and click Verify. The page is closed automatically.

Step 4 In the displayed dialog box, click Yes.

For GaussDB(for Redis) instances, you can restart several nodes at the same timeor in sequence based on service requirements.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 35

Page 41: GaussDB(for Redis)

Figure 3-2 Restarting the GaussDB(for Redis) instance

----End

3.2.2 Deleting a DB Instance

Scenarios● To delete a DB instance billed in the pay-per-use mode, locate the target DB

instance and click Delete on the Instance Management page.● To delete a yearly/monthly DB instance, unsubscribe from the order. For

details, see Unsubscribing a Yearly/Monthly DB Instance.

Precautions● If you delete a DB instance, all the data in it and all automated backups are

automatically deleted as well and cannot be restored, so exercise cautionwhen performing this operation.

● If you delete an instance, all nodes in the instance are also deleted.● If you enable operation protection to improve the security of your account

and cloud products, two-factor authentication is required for sensitiveoperations. For details about how to enable operation protection, see theIdentity and Access Management User Guide.

Procedure

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, locate the target instance and in theOperation column choose Delete or More > Delete.

Step 3 If you have enabled operation protection, click Start Verification in the DeleteDB Instance dialog box. On the displayed page, click Send Code, enter theverification code, and click Verify. The page is closed automatically.

Step 4 On the displayed page, click Yes.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 36

Page 42: GaussDB(for Redis)

Deleted DB instances are not displayed in the instance list.

----End

3.2.3 Recycling a DB InstanceGaussDB(for Redis) can move unsubscribed yearly/monthly DB instances anddeleted pay-per-use DB instances to the recycle bin, so you can rebuild the DBinstance and restore data from it.

The recycling policy is enabled by default and cannot be disabled. DB instances inthe recycle bin are retained for 1 day by default, and this will not incur anycharges.

Currently, you can put up to 100 instances into the recycle bin. If the maximumnumber of instances is reached, you cannot put instances into the recycle binanymore.

PrecautionsDB instances in the abnormal status will not be moved to the recycle bin afterbeing deleted.

Modifying the Recycling Policy

NO TICE

You can modify the retention period, and the changes only apply to the DBinstances deleted after the changes, so exercise caution when performing thisoperation.

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Recycling Management page, click Modify Recycling Policy. In thedisplayed dialog box, set the retention period for the deleted DB instances from 1day to 7 days. Then, click OK.

Figure 3-3 Modifying the Recycling Policy

----End

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 37

Page 43: GaussDB(for Redis)

Rebuilding a DB instance

You can rebuild DB instances from the recycle bin within the retention period torestore data.

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Recycling Management page, locate the DB instance to be rebuilt and inthe Operation column, click Rebuild.

Figure 3-4 Rebuilding a DB instance

Step 3 On the displayed page, set required parameters and submit the rebuilding task.

----End

3.3 Instance Modifications

3.3.1 Changing a DB Instance Name

Scenarios

This section describes how to change a GaussDB(for Redis) instance name toidentify different DB instances.

Method 1

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click to the right of the instance whosename you wish to change.● To submit the change, click OK.

The new name can be the same as an existing instance name. It must startwith a letter and consist of 4 to 64 characters. Only letters (case-sensitive),digits, hyphens (-), and underscores (_) are allowed.

● To cancel the change, click Cancel.

Step 3 View the results on the Instance Management page.

----End

Method 2

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the instance whose name you wish tochange.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 38

Page 44: GaussDB(for Redis)

Step 3 In the Instance Information area on the Basic Information page, click in theDB Instance Name field to change the instance name.

● To submit the change, click .The new name can be the same as an existing instance name. It must startwith a letter and consist of 4 to 64 characters. Only letters (case-sensitive),digits, hyphens (-), and underscores (_) are allowed.

● To cancel the change, click .

Step 4 View the results on the Instance Management page.

----End

3.3.2 Resetting the Administrator Password

ScenariosFor security reasons, you are advised to periodically change administratorpasswords.

PrecautionsThis function is available only to whitelisted users. To apply for this function, clickService Tickets > Create Service Ticket in the upper right corner of themanagement console and submit the application.

If the instance status is Available, Backing up, or Scaling up, you can reset theadministrator password.

Method 1

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, locate the DB instance you wish to reset thepassword for and choose More > Reset Password in the Operation column.

Step 3 Enter and confirm the new administrator password and click OK.

The password must be 8 to 32 characters in length and contain uppercase letters,lowercase letters, digits, and any of the following special characters: ~!@#%^*-_=+?

Step 4 If you have enabled operation protection, click Start Verification in the displayeddialog box. On the displayed page, click Send Code, enter the verification code,and click Verify. The page is closed automatically.

----End

Method 2

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance you wish to reset thepassword for. The Basic Information page is displayed.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 39

Page 45: GaussDB(for Redis)

Step 3 In the DB Information area, click Reset Password in the Administrator field.

Step 4 Enter and confirm the new administrator password and click OK.

The password must be 8 to 32 characters in length and contain uppercase letters,lowercase letters, digits, and any of the following special characters: ~!@#%^*-_=+?

Step 5 If you have enabled operation protection, click Start Verification in the displayeddialog box. On the displayed page, click Send Code, enter the verification code,and click Verify. The page is closed automatically.

----End

3.3.3 Scaling Up Storage Space

Scenarios

This section describes how to scale up the storage space of a DB instance to suityour service requirements.

During the scale-up process, the DB instance will not restart, and your services willnot be interrupted.

Precautions

Storage space can only be scaled up. It cannot be scaled down.

Method 1

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance you wish to scale up.

Step 3 In the Persistent Storage area on the Basic Information page, click Scale.

Figure 3-5 Scaling up storage space

Step 4 On the displayed page, specify the new storage capacity and click Next.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 40

Page 46: GaussDB(for Redis)

Figure 3-6 Scaling up storage space

You must select at least 1 GB each time you scale up, and only an integer isallowed

Step 5 On the displayed page, confirm the storage space.● For yearly/monthly DB instances

– If you need to modify your settings, click Previous to go back to the pagewhere you specify details.

– If you do not need to modify your settings, click Submit to go to thepayment page and complete the payment.

● For pay-per-use DB instances– If you need to modify your settings, click Previous to go back to the page

where you specify details.– If you do not need to modify the specifications, click Submit to scale up

the storage space.

Step 6 Check the scaling-up result.● The status of the DB instance in the instance list is Scaling up.● After the scale up is completed, the DB instance status becomes Available.● In the Storage Space area on the Basic Information page, check whether the

scale up was successful.

----End

Method 2

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, locate the DB instance you wish to scale upand choose More > Scale Storage Space in the Operation column.

Figure 3-7 Scaling up storage space

Step 3 On the displayed page, specify the new storage capacity and click Next.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 41

Page 47: GaussDB(for Redis)

Figure 3-8 Scaling up storage space

You must select at least 1 GB each time you scale up, and only an integer isallowed

Step 4 On the displayed page, confirm the storage space.● For yearly/monthly DB instances

– If you need to modify your settings, click Previous to go back to the pagewhere you specify details.

– If you do not need to modify your settings, click Submit to go to thepayment page and complete the payment.

● For pay-per-use DB instances– If you need to modify your settings, click Previous to go back to the page

where you specify details.– If you do not need to modify the specifications, click Submit to scale up

the storage space.

Step 5 Check the scaling-up result.● The status of the DB instance in the instance list is Scaling up.● After the scale up is completed, the DB instance status becomes Available.● In the Storage Space area on the Basic Information page, check whether the

scale up was successful.

----End

3.3.4 Adding Nodes

Scenarios

This section describes how to add nodes to a DB instance to suit your servicerequirements. You can also delete a node as required. For details, see DeletingNodes.

Precautions● Adding nodes may lead to the decrease of OPS. You are advised to perform

this operation during off-peak hours.● You can only add nodes when the instance status is Available or Checking

restoration.● A DB instance cannot be deleted when one or more nodes are being added.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 42

Page 48: GaussDB(for Redis)

● If the storage is insufficient, adding nodes is not supported. Expand thestorage first. For details about the storage supported by instances of differentspecifications, see DB Instance Specifications.

Method 1

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance you wish to add nodesfor.

Step 3 In the Node Information area on the Basic Information page, click Add Node.

Figure 3-9 Adding nodes

Step 4 Specify Add Nodes and click Next.

Figure 3-10 Add Node

By default, the specifications of new nodes are the same as the DB instance andcannot be modified.

Step 5 On the displayed page, confirm the node configuration details.● For yearly/monthly DB instances

– If you need to modify your settings, click Previous to go back to the pagewhere you specify details.

– If you do not need to modify your settings, click Submit to go to thepayment page and complete the payment.

● For pay-per-use DB instances– If you need to modify your settings, click Previous to go back to the page

where you specify details.– If you do not need to modify your settings, click Submit to add the

nodes.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 43

Page 49: GaussDB(for Redis)

Step 6 View the result of adding nodes.● The status of the DB instance in the instance list is Adding node.● After the nodes are added, the DB instance status becomes Available.● Click the DB instance name. In the Node Information area on the Basic

Information page, view the information about the new nodes.

----End

Method 2

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, locate the DB instance for which you wish toadd nodes and choose More > Add Node in the Operation column.

Figure 3-11 Adding nodes

Step 3 Specify Add Nodes and click Next.

Figure 3-12 Add Node

By default, the specifications of new nodes are the same as the DB instance andcannot be modified.

Step 4 On the displayed page, confirm the node configuration details.● For yearly/monthly DB instances

– If you need to modify your settings, click Previous to go back to the pagewhere you specify details.

– If you do not need to modify your settings, click Submit to go to thepayment page and complete the payment.

● For pay-per-use DB instances

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 44

Page 50: GaussDB(for Redis)

– If you need to modify your settings, click Previous to go back to the pagewhere you specify details.

– If you do not need to modify your settings, click Submit to add thenodes.

Step 5 View the result of adding nodes.● The status of the DB instance in the instance list is Adding node.● After the nodes are added, the DB instance status becomes Available.● Click the DB instance name. In the Node Information area on the Basic

Information page, view the information about the new nodes.

----End

3.3.5 Deleting Nodes

ScenariosYou can delete nodes that are no longer used to release resources.

Precautions● Deleted nodes cannot be recovered. Exercise caution when performing this

operation.● Nodes cannot be deleted from yearly/monthly DB instances.● If you enable operation protection to improve the security of your account

and cloud products, two-factor authentication is required for sensitiveoperations. For details about how to enable operation protection, see theIdentity and Access Management User Guide.

ProcedureStep 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the target DB instance.

Step 3 In the Node Information area on the Basic Information page, locate the targetnode and click Delete.

Figure 3-13 Node information

Step 4 If you have enabled operation protection, click Start Verification in the DeleteNode dialog box. On the displayed page, click Send Code, enter the verificationcode, and click Verify. The page is closed automatically.

Step 5 In the displayed dialog box, click Yes.● The status of the DB instance in the instance list is Deleting node.● After the deletion, the DB instance status becomes Available.

----End

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 45

Page 51: GaussDB(for Redis)

3.3.6 Managing Tags

ScenariosTag Management Service (TMS) enables you to use tags on the managementconsole to manage resources. TMS works with other cloud services to managetags. TMS manages tags globally and other cloud services manage their own tags.

Adding tags to GaussDB(for Redis) resources helps you better identify andmanage them. A DB instance can be tagged during or after it is created.

After a DB instance is tagged, you can search for the tag key or value to quicklyquery the instance details.

Precautions● You are advised to set predefined tags on the TMS console.● A tag consists of a key and value. You can add only one value for each key.

For details about the naming rules of tag keys and tag values, see Table 3-1.● Each DB instance can have up to 10 tags.

Table 3-1 Naming rules

Parameter Requirement Example Value

Tag key ● The key cannot be left blank.● Each tag key must be unique for each

DB instance.● A tag key consists of up to 36

characters.● The key can only consist of digits,

letters, underscores (_), and hyphens(-).

Organization

Tag value ● This tag value can be left blank.● The value consists of up to 43

characters.● The value can only consist of digits,

letters, underscores (_), periods (.),and hyphens (-).

nosql_01

Adding a Tag

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance you wish to add tagsfor. The Basic Information page is displayed.

Step 3 In the navigation pane on the left, click Tags.

Step 4 On the Tags page, click Add Tag. In the displayed dialog box, enter a tag key andvalue, and click OK.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 46

Page 52: GaussDB(for Redis)

Step 5 View and manage tags on the Tags page.

----End

Editing a Tag

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance whose tag you wish toedit. The Basic Information page is displayed.

Step 3 In the navigation pane on the left, click Tags.

Step 4 On the Tags page, locate the tag to be edited and click Edit in the Operationcolumn. In the displayed dialog box, change the tag value and click OK.

Only the tag value can be edited when editing a tag.

Step 5 View and manage tags on the Tags page.

----End

Deleting a Tag

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance whose tags you wishto delete. The Basic Information page is displayed.

Step 3 In the navigation pane on the left, click Tags.

Step 4 On the Tags page, locate the tag to be deleted and click Delete in the Operationcolumn. In the displayed dialog box, click Yes.

Step 5 After a tag has been deleted, it will not be displayed on the Tags page.

----End

Searching an Instance by Tag

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click Search by Tag in the upper rightcorner of the instance list.

Figure 3-14 Search by Tag

Step 3 Enter the key or value of the tag to be queried and click Search to query theinstance associated with the tag.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 47

Page 53: GaussDB(for Redis)

Figure 3-15 Search by Tag

----End

3.4 Connection Management

3.4.1 Creating a Private Zone

Scenarios

GaussDB(for Redis) allows you to access the nodes of an instance through aprivate zone provided by Domain Name Service (DNS).

This section describes how to create a private zone and add an A record set.

Process

Figure 3-16 Flowchart

Procedure

Step 1 Log in to the management console.

Step 2 Click Service List. Under Network, click Domain Name Service.

Step 3 On the DNS console, choose Private Zones.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 48

Page 54: GaussDB(for Redis)

Figure 3-17 Private Zones

Step 4 Click Create Private Zone.

Figure 3-18 Creating a private zone

Step 5 Configure the private zone details.

NO TICE

● Ensure that the selected VPC is the same as the VPC where the DB instanceresides.

● For details about other parameters, see section Creating a Private Zone in theDomain Name Service User Guide.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 49

Page 55: GaussDB(for Redis)

Figure 3-19 Configuring private zone details

Step 6 Click OK. On the Private Zones page, view the created private zone in the zonelist.

If the status of the private zone is Normal, the zone has been successfully created.

Figure 3-20 Viewing the private zone status

Step 7 After a private zone is created, you can add a record set for it.

1. Click the name of the private zone you created. On the displayed page, clickAdd Record Set in the upper right corner.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 50

Page 56: GaussDB(for Redis)

Figure 3-21 Adding a record set

2. In the displayed Add Record Set dialog box, set parameters as prompted.

Table 3-2 Parameter description

Parameter Description

Name Prefix of the domain name to be resolvedFor example, if the zone name is example.com, thedomain name prefix can be as follows:– www: The domain name is www.example.com, which is

usually used for a website.– Left blank: The domain name is example.com.– abc: The domain name is abc.example.com, a

subdomain of example.com.– mail: The domain name is mail.example.com, which is

typically used for an email server.– *: The domain name is *.example.com, which is a

wildcard domain name, indicating all subdomains ofexample.com.

Type Type of the record set. Select the A record set.If a message is displayed indicating that the record set youare trying to create exists, the record set conflicts with anexisting record set.

Value Private IP address of each node in the DB instance. Youcan find the private IP address in the node list on theBasic Information page.You can enter a maximum of 50 record values, each on aseparate line.

Retain the default values for other parameters. For details about moreparameters, see Adding an A Record Set.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 51

Page 57: GaussDB(for Redis)

Figure 3-22 Add Record Set

3. Click OK.4. Switch back to the Record Sets page.

View the created record set in the record set list. If the status of the record setis Normal, the record set is added successfully.

----End

3.4.2 Configuring Security Group Rules

Scenarios

A security group is a collection of access control rules for ECSs and GaussDB(forRedis) instances that have the same security protection requirements and aremutually trusted in a VPC.

This section describes how to create a security group to enable specific IPaddresses and ports to access a GaussDB(for Redis) instance.

Check whether the ECS and GaussDB(for Redis) instance are in the same securitygroup.● If the ECS and GaussDB(for Redis) instance are in the same security group,

they can communicate with each other by default. No security group ruleneeds to be configured.

● If the ECS and GaussDB(for Redis) instance are in different security groups,configure security group rules for them, separately.– DB instance: Configure an inbound rule for the security group with which

the GaussDB(for Redis) instance is associated.– ECS: The default security group rule allows all outbound data packets. In

this scenario, you do not need to configure a security rule for the ECS. If

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 52

Page 58: GaussDB(for Redis)

not all outbound traffic is allowed in the security group, configure anoutbound rule for the ECS.

To access a GaussDB(for Redis) instance over a public network, add an inboundrule for the security group associated with the instance.

Precautions● If the ECS and DB instance are in the same security group, they can

communicate with each other by default. No security group rule needs to beconfigured.

● If the ECS and DB instance are in different security groups, configure securitygroup rules for the ECS and DB instance separately.– DB instance: Configure an inbound rule for the security group with which

the GaussDB(for Redis) instance is associated.– ECS: The default security group rule allows all outbound data packets. In

this scenario, you do not need to configure a security rule for the ECS. Ifnot all outbound traffic is allowed in the security group, configure anoutbound rule for the ECS.

● By default, you can create up to 500 security group rules. Too many securitygroup rules will increase the first packet latency, so a maximum of 50 rulesfor each security group is recommended.

ProcedureStep 1 Log in to the management console.

Step 2 Click in the upper left corner and select a region and a project.

Step 3 Click Service List. Under Network, click Virtual Private Cloud.

Step 4 In the navigation pane on the left, choose Access Control > Security Groups.

Step 5 On the Security Groups page, click the security group name.

Step 6 On the Inbound Rules tab, click Add Rule. In the displayed Add Inbound Ruledialog box, set required parameters to add inbound rules. On the Outbound Rulestab, click Add Rule. In the displayed Add Outbound Rule dialog box, set requiredparameters to add outbound rules.

Figure 3-23 Add Inbound Rule

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 53

Page 59: GaussDB(for Redis)

Figure 3-24 Add Outbound Rule

Step 7 In the displayed dialog box, set required parameters.

● For details about how to configure an inbound security group rule, see Table3-3.

Table 3-3 Inbound rule settings

Parameter

Description ValueExample

Protocol & Port

– The network protocol required for access. Thevalue can be All, TCP, UDP, ICMP, or GRE.

– Port: Specifies the port that allows access toECSs. The value ranges from 1 to 65535.

TCP

Type Specifies the IP address type. This parameter isavailable after the IPv6 function is enabled.– IPv4– IPv6

IPv4

Source Specifies the source of the security group rule. Thevalue can be a single IP address, an IP addressgroup, or a security group to allow access from theIP address or instances in the security group. Forexample:– Single IP address: xxx.xxx.xxx.xxx/32 (IPv4)– Subnet: xxx.xxx.xxx.0/24– All IP addresses: 0.0.0.0/0– sg-abc (security group)

0.0.0.0/0

Description

Provides supplementary information about thesecurity group rule. This parameter is optional.The description can contain a maximum of 255characters and cannot contain angle brackets (< or>).

-

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 54

Page 60: GaussDB(for Redis)

● For details about how to configure an outbound security group rule, seeTable 3-4.

Table 3-4 Outbound rule settings

Parameter

Description ValueExample

Protocol & Port

– The network protocol required for access. Thevalue can be All, TCP, UDP, ICMP, or GRE.

– Port: Specifies the port that allows access toECSs. The value ranges from 1 to 65535.

TCP

Type Specifies the IP address type. This parameter isavailable after the IPv6 function is enabled.– IPv4– IPv6

IPv4

Destination

Specifies the destination of the security group rule.The value can be a single IP address, an IP addressgroup, or a security group to allow access to the IPaddress or instances in the security group. Forexample:– Single IP address: xxx.xxx.xxx.xxx/32 (IPv4)– Subnet: xxx.xxx.xxx.0/24– All IP addresses: 0.0.0.0/0– sg-abc (security group)

0.0.0.0/0

Description

Provides supplementary information about thesecurity group rule. This parameter is optional.The description can contain a maximum of 255characters and cannot contain angle brackets (< or>).

-

Step 8 Click OK.

----End

3.4.3 Binding and Unbinding an EIP

Scenarios

After you create a GaussDB(for Redis) instance, you can bind an EIP to it to allowexternal access. If later you want to prohibit external access, you can also unbindthe EIP from the DB instance.

Precautions

To change the EIP that has been bound to a node, unbind it from the node first.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 55

Page 61: GaussDB(for Redis)

Binding an EIP

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance to which you wish tobind an EIP.

Step 3 In the Node Information area, locate the target node and click Bind EIP in theOperation column.

Figure 3-25 Binding an EIP

Step 4 In the displayed dialog box, all available unbound EIPs are listed. Select therequired EIP and click Yes. If no available EIPs are displayed, click View EIP andcreate an EIP on the VPC console.

Figure 3-26 Selecting an EIP

Step 5 In the EIP column, view the EIP that is successfully bound.

To unbind the EIP from the DB instance, see Unbinding an EIP.

----End

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 56

Page 62: GaussDB(for Redis)

Unbinding an EIP

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the instance from which you wish tounbind an EIP.

Step 3 On the Basic Information page, in the Node Information area, locate the targetnode and click Unbind EIP in the Operation column.

Figure 3-27 Unbinding an EIP

Step 4 In the displayed dialog box, click Yes to unbind the EIP.

To bind an EIP to the DB instance again, see Binding an EIP.

----End

3.4.4 Viewing the IP Address and Port NumberThis section describes how to query the IP address and port number of an instanceon the management console.

Procedure

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the target DB instance. The BasicInformation page is displayed.

Method 1

In the Node Information area on the Basic Information page, view the private IPaddress or bound EIP of each node in the instance.

Figure 3-28 Viewing the IP addresses

In the Network Information area, view the port of the DB instance. The defaultport is 8635.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 57

Page 63: GaussDB(for Redis)

Figure 3-29 Viewing the port number

Method 2

In the navigation pane on the left, click Connections to view the private IPaddresses, bound EIP, and port number of the GaussDB(for Redis) instance.

Figure 3-30 Viewing the IP addresses and port number

----End

3.5 Database Commands

3.5.1 Supported and Restricted CommandsAfter you connect to a GaussDB(for Redis) database, pay attention to thesupported and restricted commands.

For details about the commands supported and restricted by GaussDB(for Redis)5.0, see Table 3-5.

NO TE

● Keys of different data types can have the same name.

● For details about the restrictions on the use of keys and values in each command type,see Constraints.

Table 3-5 Commands supported and restricted by GaussDB(for Redis) 5.0

Type Command Supported Remarks

String append √ -

decr √ -

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 58

Page 64: GaussDB(for Redis)

Type Command Supported Remarks

decrby √ -

get √ -

getbit √ -

getrange √ -

getset √ -

incr √ -

incrby √ -

incrbyfloat √ -

mget √ O(n)

mset √ O(n)

msetnx √ O(n)

psetex √ -

set √ -

setbit √ -

setex √ -

setnx √ -

setrange √ -

strlen √ -

hash hdel √ -

hexists √ -

hget √ -

hgetall √ O(n)

hincrby √ -

hincrbyfloat √ -

hkeys √ O(n)

hlen √ -

hmget √ O(n)

hmset √ O(n)

hscan √ O(n)

hset √ -

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 59

Page 65: GaussDB(for Redis)

Type Command Supported Remarks

hsetnx √ -

hstrlen √ -

hvals √ O(n)

list blpop × This command containsblock semantics and isnot supported.

brpop × This command containsblock semantics and isnot supported.

brpoplpush × This command containsblock semantics and isnot supported.

lindex √ -

linsert √ O(n)

llen √ -

lpop √ -

lpush √ -

lpushx √ -

lrange √ -

lrem √ O(n)

lset √ -

ltrim √ O(n)

rpop √ -

rpoplpush √ -

rpush √ -

rpushx √ -

set sadd √ -

scard √ -

sdiff √ O(n)

sdiffstore √ O(n)

sinter √ O(m*n)

sinterstore √ O(m*n)

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 60

Page 66: GaussDB(for Redis)

Type Command Supported Remarks

sismember √ -

smembers √ O(n)

smove √ -

spop √ -

srandmember √ O(n)

srem √ -

sscan √ -

sunion √ O(n)

sunionstore √ O(n)

zset bzpopmax × This command containsblock semantics and isnot supported.

bzpopmin × This command containsblock semantics and isnot supported.

zadd √ -

zcard √ -

zcount √ -

zincrby √ -

zinterstore √ -

zlexcount √ -

zpopmax √ -

zpopmin √ -

zrange √ -

zrangebylex √ -

zrangebyscore √ -

zrank √ -

zrem √ -

zremrangebylex √ -

zremrangebyrank √ -

zremrangebyscore √ -

zrevrange √ -

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 61

Page 67: GaussDB(for Redis)

Type Command Supported Remarks

zrevrangebylex √ -

zrevrangebyscore √ -

zrevrank √ -

zscan √ -

zscore √ -

zunionstore √ -

Stream xack √ -

xadd √ -

xclaim √ -

xdel √ -

xgroup √ -

xinfo √ O(n)

xlen √ -

xpending √ -

xrange √ -

xread √ Partially compatibleThis command containsblock semantics andcannot use the internalshared connection.That means when theexecution of thecurrent command isnot complete, thecurrent connectioncannot respond toother commands.

xreadgroup √ Partially compatibleThis command containsblock semantics andcannot use the internalshared connection.That means when theexecution of thecurrent command isnot complete, thecurrent connectioncannot respond toother commands.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 62

Page 68: GaussDB(for Redis)

Type Command Supported Remarks

xrevrange √ -

xsetid x Not supported.

xtrim √ O(n)

hyperloglog

pfadd √ -

pfcount √ -

pfdebug √ -

pfmerge √ O(n)

pfselftest x Not supported.

geo geoadd √ -

geodist √ -

geohash √ -

geopos √ -

georadius √ O(N+logM)

georadius_ro x Not supported.

georadiusbymember √ O(N+logM)

georadiusbymember_ro

x Not supported.

bitop bitcount √ -

bitfield √ -

bitop √ -

bitpos √ -

pubsub psubscribe √ -

publish √ -

pubsub √ -

punsubscribe √ -

subscribe √ -

unsubscribe √ -

Keymanagement

debug x Not supported.

del √ -

dump x Not supported.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 63

Page 69: GaussDB(for Redis)

Type Command Supported Remarks

exists √ -

expire √ -

expireat √ -

migrate x Not supported.

move x This command is notinvolved because thereis no multi-DB design.

object x The internal storageprotocol is differentfrom the open-sourceprotocol and cannot beviewed.

persist √ -

pexpire √ -

pexpireat √ -

pttl √ -

randomkey √ -

rename x Not supported.

renamenx x Not supported.

restore x This command is notinvolved because thepersistent storageprinciples are different.

restore-asking x This command is notinvolved because thepersistent storageprinciples are different.

scan √ -

sort √ Partially compatibleThe store option is notsupported. After data issorted based on aspecified rule, the datacannot beautomatically stored toanother key insequence.

touch x Not supported.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 64

Page 70: GaussDB(for Redis)

Type Command Supported Remarks

ttl √ -

type √ Partially compatibleDifferent types canhave the same key.When you run the typecommand to obtain thetype that matches akey, the systemsearches for the typethat matches the key inthe following sequence:string, hash, list, zset,set, and stream.

unlink x This command containsblock semantics and isnot supported.

Databasemanagement

auth √ -

bgrewriteaof x This command is notinvolved because thepersistent storageprinciples are different.

bgsave x This command is notinvolved because thepersistent storageprinciples are different.

client x Not supported.

command x Not supported.

config √ Partially compatible.Users have only thepermission for the GETconfiguration item anddo not have the SETpermission.

dbsize √ Partially compatible.Due to differentpersistent storageprinciples, the queryresult is the estimatednumber of keys insteadof the accurate value inreal time.

echo √ -

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 65

Page 71: GaussDB(for Redis)

Type Command Supported Remarks

flushall √ This command willclear all instance data.Exercise caution whenrunning this command.

flushdb x This is an internalcommand and cannotbe executed by users.

info √ Partially compatible.There are moreinformation items thanthe open-source Redis.

keys x This is an internalcommand and cannotbe executed by users.

lastsave x This command is notinvolved because thepersistent storageprinciples are different.

latency x Not supported.

lolwut x Open-source RedisLOLWUT command

memory x This command is notavailable because thesystem status is notconcerned when youuse cloud services.

module x Not supported.

monitor x This is an internalcommand and cannotbe executed by users.

ping √ -

post x Not supported.

psync x There is no primary/standby relationship,and related commandsare not involved.

replconf x There is no primary/standby relationship,and related commandsare not involved.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 66

Page 72: GaussDB(for Redis)

Type Command Supported Remarks

replicaof x There is no primary/standby relationship,and related commandsare not involved.

role x There is no primary/standby relationship,and related commandsare not involved.

save x This command is notinvolved because thepersistent storageprinciples are different.

shutdown × Not supported

slaveof x There is no primary/standby relationship,and related commandsare not involved.

slowlog x Not supported.

sync x There is no primary/standby relationship,and related commandsare not involved.

time √ -

select √ Partially compatible.The systemarchitecture does notsupport multi-DB.Therefore, thiscommand is notexecuted.

swapdb x This command is notinvolved because thereis no multi-DB design.

Transaction

discard x Transaction-relatedoperations are notsupported.

exec x Transaction-relatedoperations are notsupported.

multi x Transaction-relatedoperations are notsupported.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 67

Page 73: GaussDB(for Redis)

Type Command Supported Remarks

unwatch x Transaction-relatedoperations are notsupported.

wait x Transaction-relatedoperations are notsupported.

watch x Transaction-relatedoperations are notsupported.

Script logs eval x Script-relatedoperations are notsupported.

evalsha x Script-relatedoperations are notsupported.

script x Script-relatedoperations are notsupported.

3.6 Backups and Restorations

3.6.1 OverviewGaussDB(for Redis) supports backups and restorations to ensure data reliability.

Data can be backed up automatically or manually.

Automated Backup

An automated backup is a full backup of a DB instance that is automaticallycreated by the system.

Automated backups are created during the backup time window of your DBinstances. The system saves automated backups based on the retention period youconfigure.

If necessary, you can restore a DB instance to any point in time during yourbackup retention period.

Manual Backup

A manual backup is a full backup of a DB instance and can be triggered at anytime to meet your service requirements. It is retained until you manually delete it.

After the manual backup is created, you can restore data from it as required.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 68

Page 74: GaussDB(for Redis)

Backup StorageBackups are stored in OBS buckets, which provides disaster recovery capabilitiesand save space.

After you purchase an instance, GaussDB(for Redis) will provide additional backupstorage of the same size as you purchased. For example, if you purchase aninstance of 100 GB, you will obtain additional backup storage of 100 GB free ofcharge. If the size of backup data does not exceed 100 GB, the backup data isstored on OBS free of charge. If the size of the backup data exceeds 100 GB, youwill be charged based on the OBS billing rules.

3.6.2 Managing Automated BackupsGaussDB(for Redis) creates automated backups to ensure data reliability. If adatabase or table is deleted, maliciously or accidentally, backups can help recoveryour data.

Configuring an Automated Backup PolicyAutomated backups are generated according to a backup policy and saved aspackages in OBS buckets to ensure data confidentiality and durability. You areadvised to regularly back up your database, in case it becomes faulty or damaged.Backing up data affects the database read and write performance so you areadvised to set the automated backup time window to off-peak hours.

When you create a DB instance, an automated backup policy is enabled bydefault.

Figure 3-31 Enabling the automated backup policy

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 69

Page 75: GaussDB(for Redis)

● Retention Period: Automated backup files are saved for seven days bydefault. The backup retention period can range from 1 to 35 days.

NO TE

● If the retention period is less than seven days, the system automatically backs updata every day.

● The system checks existing automated backup files and deletes the files thatexceed the backup retention period you set.

● Time Window: An hour within 24 hours, such as 01:00-02:00 or 12:00-13:00. Thebackup time is in GMT format. If the DST or standard time is switched, the backuptime segment changes with the time zone.

● Backup Cycle: By default, each day of the week is selected.– All: Each day of the week is selected. The system automatically backs up

data every day.– Select a cycle: You can select one or more days in a week. The system

automatically backs up data at the specified time.

NO TE

A full backup starts within one hour of the time you specify. The amount of timerequired for the backup depends on the amount of data to be backed up. The moredata has to be backed up, the longer it will take.

● After the DB instance is created, you can modify the automated backup policyas needed. You can change the time window after the DB instance is created.The system backs up data based on the automated backup policy you haveset.

● If the automated backup policy is disabled, any automated backups inprogress stop immediately.

Modifying an Automated Backup Policy

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance for which you wish tomodify the backup policy.

Step 3 On the Backups & Restorations page, click Modify Backup Policy. In thedisplayed dialog box, set the backup policy. Then, click OK to save theconfiguration.

For details about how to set a backup policy, see Configuring an AutomatedBackup Policy.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 70

Page 76: GaussDB(for Redis)

Figure 3-32 Modifying backup policies

Step 4 Check or manage the generated backups on the Backup Management page or onthe Backups & Restorations page.

----End

Disabling the Automated Backup Policy

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance for which you wish todisable the backup policy.

Step 3 On the Backups & Restorations page, click Modify Backup Policy.

Step 4 In the displayed dialog box, click to disable the backup policy and clickOK.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 71

Page 77: GaussDB(for Redis)

Figure 3-33 Disabling the automated backup policy

When disabling the automated backup policy, you can decide whether to deletethe automated backups by selecting Delete automated backups.● If you select it, all backup files within the retention period will be deleted. No

automated backups are displayed in the backup list until you enable theautomated backup policy again.

● If you do not select it, all backup files within the retention period will beretained, but you can still manually delete them later if needed. For details,see Deleting an Automated Backup.

If the automated backup policy is disabled, any automated backups in progressstop immediately.

----End

Deleting an Automated BackupIf the automated backup policy is disabled, you can delete stored automatedbackups to free up storage space.

If the automated backup policy is enabled, the system will delete automatedbackups as they expire. You cannot delete them manually.

NO TICE

The deletion operation is irreversible, so exercise caution when performing thisoperation.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 72

Page 78: GaussDB(for Redis)

● Method 1

a. Log in to the GaussDB NoSQL console.

b. On the Instance Management page, click the DB instance you wish todelete backups for.

c. On the Backups & Restorations page, locate the backup you wish todelete and click Delete.

d. In the Delete Backup dialog box, confirm the backup details and clickYes.

● Method 2

a. Log in to the GaussDB NoSQL console.

b. On the Backup Management page, locate the target backup and clickDelete.

c. In the Delete Backup dialog box, confirm the backup details and clickYes.

3.6.3 Managing Manual BackupsTo ensure data reliability, GaussDB(for Redis) allows you to manually back up DBinstances whose status is Available. If a database or table is deleted, maliciouslyor accidentally, backups can help recover your data.

NO TE

● By default, you can create up to 50 backups.

● Manual backups are full backups.

Creating a Manual Backup

Step 1 Log in to the GaussDB NoSQL console.

Step 2 Create a manual backup.

Method 1

On the Instance Management page, locate the DB instance you wish to back upand choose More > Create Backup in the Operation column.

Method 2

1. On the Instance Management page, click the DB instance you wish to backup.

2. On the Backups & Restorations page, click Create Backup.

Method 3

In the navigation pane on the left, choose Backup Management. On thedisplayed page, click Create Backup.

Step 3 In the displayed dialog box, enter the backup name and description, and click OK.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 73

Page 79: GaussDB(for Redis)

Figure 3-34 Creating a manual backup

Table 3-6 Parameter description

Parameter Description

DB InstanceName

The default value is the name of the DB instance to be backedup and cannot be modified.

Backup Name The backup name must be 4 to 64 characters in length andstart with a letter. Backup names are case-insensitive and canonly contain letters, digits, hyphens (-), and underscores (_).

Description The description contains a maximum of 256 characters andcannot include line breaks or the following special characters:>!<"&'=

Step 4 View the backup status after the task has been executed.● During the creation of a manual backup, you can query the backup status on

the Backup Management page or the Backups & Restorations page. Thebackup status is Backing up.

● If a manual backup was successfully created, the backup status is Completed.

----End

Deleting a Manual Backup

If you do not need the manual backup, you can delete it on the BackupManagement page or the Backups & Restorations page.

Deleted backups are not displayed in the backup list.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 74

Page 80: GaussDB(for Redis)

NO TICE

The deletion operation is irreversible, so exercise caution when performing thisoperation.

Method 1

1. Log in to the GaussDB NoSQL console.

2. On the Instance Management page, click the DB instance whose backup youwish to delete.

3. On the Backups & Restorations page, locate the backup you wish to deleteand click Delete.

4. In the Delete Backup dialog box, confirm the backup details and click Yes.

Method 2

1. Log in to the GaussDB NoSQL console.

2. On the Backup Management page, locate the target backup and clickDelete.

3. In the Delete Backup dialog box, confirm the backup details and click Yes.

3.6.4 Restoring Data to a New DB Instance

Scenarios

GaussDB(for Redis) helps you to restore the existing backup to a new DB instance.

Procedure

Step 1 Log in to the GaussDB NoSQL console.

Step 2 Restore a DB instance from the backup.

Method 1

1. On the Instance Management page, click the target DB instance.

2. On the Backups & Restorations page, locate the target backup and clickRestore.

Figure 3-35 Backups and restorations

Method 2

On the Backup Management page, locate the target backup and click Restore.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 75

Page 81: GaussDB(for Redis)

Figure 3-36 Backup management

Step 3 In the displayed dialog box, confirm the current instance details and restorationmethod and click OK.

Figure 3-37 Restoring data to a new DB instance

● The default API type and DB engine version are the same as those of theoriginal instance and cannot be changed.

● GaussDB NoSQL automatically calculates the minimum storage spacerequired for restoration based on the size of the selected backup file. Thestorage capacity depends on the instance specifications, and must be aninteger.

● You need to set a new administrator password.● To modify other parameters, see the description of buying DB instances of

other DB engines in the Getting Started.

Step 4 View the restoration results.

A new DB instance is created using the backup data. The status of the DB instancechanges from Creating to Available.

After the restoration, the system will perform a full backup.

The new DB instance is independent from the original one.

----End

3.7 Monitoring and Alarming

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 76

Page 82: GaussDB(for Redis)

3.7.1 GaussDB(for Redis) Monitoring Metrics

DescriptionThis section describes GaussDB(for Redis) metrics reported to Cloud Eye as well astheir namespaces and dimensions. You can use APIs provided by Cloud Eye toquery the metrics of the monitored object and alarms generated for GaussDB(forRedis).

NamespaceSYS.NoSQL

Monitoring Metrics

Table 3-7 Metrics

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

nosql001_cpu_usage

CPUUsage

CPU usage ofthemonitoredsystemUnit: Percent

0-100% Measured object:ECSMonitoredobject: GaussDBNoSQL instance

1 minute

nosql002_mem_usage

MemoryUsage

Memoryusage of themonitoredsystemUnit: Percent

0-100% Measured object:ECSMonitoredobject: GaussDBNoSQL instance

1 minute

nosql005_disk_usage

StorageSpaceUsage

Disk usageof themonitoredcontainerUnit: Percent

0-100% Measured object:ECSMonitoredobject: GaussDBNoSQL instance

1 minute

nosql006_disk_total_size

TotalDiskSize

Total diskcapacity ofthemonitoredcontainerUnit: GB

≥ 0 GB Monitoredobject:Monitoredobject: GaussDBNoSQL instance

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 77

Page 83: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

nosql007_disk_used_size

UsedStorageSpace

Used diskspace of themonitoredcontainerUnit: GB

≥ 0 GB Monitoredobject:Monitoredobject: GaussDBNoSQL instance

1 minute

redis017_proxy_accept

TotalClientsReceived byProxy

Total numberof clientsreceived bythe proxyUnit: count

≥ 0Counts

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis018_proxy_resqust_ps

RequestAcceptanceRate

Rate atwhich theproxyreceivesclientrequestsUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis019_proxy_response_ps

ProxyResponse Rate

Rate atwhich theproxy returnsrequests tothe clientUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis020_proxy_recv_client_bps

ProxyByteStreamAcceptanceRate

Rate atwhich theproxyreceives bytestreams fromthe clientUnit: byte/s

≥ 0Bytes/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis021_proxy_send_client_bps

ProxyByteStreamSendRate

Rate atwhich theproxy sendsbyte streamsto the clientUnit: byte/s

≥ 0Bytes/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 78

Page 84: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis032_shard_qps

ShardQPS

QPS of theshardUnit: count

≥ 0Counts

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis036_exists_avg_usec

AverageProxyLatencyof existsCommand

Averagelatency whenthe proxyexecutes theexistscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis037_exists_max_usec

Maximum ProxyLatencyof existsCommand

Maximumlatency whenthe proxyexecutes theexistscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis038_exists_p99

ProxyP99Latencyof existsCommand

P99 latencywhen theproxyexecutes theexistscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis039_exists_qps

ProxyexistsCommand Rate

Rate atwhich theproxyexecutes theexistscommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis040_expire_avg_usec

AverageProxyLatencyofexpireCommand

Averagelatency whenthe proxyexecutes theexpirecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 79

Page 85: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis041_expire_max_usec

Maximum ProxyLatencyofexpireCommand

Maximumlatency whenthe proxyexecutes theexpirecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis042_expire_p99

ProxyP99LatencyofexpireCommand

P99 latencywhen theproxyexecutes theexpirecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis043_expire_qps

ProxyexpireCommand Rate

Rate atwhich theproxyexecutes theexpirecommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis044_del_avg_usec

AverageProxyLatencyof delCommand

Averagelatency whenthe proxyexecutes thedelcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis045_del_max_usec

Maximum ProxyLatencyof delCommand

Maximumlatency whenthe proxyexecutes thedelcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis046_del_p99

ProxyP99Latencyof delCommand

P99 latencywhen theproxyexecutes thedelcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 80

Page 86: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis047_del_qps

ProxydelCommand Rate

Rate atwhich theproxyexecutes thedelcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis048_ttl_avg_usec

AverageProxyLatencyof ttlCommand

Averagelatency whenthe proxyexecutes thettl command(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis049_ttl_max_usec

Maximum ProxyLatencyof ttlCommand

Maximumlatency whenthe proxyexecutes thettl command(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis050_ttl_p99

ProxyP99Latencyof ttlCommand

P99 latencywhen theproxyexecutes thettl command(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis051_ttl_qps

Proxy ttlCommand Rate

Rate atwhich theproxyexecutes thettl commandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis052_persist_avg_usec

AverageProxyLatencyofpersistCommand

Averagelatency whenthe proxyexecutes thepersistcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 81

Page 87: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis053_persist_max_usec

Maximum ProxyLatencyofpersistCommand

Maximumlatency whenthe proxyexecutes thepersistcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis054_persist_p99

ProxyP99LatencyofpersistCommand

P99 latencywhen theproxyexecutes thepersistcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis055_persist_qps

ProxypersistCommand Rate

Rate atwhich theproxyexecutes thepersistcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis056_scan_avg_usec

AverageProxyLatencyof scanCommand

Averagelatency whenthe proxyexecutes thescancommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis057_scan_max_usec

Maximum ProxyLatencyof scanCommand

Maximumlatency whenthe proxyexecutes thescancommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis058_scan_p99

ProxyP99Latencyof scanCommand

P99 latencywhen theproxyexecutes thescancommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 82

Page 88: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis059_scan_qps

ProxyscanCommand Rate

Rate atwhich theproxyexecutes thescancommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis060_set_avg_usec

AverageProxyLatencyof setCommand

Averagelatency whenthe proxyexecutes thesetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis061_set_max_usec

Maximum ProxyLatencyof setCommand

Maximumlatency whenthe proxyexecutes thesetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis062_set_p99

ProxyP99Latencyof setCommand

P99 latencywhen theproxyexecutes thesetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis063_set_qps

ProxysetCommand Rate

Rate atwhich theproxyexecutes thesetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis064_get_avg_usec

AverageProxyLatencyof getCommand

Averagelatency whenthe proxyexecutes thegetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 83

Page 89: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis065_get_max_usec

Maximum ProxyLatencyof getCommand

Maximumlatency whenthe proxyexecutes thegetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis066_get_p99

ProxyP99Latencyof getCommand

P99 latencywhen theproxyexecutes thegetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis067_get_qps

ProxygetCommand Rate

Rate atwhich theproxyexecutes thegetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis068_getset_avg_usec

AverageProxyLatencyofgetsetCommand

Averagelatency whenthe proxyexecutes thegetsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis069_getset_max_usec

Maximum ProxyLatencyofgetsetCommand

Maximumlatency whenthe proxyexecutes thegetsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis070_getset_p99

ProxyP99LatencyofgetsetCommand

P99 latencywhen theproxyexecutes thegetsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 84

Page 90: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis071_getset_qps

ProxygetsetCommand Rate

Rate atwhich theproxyexecutes thegetsetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis072_append_avg_usec

AverageProxyLatencyofappendCommand

Averagelatency whenthe proxyexecutes theappendcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis073_append_max_usec

Maximum ProxyLatencyofappendCommand

Maximumlatency whenthe proxyexecutes theappendcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis074_append_p99

ProxyP99LatencyofappendCommand

P99 latencywhen theproxyexecutes theappendcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis075_append_qps

ProxyappendCommand Rate

Rate atwhich theproxyexecutes theappendcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis076_mget_avg_usec

AverageProxyLatencyof mgetCommand

Averagelatency whenthe proxyexecutes themgetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 85

Page 91: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis077_mget_max_usec

Maximum ProxyLatencyof mgetCommand

Maximumlatency whenthe proxyexecutes themgetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis078_mget_p99

ProxyP99Latencyof mgetCommand

P99 latencywhen theproxyexecutes themgetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis079_mget_qps

ProxymgetCommand Rate

Rate atwhich theproxyexecutes themgetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis080_mset_avg_usec

AverageProxyLatencyof msetCommand

Averagelatency whenthe proxyexecutes themsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis081_mset_max_usec

Maximum ProxyLatencyof msetCommand

Maximumlatency whenthe proxyexecutes themsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis082_mset_p99

ProxyP99Latencyof msetCommand

P99 latencywhen theproxyexecutes themsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 86

Page 92: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis083_mset_qps

ProxymsetCommand Rate

Rate atwhich theproxyexecutes themsetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis084_getrange_avg_usec

AverageProxyLatencyofgetrangeCommand

Averagelatency whenthe proxyexecutes thegetrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis085_getrange_max_usec

Maximum ProxyLatencyofgetrangeCommand

Maximumlatency whenthe proxyexecutes thegetrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis086_getrange_p99

ProxyP99LatencyofgetrangeCommand

P99 latencywhen theproxyexecutes thegetrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis087_getrange_qps

ProxygetrangeCommand Rate

Rate atwhich theproxyexecutes thegetrangecommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 87

Page 93: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis088_setrange_avg_usec

AverageProxyLatencyofsetrangeCommand

Averagelatency whenthe proxyexecutes thesetrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis089_setrange_max_usec

Maximum ProxyLatencyofsetrangeCommand

Maximumlatency whenthe proxyexecutes thesetrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis090_setrange_p99

ProxyP99LatencyofsetrangeCommand

P99 latencywhen theproxyexecutes thesetrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis091_setrange_qps

ProxysetrangeCommand Rate

Rate atwhich theproxyexecutes thesetrangecommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis092_substr_avg_usec

AverageProxyLatencyofsubstrCommand

Averagelatency whenthe proxyexecutes thesubstrcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 88

Page 94: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis093_substr_max_usec

Maximum ProxyLatencyofsubstrCommand

Maximumlatency whenthe proxyexecutes thesubstrcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis094_substr_p99

ProxyP99LatencyofsubstrCommand

P99 latencywhen theproxyexecutes thesubstrcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis095_substr_qps

ProxysubstrCommand Rate

Rate atwhich theproxyexecutes thesubstrcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis096_strlen_avg_usec

AverageProxyLatencyof strlenCommand

Averagelatency whenthe proxyexecutes thestrlencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis097_strlen_max_usec

Maximum ProxyLatencyof strlenCommand

Maximumlatency whenthe proxyexecutes thestrlencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis098_strlen_p99

ProxyP99Latencyof strlenCommand

P99 latencywhen theproxyexecutes thestrlencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 89

Page 95: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis099_strlen_qps

ProxystrlenCommand Rate

Rate atwhich theproxyexecutes thestrlencommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis100_incr_avg_usec

AverageProxyLatencyof incrCommand

Averagelatency whenthe proxyexecutes theincrcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis101_incr_max_usec

Maximum ProxyLatencyof incrCommand

Maximumlatency whenthe proxyexecutes theincrcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis102_incr_p99

ProxyP99Latencyof incrCommand

P99 latencywhen theproxyexecutes theincrcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis103_incr_qps

ProxyincrCommand Rate

Rate atwhich theproxyexecutes theincrcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis104_decr_avg_usec

AverageProxyLatencyof decrCommand

Averagelatency whenthe proxyexecutes thedecrcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 90

Page 96: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis105_decr_max_usec

Maximum ProxyLatencyof decrCommand

Maximumlatency whenthe proxyexecutes thedecrcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis106_decr_p99

ProxyP99Latencyof decrCommand

P99 latencywhen theproxyexecutes thedecrcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis107_decr_qps

ProxydecrCommand Rate

Rate atwhich theproxyexecutes thedecrcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis108_hset_avg_usec

AverageProxyLatencyof hsetCommand

Averagelatency whenthe proxyexecutes thehsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis109_hset_max_usec

Maximum ProxyLatencyof hsetCommand

Maximumlatency whenthe proxyexecutes thehsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis110_hset_p99

ProxyP99Latencyof hsetCommand

P99 latencywhen theproxyexecutes thehsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 91

Page 97: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis111_hset_qps

ProxyhsetCommand Rate

Rate atwhich theproxyexecutes thehsetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis112_hget_avg_usec

AverageProxyLatencyof hgetCommand

Averagelatency whenthe proxyexecutes thehgetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis113_hget_max_usec

Maximum ProxyLatencyof hgetCommand

Maximumlatency whenthe proxyexecutes thehgetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis114_hget_p99

ProxyP99Latencyof hgetCommand

P99 latencywhen theproxyexecutes thehgetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis115_hget_qps

ProxyhgetCommand Rate

Rate atwhich theproxyexecutes thehgetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis116_hmset_avg_usec

AverageProxyLatencyofhmsetCommand

Averagelatency whenthe proxyexecutes thehmsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 92

Page 98: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis117_hmset_max_usec

Maximum ProxyLatencyofhmsetCommand

Maximumlatency whenthe proxyexecutes thehmsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis118_hmset_p99

ProxyP99LatencyofhmsetCommand

P99 latencywhen theproxyexecutes thehmsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis119_hmset_qps

ProxyhmsetCommand Rate

Rate atwhich theproxyexecutes thehmsetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis120_hmget_avg_usec

AverageProxyLatencyofhmgetCommand

Averagelatency whenthe proxyexecutes thehmgetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis121_hmget_max_usec

Maximum ProxyLatencyofhmgetCommand

Maximumlatency whenthe proxyexecutes thehmgetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis122_hmget_p99

ProxyP99LatencyofhmgetCommand

P99 latencywhen theproxyexecutes thehmgetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 93

Page 99: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis123_hmget_qps

ProxyhmgetCommand Rate

Rate atwhich theproxyexecutes thehmgetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis124_hdel_avg_usec

AverageProxyLatencyof hdelCommand

Averagelatency whenthe proxyexecutes thehdelcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis125_hdel_max_usec

Maximum ProxyLatencyof hdelCommand

Maximumlatency whenthe proxyexecutes thehdelcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis126_hdel_p99

ProxyP99Latencyof hdelCommand

P99 latencywhen theproxyexecutes thehdelcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis127_hdel_qps

ProxyhdelCommand Rate

Rate atwhich theproxyexecutes thehdelcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis128_hgetall_avg_usec

AverageProxyLatencyofhgetallCommand

Averagelatency whenthe proxyexecutes thehgetallcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 94

Page 100: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis129_hgetall_max_usec

Maximum ProxyLatencyofhgetallCommand

Maximumlatency whenthe proxyexecutes thehgetallcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis130_hgetall_p99

ProxyP99LatencyofhgetallCommand

P99 latencywhen theproxyexecutes thehgetallcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis131_hgetall_qps

ProxyhgetallCommand Rate

Rate atwhich theproxyexecutes thehgetallcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis132_hexists_avg_usec

AverageProxyLatencyofhexistsCommand

Averagelatency whenthe proxyexecutes thehexistscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis133_hexists_max_usec

Maximum ProxyLatencyofhexistsCommand

Maximumlatency whenthe proxyexecutes thehexistscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis134_hexists_p99

ProxyP99LatencyofhexistsCommand

P99 latencywhen theproxyexecutes thehexistscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 95

Page 101: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis135_hexists_qps

ProxyhexistsCommand Rate

Rate atwhich theproxyexecutes thehexistscommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis136_hincrby_avg_usec

AverageProxyLatencyofhincrbyCommand

Averagelatency whenthe proxyexecutes thehincrbycommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis137_hincrby_max_usec

Maximum ProxyLatencyofhincrbyCommand

Maximumlatency whenthe proxyexecutes thehincrbycommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis138_hincrby_p99

ProxyP99LatencyofhincrbyCommand

P99 latencywhen theproxyexecutes thehincrbycommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis139_hincrby_qps

ProxyhincrbyCommand Rate

Rate atwhich theproxyexecutes thehincrbycommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis140_hkeys_avg_usec

AverageProxyLatencyof hkeysCommand

Averagelatency whenthe proxyexecutes thehkeyscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 96

Page 102: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis141_hkeys_max_usec

Maximum ProxyLatencyof hkeysCommand

Maximumlatency whenthe proxyexecutes thehkeyscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis142_hkeys_p99

ProxyP99Latencyof hkeysCommand

P99 latencywhen theproxyexecutes thehkeyscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis143_hkeys_qps

ProxyhkeysCommand Rate

Rate atwhich theproxyexecutes thehkeyscommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis144_hlen_avg_usec

AverageProxyLatencyof hlenCommand

Averagelatency whenthe proxyexecutes thehlencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis145_hlen_max_usec

Maximum ProxyLatencyof hlenCommand

Maximumlatency whenthe proxyexecutes thehlencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis146_hlen_p99

ProxyP99Latencyof hlenCommand

P99 latencywhen theproxyexecutes thehlencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 97

Page 103: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis147_hlen_qps

ProxyhlenCommand Rate

Rate atwhich theproxyexecutes thehlencommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis148_hstrlen_avg_usec

AverageProxyLatencyofhstrlenCommand

Averagelatency whenthe proxyexecutes thehstrlencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis149_hstrlen_max_usec

Maximum ProxyLatencyofhstrlenCommand

Maximumlatency whenthe proxyexecutes thehstrlencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis150_hstrlen_p99

ProxyP99LatencyofhstrlenCommand

P99 latencywhen theproxyexecutes thehstrlencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis151_hstrlen_qps

ProxyhstrlenCommand Rate

Rate atwhich theproxyexecutes thehstrlencommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis152_hvals_avg_usec

AverageProxyLatencyof hvalsCommand

Averagelatency whenthe proxyexecutes thehvalscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 98

Page 104: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis153_hvals_max_usec

Maximum ProxyLatencyof hvalsCommand

Maximumlatency whenthe proxyexecutes thehvalscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis154_hvals_p99

ProxyP99Latencyof hvalsCommand

P99 latencywhen theproxyexecutes thehvalscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis155_hvals_qps

ProxyhvalsCommand Rate

Rate atwhich theproxyexecutes thehvalscommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis156_hscan_avg_usec

AverageProxyLatencyof hscanCommand

Averagelatency whenthe proxyexecutes thehscancommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis157_hscan_max_usec

Maximum ProxyLatencyof hscanCommand

Maximumlatency whenthe proxyexecutes thehscancommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis158_hscan_p99

ProxyP99Latencyof hscanCommand

P99 latencywhen theproxyexecutes thehscancommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 99

Page 105: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis159_hscan_qps

ProxyhscanCommand Rate

Rate atwhich theproxyexecutes thehscancommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis160_lpush_avg_usec

AverageProxyLatencyof lpushCommand

Averagelatency whenthe proxyexecutes thelpushcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis161_lpush_max_usec

Maximum ProxyLatencyof lpushCommand

Maximumlatency whenthe proxyexecutes thelpushcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis162_lpush_p99

ProxyP99Latencyof lpushCommand

P99 latencywhen theproxyexecutes thelpushcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis163_lpush_qps

ProxylpushCommand Rate

Rate atwhich theproxyexecutes thelpushcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis164_lpop_avg_usec

AverageProxyLatencyof lpopCommand

Averagelatency whenthe proxyexecutes thelpopcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 100

Page 106: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis165_lpop_max_usec

Maximum ProxyLatencyof lpopCommand

Maximumlatency whenthe proxyexecutes thelpopcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis166_lpop_p99

ProxyP99Latencyof lpopCommand

P99 latencywhen theproxyexecutes thelpopcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis167_lpop_qps

ProxylpopCommand Rate

Rate atwhich theproxyexecutes thelpopcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis168_rpush_avg_usec

AverageProxyLatencyof rpushCommand

Averagelatency whenthe proxyexecutes therpushcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis169_rpush_max_usec

Maximum ProxyLatencyof rpushCommand

Maximumlatency whenthe proxyexecutes therpushcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis170_rpush_p99

ProxyP99Latencyof rpushCommand

P99 latencywhen theproxyexecutes therpushcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 101

Page 107: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis171_rpush_qps

ProxyrpushCommand Rate

Rate atwhich theproxyexecutes therpushcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis172_rpop_avg_usec

AverageProxyLatencyof rpopCommand

Averagelatency whenthe proxyexecutes therpopcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis173_rpop_max_usec

Maximum ProxyLatencyof rpopCommand

Maximumlatency whenthe proxyexecutes therpopcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis174_rpop_p99

ProxyP99Latencyof rpopCommand

P99 latencywhen theproxyexecutes therpopcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis175_rpop_qps

ProxyrpopCommand Rate

Rate atwhich theproxyexecutes therpopcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 102

Page 108: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis176_rpoplpush_avg_usec

AverageProxyLatencyofrpoplpushCommand

Averagelatency whenthe proxyexecutes therpoplpushcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis177_rpoplpush_max_usec

Maximum ProxyLatencyofrpoplpushCommand

Maximumlatency whenthe proxyexecutes therpoplpushcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis178_rpoplpush_p99

ProxyP99LatencyofrpoplpushCommand

P99 latencywhen theproxyexecutes therpoplpushcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis179_rpoplpush_qps

ProxyrpoplpushCommand Rate

Rate atwhich theproxyexecutes therpoplpushcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis180_llen_avg_usec

AverageProxyLatencyof llenCommand

Averagelatency whenthe proxyexecutes thellencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 103

Page 109: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis181_llen_max_usec

Maximum ProxyLatencyof llenCommand

Maximumlatency whenthe proxyexecutes thellencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis182_llen_p99

ProxyP99Latencyof llenCommand

P99 latencywhen theproxyexecutes thellencommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis183_llen_qps

ProxyllenCommand Rate

Rate atwhich theproxyexecutes thellencommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis184_lindex_avg_usec

AverageProxyLatencyoflindexCommand

Averagelatency whenthe proxyexecutes thelindexcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis185_lindex_max_usec

Maximum ProxyLatencyoflindexCommand

Maximumlatency whenthe proxyexecutes thelindexcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis186_lindex_p99

ProxyP99LatencyoflindexCommand

P99 latencywhen theproxyexecutes thelindexcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 104

Page 110: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis187_lindex_qps

ProxylindexCommand Rate

Rate atwhich theproxyexecutes thelindexcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis188_linsert_avg_usec

AverageProxyLatencyoflinsertCommand

Averagelatency whenthe proxyexecutes thelinsertcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis189_linsert_max_usec

Maximum ProxyLatencyoflinsertCommand

Maximumlatency whenthe proxyexecutes thelinsertcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis190_linsert_p99

ProxyP99LatencyoflinsertCommand

P99 latencywhen theproxyexecutes thelinsertcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis191_linsert_qps

ProxylinsertCommand Rate

Rate atwhich theproxyexecutes thelinsertcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis192_lrange_avg_usec

AverageProxyLatencyoflrangeCommand

Averagelatency whenthe proxyexecutes thelrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 105

Page 111: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis193_lrange_max_usec

Maximum ProxyLatencyoflrangeCommand

Maximumlatency whenthe proxyexecutes thelrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis194_lrange_p99

ProxyP99LatencyoflrangeCommand

P99 latencywhen theproxyexecutes thelrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis195_lrange_qps

ProxylrangeCommand Rate

Rate atwhich theproxyexecutes thelrangecommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis196_lrem_avg_usec

AverageProxyLatencyof lremCommand

Averagelatency whenthe proxyexecutes thelremcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis197_lrem_max_usec

Maximum ProxyLatencyof lremCommand

Maximumlatency whenthe proxyexecutes thelremcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis198_lrem_p99

ProxyP99Latencyof lremCommand

P99 latencywhen theproxyexecutes thelremcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 106

Page 112: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis199_lrem_qps

ProxylremCommand Rate

Rate atwhich theproxyexecutes thelremcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis200_lset_avg_usec

AverageProxyLatencyof lsetCommand

Averagelatency whenthe proxyexecutes thelsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis201_lset_max_usec

Maximum ProxyLatencyof lsetCommand

Maximumlatency whenthe proxyexecutes thelsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis202_lset_p99

ProxyP99Latencyof lsetCommand

P99 latencywhen theproxyexecutes thelsetcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis203_lset_qps

ProxylsetCommand Rate

Rate atwhich theproxyexecutes thelsetcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis204_ltrim_avg_usec

AverageProxyLatencyof ltrimCommand

Averagelatency whenthe proxyexecutes theltrimcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 107

Page 113: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis205_ltrim_max_usec

Maximum ProxyLatencyof ltrimCommand

Maximumlatency whenthe proxyexecutes theltrimcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis206_ltrim_p99

ProxyP99Latencyof ltrimCommand

P99 latencywhen theproxyexecutes theltrimcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis207_ltrim_qps

ProxyltrimCommand Rate

Rate atwhich theproxyexecutes theltrimcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis208_sadd_avg_usec

AverageProxyLatencyof saddCommand

Averagelatency whenthe proxyexecutes thesaddcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis209_sadd_max_usec

Maximum ProxyLatencyof saddCommand

Maximumlatency whenthe proxyexecutes thesaddcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis210_sadd_p99

ProxyP99Latencyof saddCommand

P99 latencywhen theproxyexecutes thesaddcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 108

Page 114: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis211_sadd_qps

ProxysaddCommand Rate

Rate atwhich theproxyexecutes thesaddcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis212_spop_avg_usec

AverageProxyLatencyof spopCommand

Averagelatency whenthe proxyexecutes thespopcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis213_spop_max_usec

Maximum ProxyLatencyof spopCommand

Maximumlatency whenthe proxyexecutes thespopcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis214_spop_p99

ProxyP99Latencyof spopCommand

P99 latencywhen theproxyexecutes thespopcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis215_spop_qps

ProxyspopCommand Rate

Rate atwhich theproxyexecutes thespopcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis216_scard_avg_usec

AverageProxyLatencyof scardCommand

Averagelatency whenthe proxyexecutes thescardcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 109

Page 115: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis217_scard_max_usec

Maximum ProxyLatencyof scardCommand

Maximumlatency whenthe proxyexecutes thescardcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis218_scard_p99

ProxyP99Latencyof scardCommand

P99 latencywhen theproxyexecutes thescardcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis219_scard_qps

ProxyscardCommand Rate

Rate atwhich theproxyexecutes thescardcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis220_smembers_avg_usec

AverageProxyLatencyofsmembersCommand

Averagelatency whenthe proxyexecutes thesmemberscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis221_smembers_max_usec

Maximum ProxyLatencyofsmembersCommand

Maximumlatency whenthe proxyexecutes thesmemberscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 110

Page 116: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis222_smembers_p99

ProxyP99LatencyofsmembersCommand

P99 latencywhen theproxyexecutes thesmemberscommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis223_smembers_qps

ProxysmembersCommand Rate

Rate atwhich theproxyexecutes thesmemberscommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis224_srem_avg_usec

AverageProxyLatencyof sremCommand

Averagelatency whenthe proxyexecutes thesremcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis225_srem_max_usec

Maximum ProxyLatencyof sremCommand

Maximumlatency whenthe proxyexecutes thesremcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis226_srem_p99

ProxyP99Latencyof sremCommand

P99 latencywhen theproxyexecutes thesremcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 111

Page 117: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis227_srem_qps

ProxysremCommand Rate

Rate atwhich theproxyexecutes thesremcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis228_sunion_avg_usec

AverageProxyLatencyofsunionCommand

Averagelatency whenthe proxyexecutes thesunioncommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis229_sunion_max_usec

Maximum ProxyLatencyofsunionCommand

Maximumlatency whenthe proxyexecutes thesunioncommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis230_sunion_p99

ProxyP99LatencyofsunionCommand

P99 latencywhen theproxyexecutes thesunioncommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis231_sunion_qps

ProxysunionCommand Rate

Rate atwhich theproxyexecutes thesunioncommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis232_sinter_avg_usec

AverageProxyLatencyof sinterCommand

Averagelatency whenthe proxyexecutes thesintercommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 112

Page 118: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis233_sinter_max_usec

Maximum ProxyLatencyof sinterCommand

Maximumlatency whenthe proxyexecutes thesintercommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis234_sinter_p99

ProxyP99Latencyof sinterCommand

P99 latencywhen theproxyexecutes thesintercommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis235_sinter_qps

ProxysinterCommand Rate

Rate atwhich theproxyexecutes thesintercommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis236_sismember_avg_usec

AverageProxyLatencyofsismemberCommand

Averagelatency whenthe proxyexecutes thesismembercommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis237_sismember_max_usec

Maximum ProxyLatencyofsismemberCommand

Maximumlatency whenthe proxyexecutes thesismembercommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 113

Page 119: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis238_sismember_p99

ProxyP99LatencyofsismemberCommand

P99 latencywhen theproxyexecutes thesismembercommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis239_sismember_qps

ProxysismemberCommand Rate

Rate atwhich theproxyexecutes thesismembercommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis240_sdiff_avg_usec

AverageProxyLatencyof sdiffCommand

Averagelatency whenthe proxyexecutes thesdiffcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis241_sdiff_max_usec

Maximum ProxyLatencyof sdiffCommand

Maximumlatency whenthe proxyexecutes thesdiffcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis242_sdiff_p99

ProxyP99Latencyof sdiffCommand

P99 latencywhen theproxyexecutes thesdiffcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 114

Page 120: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis243_sdiff_qps

ProxysdiffCommand Rate

Rate atwhich theproxyexecutes thesdiffcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis244_srandmember_avg_usec

AverageProxyLatencyofsrandmemberCommand

Averagelatency whenthe proxyexecutes thesrandmember command(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis245_srandmember_max_usec

Maximum ProxyLatencyofsrandmemberCommand

Maximumlatency whenthe proxyexecutes thesrandmember command(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis246_srandmember_p99

ProxyP99LatencyofsrandmemberCommand

P99 latencywhen theproxyexecutes thesrandmember command(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis247_srandmember_qps

ProxysrandmemberCommand Rate

Rate atwhich theproxyexecutes thesrandmember commandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 115

Page 121: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis248_zadd_avg_usec

AverageProxyLatencyof zaddCommand

Averagelatency whenthe proxyexecutes thezaddcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis249_zadd_max_usec

Maximum ProxyLatencyof zaddCommand

Maximumlatency whenthe proxyexecutes thezaddcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis250_zadd_p99

ProxyP99Latencyof zaddCommand

P99 latencywhen theproxyexecutes thezaddcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis251_zadd_qps

ProxyzaddCommand Rate

Rate atwhich theproxyexecutes thezaddcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis252_zcard_avg_usec

AverageProxyLatencyof zcardCommand

Averagelatency whenthe proxyexecutes thezcardcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis253_zcard_max_usec

Maximum ProxyLatencyof zcardCommand

Maximumlatency whenthe proxyexecutes thezcardcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 116

Page 122: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis254_zcard_p99

ProxyP99Latencyof zcardCommand

P99 latencywhen theproxyexecutes thezcardcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis255_zcard_qps

ProxyzcardCommand Rate

Rate atwhich theproxyexecutes thezcardcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis256_zscan_avg_usec

AverageProxyLatencyof zscanCommand

Averagelatency whenthe proxyexecutes thezscancommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis257_zscan_max_usec

Maximum ProxyLatencyof zscanCommand

Maximumlatency whenthe proxyexecutes thezscancommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis258_zscan_p99

ProxyP99Latencyof zscanCommand

P99 latencywhen theproxyexecutes thezscancommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis259_zscan_qps

ProxyzscanCommand Rate

Rate atwhich theproxyexecutes thezscancommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 117

Page 123: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis260_zincrby_avg_usec

AverageProxyLatencyofzincrbyCommand

Averagelatency whenthe proxyexecutes thezincrbycommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis261_zincrby_max_usec

Maximum ProxyLatencyofzincrbyCommand

Maximumlatency whenthe proxyexecutes thezincrbycommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis262_zincrby_p99

ProxyP99LatencyofzincrbyCommand

P99 latencywhen theproxyexecutes thezincrbycommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis263_zincrby_qps

ProxyzincrbyCommand Rate

Rate atwhich theproxyexecutes thezincrbycommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis264_zrevrange_avg_usec

AverageProxyLatencyofzrevrangeCommand

Averagelatency whenthe proxyexecutes thezrevrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 118

Page 124: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis265_zrevrange_max_usec

Maximum ProxyLatencyofzrevrangeCommand

Maximumlatency whenthe proxyexecutes thezrevrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis266_zrevrange_p99

ProxyP99LatencyofzrevrangeCommand

P99 latencywhen theproxyexecutes thezrevrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis267_zrevrange_qps

ProxyzrevrangeCommand Rate

Rate atwhich theproxyexecutes thezrevrangecommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis268_zrange_avg_usec

AverageProxyLatencyofzrangeCommand

Averagelatency whenthe proxyexecutes thezrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis269_zrange_max_usec

Maximum ProxyLatencyofzrangeCommand

Maximumlatency whenthe proxyexecutes thezrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 119

Page 125: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis270_zrange_p99

ProxyP99LatencyofzrangeCommand

P99 latencywhen theproxyexecutes thezrangecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis271_zrange_qps

ProxyzrangeCommand Rate

Rate atwhich theproxyexecutes thezrangecommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis272_zcount_avg_usec

AverageProxyLatencyofzcountCommand

Averagelatency whenthe proxyexecutes thezcountcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis273_zcount_max_usec

Maximum ProxyLatencyofzcountCommand

Maximumlatency whenthe proxyexecutes thezcountcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis274_zcount_p99

ProxyP99LatencyofzcountCommand

P99 latencywhen theproxyexecutes thezcountcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis275_zcount_qps

ProxyzcountCommand Rate

Rate atwhich theproxyexecutes thezcountcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 120

Page 126: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis276_zrem_avg_usec

AverageProxyLatencyof zremCommand

Averagelatency whenthe proxyexecutes thezremcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis277_zrem_max_usec

Maximum ProxyLatencyof zremCommand

Maximumlatency whenthe proxyexecutes thezremcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis278_zrem_p99

ProxyP99Latencyof zremCommand

P99 latencywhen theproxyexecutes thezremcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis279_zrem_qps

ProxyzremCommand Rate

Rate atwhich theproxyexecutes thezremcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis280_zscore_avg_usec

AverageProxyLatencyofzscoreCommand

Averagelatency whenthe proxyexecutes thezscorecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis281_zscore_max_usec

Maximum ProxyLatencyofzscoreCommand

Maximumlatency whenthe proxyexecutes thezscorecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 121

Page 127: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis282_zscore_p99

ProxyP99LatencyofzscoreCommand

P99 latencywhen theproxyexecutes thezscorecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis283_zscore_qps

ProxyzscoreCommand Rate

Rate atwhich theproxyexecutes thezscorecommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis284_zrank_avg_usec

AverageProxyLatencyof zrankCommand

Averagelatency whenthe proxyexecutes thezrankcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis285_zrank_max_usec

Maximum ProxyLatencyof zrankCommand

Maximumlatency whenthe proxyexecutes thezrankcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis286_zrank_p99

ProxyP99Latencyof zrankCommand

P99 latencywhen theproxyexecutes thezrankcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis287_zrank_qps

ProxyzrankCommand Rate

Rate atwhich theproxyexecutes thezrankcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 122

Page 128: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis288_zrevrank_avg_usec

AverageProxyLatencyofzrevrankCommand

Averagelatency whenthe proxyexecutes thezrevrankcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis289_zrevrank_max_usec

Maximum ProxyLatencyofzrevrankCommand

Maximumlatency whenthe proxyexecutes thezrevrankcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis290_zrevrank_p99

ProxyP99LatencyofzrevrankCommand

P99 latencywhen theproxyexecutes thezrevrankcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis291_zrevrank_qps

ProxyzrevrankCommand Rate

Rate atwhich theproxyexecutes thezrevrankcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis292_zlexcount_avg_usec

AverageProxyLatencyofzlexcountCommand

Averagelatency whenthe proxyexecutes thezlexcountcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 123

Page 129: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis293_zlexcount_max_usec

Maximum ProxyLatencyofzlexcountCommand

Maximumlatency whenthe proxyexecutes thezlexcountcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis294_zlexcount_p99

ProxyP99LatencyofzlexcountCommand

P99 latencywhen theproxyexecutes thezlexcountcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis295_zlexcount_qps

ProxyzlexcountCommand Rate

Rate atwhich theproxyexecutes thezlexcountcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis296_zpopmax_avg_usec

AverageProxyLatencyofzpopmaxCommand

Averagelatency whenthe proxyexecutes thezpopmaxcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis297_zpopmax_max_usec

Maximum ProxyLatencyofzpopmaxCommand

Maximumlatency whenthe proxyexecutes thezpopmaxcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 124

Page 130: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis298_zpopmax_p99

ProxyP99LatencyofzpopmaxCommand

P99 latencywhen theproxyexecutes thezpopmaxcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis299_zpopmax_qps

ProxyzpopmaxCommand Rate

Rate atwhich theproxyexecutes thezpopmaxcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis300_zpopmin_avg_usec

AverageProxyLatencyofzpopminCommand

Averagelatency whenthe proxyexecutes thezpopmincommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis301_zpopmin_max_usec

Maximum ProxyLatencyofzpopminCommand

Maximumlatency whenthe proxyexecutes thezpopmincommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis302_zpopmin_p99

ProxyP99LatencyofzpopminCommand

P99 latencywhen theproxyexecutes thezpopmincommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 125

Page 131: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis303_zpopmin_qps

ProxyzpopminCommand Rate

Rate atwhich theproxyexecutes thezpopmincommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis304_zremrangebyrank_avg_usec

AverageProxyLatencyofzremrangebyrankCommand

Averagelatency whenthe proxyexecutes thezremrangebyrankcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis305_zremrangebyrank_max_usec

Maximum ProxyLatencyofzremrangebyrankCommand

Maximumlatency whenthe proxyexecutes thezremrangebyrankcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis306_zremrangebyrank_p99

ProxyP99LatencyofzremrangebyrankCommand

P99 latencywhen theproxyexecutes thezremrangebyrankcommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis307_zremrangebyrank_qps

ProxyzremrangebyrankCommand Rate

Rate atwhich theproxyexecutes thezremrangebyrankcommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 126

Page 132: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis308_zremrangebyscore_avg_usec

AverageProxyLatencyofzremrangebyscoreCommand

Averagelatency whenthe proxyexecutes thezremrangebyscorecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis309_zremrangebyscore_max_usec

Maximum ProxyLatencyofzremrangebyscoreCommand

Maximumlatency whenthe proxyexecutes thezremrangebyscorecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis310_zremrangebyscore_p99

ProxyP99LatencyofzremrangebyscoreCommand

P99 latencywhen theproxyexecutes thezremrangebyscorecommand(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis311_zremrangebyscore_qps

ProxyzremrangebyscoreCommand Rate

Rate atwhich theproxyexecutes thezremrangebyscorecommandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis312_zremrangebylex_avg_usec

AverageProxyLatencyofzremrangebylexCommand

Averagelatency whenthe proxyexecutes thezremrangebylex command(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 127

Page 133: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis313_zremrangebylex_max_usec

Maximum ProxyLatencyofzremrangebylexCommand

Maximumlatency whenthe proxyexecutes thezremrangebylex command(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis314_zremrangebylex_p99

ProxyP99LatencyofzremrangebylexCommand

P99 latencywhen theproxyexecutes thezremrangebylex command(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis315_zremrangebylex_qps

ProxyzremrangebylexCommand Rate

Rate atwhich theproxyexecutes thezremrangebylex commandUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis316_all_avg_usec

AverageProxyLatencyofCommands

Averagelatency whenthe proxyexecutescommands(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis317_all_max_usec

Maximum ProxyLatencyofCommands

Maximumlatency whenthe proxyexecutescommands(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 128

Page 134: GaussDB(for Redis)

Metric Name Description ValueRange

MonitoredObject

MonitoringPeriod(RawData)

redis318_all_p99

ProxyP99LatencyofCommands

P99 latencywhen theproxyexecutes allcommands(Unit: μs)

≥ 0 us Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

redis319_all_qps

ProxyCommand Rate

Rate atwhich theproxyexecutescommandsUnit: count/s

≥ 0Counts/s

Monitoredobject: databaseMonitoredobject:GaussDB(forRedis) instancenode

1 minute

Dimensions

Key Value

redis_cluster_id,redis_node_id

Cluster ID or node ID of the GaussDB(for Redis)instance

3.7.2 Setting Alarm Rules

Scenarios

Setting alarm rules allows you to customize the monitored objects and notificationpolicies so that you can closely monitor your GaussDB(for Redis) instances.

The GaussDB(for Redis) alarm rules include alarm rule name, instance, metric,threshold, monitoring interval and whether to send notification. This sectiondescribes how to set GaussDB(for Redis) alarm rules.

Procedure

Step 1 Log in to the console.

Step 2 Click Service List. Under Management & Governance, click Cloud Eye.

Step 3 In the navigation pane on the left, choose Alarm Management > Alarm Rules.

Step 4 On the displayed Alarm Rules page, click Create Alarm Rule.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 129

Page 135: GaussDB(for Redis)

Step 5 Set alarm parameters as prompted.

Pay attention to the following parameters:

● Resource Type: Select GaussDB NoSQL.● Dimension: Select Redis-Redis Nodes.● For details about how to configure other parameters, see Creating an Alarm

Rule.

Figure 3-38 Configuring alarm rules

Step 6 After the alarm rule is set, the system automatically notifies you when an alarm istriggered.

----End

3.7.3 Viewing Monitoring Metrics

ScenariosCloud Eye monitors GaussDB(for Redis) instance running statuses. You can viewthe GaussDB(for Redis) monitoring metrics on the management console.

Monitored data requires a period of time for transmission and display. The statusof the monitored object displayed on the Cloud Eye page is the status obtained 5to 10 minutes before. You can view the monitored data of a newly created DBinstance 5 to 10 minutes later.

Prerequisites● The DB instance is running properly.

Cloud Eye does not display the metrics of a faulty or deleted DB instance. Youcan view the monitoring information only after the instance is restarted orrecovered.

● The DB instance has been properly running for at least 10 minutes.The monitoring data and graphics are available for a new DB instance afterthe instance runs for at least 10 minutes.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 130

Page 136: GaussDB(for Redis)

Method 1

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the target DB instance.

Step 3 In the Node Information area on the Basic Information page, click View Metricin the Operation column.

Figure 3-39 Viewing metrics

Step 4 In the monitoring area, you can select a duration to view the monitoring data.

You can view the monitoring data of the service in the last 1, 3, or 12 hours.

To view the monitoring curve in a longer time range, click to enlarge thegraph.

----End

Method 2

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the target DB instance.

Step 3 In the navigation pane on the left, choose Advanced O&M.

Step 4 On the displayed page, click the Real-Time Monitoring tab to view real-timemonitoring data such as CPU usage, memory usage, and storage space usage.

On the Real-Time Monitoring tab, you can also click View details to view moremetric details.

NO TE

Currently, this function is available only to whitelisted users. To apply for this function, clickService Tickets > Create Service Ticket in the upper right corner of the managementconsole and submit the application.

----End

3.8 Auditing

3.8.1 Key Operations Supported by CTSWith CTS, you can record operations associated with GaussDB(for Redis) for laterquery, audit, and backtrack operations.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 131

Page 137: GaussDB(for Redis)

Table 3-8 lists the key operations that can be recorded by CTS.

Table 3-8 GaussDB(for Redis) key operations

Operation Resource Type Trace Name

Creating a DB instance instance NoSQLCreateInstance

Deleting a DB instance instance NoSQLDeleteInstance

Adding nodes instance NoSQLEnlargeInstance

Deleting nodes instance NoSQLReduceInstance

Restarting a DB instance instance NoSQLRestartInstance

Restoring data to new DBinstances

instance NoSQLRestoreNewInstance

Scaling up storage space instance NoSQLExtendInstanceVo-lume

Changing DB instancenames

instance NoSQLRenameInstance

Freezing a DB instance instance NoSQLFreezeInstance

Unfreezing a DB instance instance NoSQLUnfreezeInstance

Creating a backup backup NoSQLCreateBackup

Deleting a backup backup NoSQLDeleteBackup

Setting a backup policy backup NoSQLSetBackupPolicy

Adding an instance tag tag NoSQLAddTags

Modifying an instance tag tag NoSQLModifyInstanceTag

Deleting an instance tag tag NoSQLDeleteInstanceTag

3.8.2 Viewing Tracing Records

ScenariosAfter CTS is enabled, the tracker starts recording operations on cloud resources.Operation records for the last 7 days are stored on the CTS console.

This section describes how to query operation records for the last 7 days on theCTS console.

Procedure

Step 1 Log in to the management console.

Step 2 Click in the upper left corner and select a region and a project.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 132

Page 138: GaussDB(for Redis)

Step 3 Click Service List. Under Management & Governance, click Cloud Trace Service.

Step 4 Choose Trace List in the navigation pane on the left.

Step 5 Click Filter and specify filter criteria as needed. The following four filters areavailable:

● Trace Source, Resource Type, and Search By

Select a filter from the drop-down list.

When you select Trace name for Search By, you also need to select a specifictrace name.

When you select Resource ID for Search By, you also need to select or entera specific resource ID.

When you select Resource name for Search By, you also need to select orenter a specific resource name.

● Operator: Select a specific operator (a user rather than tenant).

● Trace Status: Available options include All trace statuses, normal, warning,and incident. You can only select one of them.

● Start time and end time: You can specify a time period for querying traces.

Step 6 Click on the left of the record to be queried to extend its details.

Step 7 Locate a trace and click View Trace in the Operation column.

----End

3.9 Billing Management

3.9.1 Renewing DB instances

Scenarios

This section describes how to renew your yearly/monthly GaussDB(for Redis)instances.

Precautions

Pay-per-use instances cannot be renewed.

Method 1

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, locate the target DB instance and clickRenew in the Operation column.

Step 3 On the displayed page, renew the DB instances.

----End

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 133

Page 139: GaussDB(for Redis)

Method 2

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, click the DB instance you wish to renew. TheBasic Information page is displayed.

Step 3 In the Billing Information area, click Renew in the Billing Mode field.

Figure 3-40 Renewing yearly/monthly DB instances

Step 4 On the displayed page, renew the DB instances.

----End

3.9.2 Changing the Billing Mode from Pay-per-Use to Yearly/Monthly

Scenarios

This section describes how to change the billing mode of a GaussDB(for Redis)instance from pay-per-use to yearly/monthly. If you use the service for a longtime, you can change the billing mode of a DB instance from pay-per-use toyearly/monthly for lower costs.

Precautions

Only when the status of a pay-per-use DB instance is Available, its billing modecan be changed to yearly/monthly.

Procedure

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, locate the DB instance whose billing modeyou wish to change and click Change to Yearly/Monthly in the Operationcolumn.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 134

Page 140: GaussDB(for Redis)

Figure 3-41 Changing the billing mode from pay-per-use to yearly/monthly

Step 3 On the displayed page, select the renewal duration in month. The minimumduration is one month.

Confirm the settings and click Pay.

Step 4 Select a payment method and click Pay.

Step 5 View the results on the Instance Management page.

In the upper right corner of the DB instance list, click to refresh the list. Theinstance status will become Available after the change is successful. The billingmode becomes to Yearly/Monthly.

----End

3.9.3 Changing the Billing Mode from Yearly/Monthly to Pay-per-Use

Scenarios

You can change the billing mode of a GaussDB(for Redis) instance from yearly/monthly to pay-per-use.

Precautions

The billing mode of a yearly/monthly DB instance can be changed to pay-per-useonly when the instance is in the Available status.

Procedure

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, locate the target DB instance and clickChange to Pay-per-Use or More > Change to Pay-per-Use in the Operationcolumn.

Figure 3-42 Changing yearly/monthly to pay-per-Use

Step 3 On the displayed page, confirm the instance information and click Change to Pay-per-Use to submit the change. The billing mode will change to pay-per-use afterthe DB instance expires.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 135

Page 141: GaussDB(for Redis)

NO TICE

Auto renewal will be disabled after the billing mode of your DB instances changeto pay-per-use. Exercise caution when performing this operation.

Step 4 After you submit the change, a message is displayed in the Billing Mode columnof the target DB instance, indicating that the billing mode will be changed to pay-per-use after the DB instance expires.

Step 5 To cancel the change, choose Billing > Renewal to enter the Billing Center. Onthe Renewals page, locate the target DB instance and click More > CancelChange to Pay-per-Use.

Step 6 In the displayed dialog box, click OK.

----End

3.9.4 Unsubscribing a Yearly/Monthly DB Instance

Scenarios● To delete a DB instance billed in the yearly/monthly mode, you need to

unsubscribe the order.

If an instance is frozen, you can release the instance on the GaussDB NoSQLconsole or in the billing center. For details about how to release resources inthe billing center, refer to Releasing Resources.

● To unsubscribe from a DB instance billed in the pay-per-use mode, locate thetarget DB instance and click Delete on the Instance Management page. Fordetails, see Deleting a DB Instance.

Procedure

Unsubscribe from a yearly/monthly GaussDB NoSQL instance on the InstanceManagement page.

Step 1 Log in to the GaussDB NoSQL console.

Step 2 On the Instance Management page, locate the instance you wish to unsubscribeand click Unsubscribe or choose More > Unsubscribe in the Operation column.

Figure 3-43 Unsubscribing from a yearly/monthly instance

Step 3 In the displayed dialog box, click Yes.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 136

Page 142: GaussDB(for Redis)

NO TICE

Unsubscribe operations cannot be undone. Exercise caution when performing thisoperation. To retain data, create a manual backup before unsubscription.

Step 4 On the displayed page, confirm the order to be unsubscribed and select a reason.Then, click Confirm.

For details about unsubscribing resources, see Unsubscription Rules.

Step 5 In the displayed dialog box, click Yes.

NO TICE

1. After an unsubscription request is submitted, resources and data will be deletedand cannot be retrieved.

2. If you want to retain data, complete a manual backup before submitting theunsubscription request.

Step 6 View the unsubscription result. After the DB instance order is successfullyunsubscribed, the DB instance is no longer displayed in the instance list on theInstance Management page.

----End

3.10 Migrating Data

3.10.1 From Redis to GaussDB(for Redis)As a popular in-memory database, Redis community edition is widely usedbecause of its high performance and a variety of data structures. GaussDB(forRedis) is a persistent database compatible with the Redis ecosystem. It not onlyprovides high read/write performance, but also provides data persistencecapabilities. Based on the advanced system architecture, it ensures strongconsistency of three data copies at a low cost, avoiding using fork operations ofRedis community edition.

This section describes how to migrate data from Redis community edition toGaussDB(for Redis).

Migration PrinciplesIn this section, drs-redis, a migration tool developed by HUAWEI CLOUD, is used tomigrate data from Redis to GaussDB(for Redis).

During the migration, drs-redis acts as the slave node of the source Redisdatabase. After drs-redis is connected to the source Redis, the synchronizationbetween the master and slave Redis nodes is triggered. The source Redis generatesRDB files and transfers them to drs-redis for full synchronization. Then, all writecommands saved in the buffer are sent to drs-redis for incrementalsynchronization. drs-redis receives and parses the RDB file of the source Redis

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 137

Page 143: GaussDB(for Redis)

instance, sends the parsed data to GaussDB(for Redis) using commands, and thensends the incremental data to GaussDB(for Redis) using commands to completethe migration.

Precautions● drs-redis acts as the slave node of the source Redis instance and reads only

the full data and incremental commands from the source database withoutdamaging your data.

● The process of writing data to drs-redis is added, which may slightly affect thedatabase performance.

● GaussDB(for Redis) supports multiple databases. If the source database is asingle-node Redis instance and multiple databases need to be retained,enable namespace on GaussDB(for Redis) to prevent data loss caused bymigration of multiple databases to the same space.

● If the source database does not have a slave node, the replication buffer isadded to the source database to cache incremental commands.Problem: The replication buffer for Redis master/slave synchronization is aring buffer. If the data is written to the buffer too quickly, the data that hasnot been sent to drs-redis will be overwritten. The source Redis instancedisconnects from drs-redis to ensure data consistency. As a result, themigration fails.Suggestion: During the migration, reduce the speed of writing data to thesource Redis instance and perform the migration during off-peak hours.Configure the client-output-buffer-limit parameter of Redis and increase thevalue of replication-buffer.

Prerequisites● Deploy the migration tool drs-redis.● Ensure that the migration tool drs-redis, the source Redis instance, and the

GaussDB(for Redis) network can communicate with each other.

Procedure

To migrate data from Redis to GaussDB(for Redis), choose Service Tickets >Create Service Ticket in the upper right corner of the management console andcontact technical support.

Migration Performance Reference● Environment: The source single-node Redis and migration tool drs-redis are

deployed on a HUAWEI CLOUD ECS with 8 vCPUs and 32 GB memory. Thetarget GaussDB(for Redis) has 4 vCPUs and 16 GB memory.

● Scenario 1:– The replication buffer at the source DB uses the default value (slave

268435456 67108864 60). The default value indicates that the amount ofstacked data in the cache exceeds 268435456 bytes (256 MB) or exceeds67108864 bytes (64 MB) for 60 seconds, the source DB proactivelydisconnects from the slave node.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 138

Page 144: GaussDB(for Redis)

– The write rate at the source DB is 5 MB/s. The migration process can beperformed continuously, and the synchronization failure caused by fullbuffer at the source DB will not occur.

– The data read rate of the migration tool is the same as the data writerate of the source DB.

● Scenario 2:– The replication buffer on the source DB is not limited (config set "client-

output-buffer-limit" "slave 0 0 0").– If the write rate of the source DB is 10 MB/s and the capacity is sufficient,

the migration continues.– The data read rate of the migration tool is the same as the data write

rate of the source DB.● Conclusion: In the HUAWEI CLOUD environment, the migration tool is

deployed on an ECS with 8 vCPUs and 32 GB memory. If the replication bufferat the source DB uses the default value, the migration can be performed atthe write rate of 5 MB/s at the source DB. If the replication buffer is notlimited at the source DB, the migration can be performed at the write rate of10 MB/s at the source DB.

3.10.2 From Kvrocks to GaussDB(for Redis)Kvrocks is an open-source NoSQL key-value database that is compatible with theRedis ecosystem. It uses namespace to partition data based on the underlyingRocksDB. However, it is relatively weak in cluster management. Kvrocks needs tocooperate with other components to create clusters and does not support someRedis commands, such as stream and hyperloglog that are frequently used inmessage flow and statistics scenarios.

GaussDB(for Redis) is a cloud-native NoSQL database with decoupled computeand storage and full compatibility with Redis. To ensure data security andreliability, it provides multi-copy, strict consistency based on a shared storage pool.It provides high compatibility, cost-effectiveness, high reliability, elastic scalability,high availability, and hitless scale-out. GaussDB(for Redis) functions as good asRedis Cluster does and is 100% compatible with native APIs. You can migrate youron-premises Redis databases to GaussDB(for Redis) without modifying any code.In addition to adapting to the Kvrocks service, it can also overcome thedisadvantages of weak management capability and low compatibility with Redis.

This section describes how to migrate data from Kvrocks to GaussDB(for Redis).

Migration PrinciplesThe open-source tool kvrocks2redis is used to migrate data from Kvrocks toGaussDB(for Redis). At the code layer, Kvrocks namespace is adapted to the sourceGaussDB(for Redis) database.

The migration process consists of two phases: full migration and incrementalmigration. During full migration that is first performed, snapshots are created forKvrocks and the corresponding data version (seq) is recorded. Then, the completedata files are parsed into Redis commands and written to GaussDB(for Redis).After the full migration is complete, the incremental migration starts. Themigration tool cyclically sends PSYNC commands to Kvrocks and continuouslyforwards the obtained incremental data to GaussDB(for Redis).

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 139

Page 145: GaussDB(for Redis)

Precautions● Kvrocks2redis needs to extract data from Kvrocks to local files, parse

commands from the files, and send the commands to the target GaussDB(forRedis) instance. During this process, the performance of the source DB maybe affected, but no data is compromised theoretically.

● If a fault occurs when the migration tool is running, the migration toolautomatically stops to facilitate fault locating.

● For security purposes, GaussDB(for Redis) does not provide database clearingcommands. Ensure that no data exists in the database before the migration.

Prerequisites● Deploy the kvrocks2redis on an independent host.● Ensure that the source DB, target DB, and migration tool can communicate

with each other.● Back up data of the source Kvrocks instance in advance.● Clear all data on the destination GaussDB(for Redis) instance.

ProcedureTo migrate data from Kvrocks to GaussDB(for Redis), choose Service Tickets >Create Service Ticket in the upper right corner of the management console andcontact technical support.

3.10.3 From Pika to GaussDB(for Redis)Pika is a persistent large-capacity Redis storage service. It breaks through thememory bottleneck of Redis due to the large amount of data. However, it isrelatively weak in cluster management, and requires twemproxy or codis to shardstatic data. Compared with the Redis community edition, the databaseperformance is significantly lowered because Pika stores all data in disks.

GaussDB(for Redis) is a cloud-native NoSQL database with decoupled computeand storage and full compatibility with Redis. To ensure data security andreliability, it provides multi-copy, strict consistency based on a shared storage pool.It supports cold and hot data separation. Hot data can be read from the cachedirectly, improving read efficiency. RocksDB has been customized to allow thestorage capacity to be scaled up in seconds. A proxy is used to ensure that upper-layer applications are not affected by underlying sharding.

This section describes how to migrate data from Pika to GaussDB(for Redis).

Migration PrinciplesThe pika-port tool is used and acts as a slave node of Pika and data is migrated inmaster/slave replication mode. The master Pika node compares pika-port with itsown binlog offset to determine whether to perform full migration or incrementalmigration. If full migration is required, the master Pika node sends the full datasnapshot to pika-port, and pika-port sends the parsed snapshot data toGaussDB(for Redis). After the full migration is complete, incremental migrationstarts. pika-port parses the incremental data and sends the data to GaussDB(forRedis) in the form of Redis commands.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 140

Page 146: GaussDB(for Redis)

Figure 3-44 Migration Principles

Precautions● pika-port acts as the slave node of the source Pika and reads only full and

incremental data without damaging your data.● The master/slave synchronization process between the source DB and pika-

port is added, which may affect the performance of the source DB.● Full and incremental migration can be performed without service interruption.

Services are interrupted for a short period of time when services are switchedover to GaussDB(for Redis).

PrerequisitesDeploy the migration tool pika-port to ensure that the network connectionbetween the source DB and target Pika instance is normal.

ProcedureTo migrate data from Pika to GaussDB(for Redis), choose Service Tickets > CreateService Ticket in the upper right corner of the management console and contacttechnical support.

Migration Performance Reference● Environment: Pika (single node) and pika-port are deployed on an ECS with 8

vCPUs and 32 GB memory on HUAWEI CLOUD. The target DB is a three-nodeGaussDB(for Redis) instance with 8 vCPUs and 16 GB memory.

● Preset data: Use the memtier_benchmark tool to preset 200 GB of data.● Migration performance: about 50,000 QPS.

3.10.4 From SSDB to GaussDB(for Redis)SSDB is a high-performance NoSQL database written in C/C++. It is compatiblewith Redis APIs and supports multiple data structures, including key-value pairs,hashmap, sorted set, and list. SSDB is a persistent KV storage system and uses

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 141

Page 147: GaussDB(for Redis)

leveldb as the underlying storage engine. Its services directly interact with LevelDB.Operations such as compaction have direct impact on service read and write.GaussDB(for Redis) is a cloud-native NoSQL database with decoupled computeand storage and full compatibility with Redis. To ensure data security andreliability, it provides multi-copy, strict consistency based on a shared storage pool.RocksDB is used as the storage engine. Compared with leveldb, RocksDB greatlyimproves performance, solves the problem that leveldb proactively restricts write,and implements cold and hot separation, reducing the impact of operations at thestorage layer on performance.

This section describes how to migrate data from SSDB to GaussDB(for Redis).

Migration Principlesssdb-port acts as a slave node (replica) of the master node of the source SSDBdatabase and migrates data through master/slave replication. Then, it parses andconverts the obtained data into the format supported by Redis, and sends the datato the Redis instance specified in the configuration file. The following figure showsthe migration process. After the full synchronization is complete, the new data inSSDB is also synchronized to the Redis instance.

Figure 3-45 Migration diagram

Precautions● As the slave node of the SSDB master node, ssdb-port reads only full and

incremental data without damaging your data.● The performance of the source SSDB is affected for running ssdb-port.● Full migration and incremental migration can be performed without service

interruption. After all data is migrated, services need to be stopped for a shortperiod of time.

PrerequisitesCreate an ECS in the VPC where the GaussDB(for Redis) instance is located anddeploy the migration tool ssdb-port to ensure that the source SSDB instance cancommunicate with the target GaussDB(for Redis) instance.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 142

Page 148: GaussDB(for Redis)

Procedure

To migrate data from SSDB to GaussDB(for Redis), choose Service Tickets >Create Service Ticket in the upper right corner of the management console andcontact technical support.

Migration Performance Reference● Environment: The source SSDB and ssdb-port are deployed on an ECS with 4

vCPUs and 16 GB memory. The destination is a three-node instance with 8vCPUs and 16 GB memory.

● Preset data: Use the memtier_benchmark tool to preset 100 GB of data.● Migration performance: about 3000 QPS.

3.10.5 From LevelDB to GaussDB(for Redis)LevelDB is an open-source, persistent, and single-node KV database engine. Itprovides high random write performance and sequential read/write performance,and applies to write intensive scenarios. LevelDB does not provide the C/S networkstructure and must be deployed on the same server as your services. Comparedwith RocksDB developed based on LevelDB, LevelDB has many disadvantages. Forexample, it cannot make the most out of multi-core servers, and does not supportTB-level data storage, and cannot read data from HDFS.

GaussDB(for Redis) uses RocksDB as the storage engine. It is compatible with theRedis protocol and provides various data types to meet LevelDB requirements. Inaddition, RocksDB has been customized to allow the storage capacity to be scaledup in seconds, facilitating the migration of LevelDB services to the Redisecosystem.

This section describes how to migrate data from LevelDB to GaussDB(for Redis).

Migration Principles● Use the self-developed migration tool leveldb-port to deploy LevelDB on the

same server as your services, prepare the configuration file, and start themigration task to automatically complete full and incremental migration.

● The full migration process is efficient. It takes a snapshot of the LevelDB data,scans the entire database, packs the data into a format that can be identifiedby GaussDB(for Redis), and then sends the data to GaussDB(for Redis).

● During incremental migration, the WAL file of LevelDB and the LevelDBoperations are parsed, and the keys in the WAL file are sharded and sent bymultiple threads.

Precautions● The migration tool needs to be deployed on the source DB, which consumes

certain performance. You can modify the configuration file to control theperformance.

● During the migration, the source data file of LevelDB is read-only. There is norisk of data damage.

● Services do not need to be stopped during the migration.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 143

Page 149: GaussDB(for Redis)

● If a fault occurs during the migration, clear the GaussDB(for Redis) instanceand restart the migration.

Procedure

To migrate data from LevelDB to GaussDB(for Redis), choose Service Tickets >Create Service Ticket in the upper right corner of the management console andcontact technical support.

Migration Performance Reference● Environment: The source LevelDB and leveldb-port are deployed on a

HUAWEI CLOUD ECS with 4 vCPUs and 16 GB memory. The target DB is athree-node GaussDB(for Redis) instance with 2 vCPUs and 8 GB memory.

● Full migration: 10 GB data is preconfigured, and the migration speed is about8 MB/s.

● Incremental migration: Set the value to 1 KB and the migration speed to7,000 QPS.

3.10.6 From RocksDB to GaussDB(for Redis)RocksDB is a persistent key-value store, single-node DB engine developed byFaceBook based on LevelDB. It has powerful sequential read/write and randomwrite performance. Compared with LevelDB, RocksDB has many optimizations. Itsperformance is greatly improved and the problem that LevelDB proactivelyrestricts write operations is solved. As a DB engine, RocksDB does not provide theC/S network structure. It must be deployed on the same server as your services.

GaussDB(for Redis) uses RocksDB as the storage engine and is compatible withthe Redis protocol, meeting the usage requirements of RocksDB. In addition,RocksDB has been customized to allow the storage capacity to be scaled up inseconds, facilitating the migration of RocksDB services to the Redis ecosystem.

This section describes how to migrate data from RocksDB to GaussDB(for Redis).

Migration Principles● Use the self-developed migration tool rocksdb-port to deploy RocksDB on the

same server as your services, prepare the configuration file, and start themigration task to automatically complete full and incremental migration.

● The full migration process is efficient. It takes a snapshot of the RocksDBdata, scans the entire database, packs the data into a format that can beidentified by GaussDB(for Redis), and then sends the data to GaussDB(forRedis).

● During incremental migration, the WAL file of RocksDB and the RocksDBoperations are parsed, and the keys in the WAL file are sharded and sent bymultiple threads.

Precautions● The migration tool needs to be deployed on the source DB, which consumes

certain performance. You can modify the configuration file to control theperformance.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 144

Page 150: GaussDB(for Redis)

● During the migration, the source data file of RocksDB is read-only. There is norisk of data damage.

● Services do not need to be stopped during the migration.● If a fault occurs during the migration, clear the GaussDB(for Redis) instance

and restart the migration.

ProcedureTo migrate data from RocksDB to GaussDB(for Redis), choose Service Tickets >Create Service Ticket in the upper right corner of the management console andcontact technical support.

GaussDB(for Redis) 3 Working with GaussDB(for Redis)

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 145

Page 151: GaussDB(for Redis)

4 Best Practices

4.1 Performance Comparison Between GaussDB(forRedis) and Open-Source Redis Cluster

This section describes the performance comparison test between the open-sourceRedis cluster and GaussDB(for Redis) in the x86 architecture, including the testenvironment, test model, and detailed test steps.

The following tests apply to the scenario where the data volume is less than thememory.

Test EnvironmentCN North-Beijing4: For details about the deployment mode. For details, seeinstance deployment topology.

Server Resource Configuration

Table 4-1 Server resource configuration

Name vCPUs Memory Storage

GaussDB(forRedis)

4 48 GB 120 GB

Open-sourceRedis

4 48 GB (master)+ 48 GB (slave)

Less than 40 GB

GaussDB(for Redis) 4 Best Practices

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 146

Page 152: GaussDB(for Redis)

Client Resource Configuration

Table 4-2 Client resource configuration

Name Instance Specifications OS

Two ElasticCloud Servers(ECSs)

General computing-enhanced |c6.2xlarge.2 | 8 vCPUs | 16 GB

CentOS 6.9 64bit

Instance Deployment Topology● GaussDB(for Redis) cluster deployment

Figure 4-1 GaussDB(for Redis) cluster deployment

● Open-source Redis cluster deployment

GaussDB(for Redis) 4 Best Practices

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 147

Page 153: GaussDB(for Redis)

Figure 4-2 Open-source Redis cluster deployment

Test Tool

Table 4-3 Test tool

Name Version How to Obtain

memtier_benchmark

1.3.0 https://github.com/RedisLabs/memtier_benchmark

Test Environment Preparation

Step 1 Log in to the HUAWEI CLOUD console.

Step 2 In the service list, choose Database > GaussDB NoSQL.

Step 3 Create a GaussDB(for Redis) instance. For details, see Buying a DB Instance.

Step 4 Create an open-source Redis cluster.

Step 5 Purchase the test client ECS and install memtier_benchmark on it.

----End

Test Examples● Write-only test for the string type

GaussDB(for Redis) 4 Best Practices

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 148

Page 154: GaussDB(for Redis)

Run the following command to test the write-only performance of the stringtype and preset data for the read test../memtier_benchmark -s ${redis_ip} -a ${password} -p ${redis_port} -c 20 -t 4 -n 1500000 --random-data --randomize --distinct-client-seed -d 1024 --key-maximum=1500000 --key-minimum=1 --ratio=1:0 --key-pattern=S:S --show-config

● Read-only test of the string type

Run the following command to test the get performance../memtier_benchmark -s ${redis_ip} -a ${password} -p ${redis_port} -c 20 -t 4 -n 1500000 --random-data --randomize --distinct-client-seed -d 1024 --key-maximum=1500000 --key-minimum=1 --ratio=0:1 --key-pattern=S:S --show-config

● Read and write ratio 1:1 test of the string type

Run the following command to test the read/write ratio 1:1 performance../memtier_benchmark -s ${redis_ip} -a ${password} -p ${redis_port} -c 20 -t 4 -n 1500000 --random-data --randomize --distinct-client-seed -d 1024 --key-maximum=1500000 --key-minimum=1 --ratio=1:1 --key-pattern=S:S --show-config

● Write-only test of the hash type

Run the following command to test the hset performance and preset readdata for the next phase../memtier_benchmark -s ${redis_ip} -a ${password} -p ${redis_port} -c 20 -t 4 -n 1500000 --random-data --randomize --distinct-client-seed -d 1024 --key-maximum=1500000 --key-minimum=1 --command='hset __key__ field __data__' --command-key-pattern=S --command-ratio=1 --show-config

● Read-only test of the hash type

Run the following command to test the hget performance../memtier_benchmark -s ${redis_ip} -a ${password} -p ${redis_port} -c 20 -t 4 -n 1500000 --random-data --randomize --distinct-client-seed -d 1024 --key-maximum=1500000 --key-minimum=1 --command='hget __key__ field' --command-key-pattern=S --command-ratio=1 --show-config

● Read/Write ratio 1:1 test of the hash type

Run the following command to test the read/write ratio 1:1 performance../memtier_benchmark -s ${redis_ip} -a ${password} -p ${redis_port} -c 20 -t 4 -n 1500000 --random-data --randomize --distinct-client-seed -d 1024 --key-maximum=1500000 --key-minimum=1 --command='hset __key__ field __data__' --command-key-pattern=S --command-ratio=1 --command='hget __key__ field' --command-key-pattern=S --command-ratio=1 --show-config

NO TE

In the preceding command, ${password} indicates the password set during databasecreation, ${redis_ip} and ${redis_port} indicate the database connection address and portnumber. The number of concurrent connections used in the test is 80, and the value ofdata_size is 1024.

Test Results● Performance tests

Table 4-4 GaussDB(for Redis) cluster performance data

Database Type

Operation Type

data_size (byte)

QPS(count/s)

Latency(ms)

P99(ms)

P9999(ms)

GaussDB(for

set 1024 168245.41

0.48 0.80 7.20

GaussDB(for Redis) 4 Best Practices

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 149

Page 155: GaussDB(for Redis)

Database Type

Operation Type

data_size (byte)

QPS(count/s)

Latency(ms)

P99(ms)

P9999(ms)

Redis)cluster

get 1024 169466.14

0.47 0.79 5.70

set&&get

1024 168127.72

0.47 0.79 5.63

hset 1024 166739.55

0.48 0.80 5.65

hget 1024 166503.99

0.48 0.79 5.95

hset&&hget

1024 167421.87

0.47 0.79 5.43

Table 4-5 Performance data of open-source Redis cluster

Database Type

Operation Type

data_size (byte)

QPS(count/s)

Latency(ms)

P99(ms)

P9999(ms)

Open-sourceRediscluster

set 1024 140398.84

1.67 3.30 8.55

get 1024 147784.27

1.63 3.00 6.95

set&&get

1024 146621.82

1.63 3.00 8.05

hset 1024 143943.09

1.67 3.40 8.55

hget 1024 147419.35

1.63 3.00 7.15

hset&&hget

1024 150614.64

1.64 3.00 8.20

Table 4-6 shows the comparison results between the GaussDB(for Redis) andthe open-source Redis cluster.

GaussDB(for Redis) 4 Best Practices

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 150

Page 156: GaussDB(for Redis)

Table 4-6 Performance data (ratio of GaussDB(for Redis) to open-sourceRedis cluster)

DatabaseType

OperationType

QPS Latency P99 P9999

GaussDB(for Redis)cluster/Open-sourceRediscluster

set 1.1983 0.2887 0.2424 0.8421

get 1.1467 0.2852 0.2633 0.8201

set&&get 1.1467 0.2882 0.2617 0.6988

hset 1.1584 0.2873 0.2353 0.6608

hget 1.1295 0.2919 0.2633 0.8322

hset&&hget

1.1116 0.2890 0.2617 0.6616

● Write test of large data volume

In a write test where the data volume exceeds the memory, the followingerror is reported when the open-source Redis cluster exhausts the memory:server xxxxxxxxx:xxxx handle error response: -OOM command not allowed when used memory >'maxmemory'

In contrast, GaussDB(for Redis) was not affected. The following table lists theperformance results of GaussDB(for Redis) when the data volume exceeds thememory.

Table 4-7 Performance test results when the data volume of GaussDB(forRedis) exceeds the memory

OperationType

QPS(count/s)

Latency(ms)

P99 (ms) P9999 (ms)

set 255861.78 0.47 1.05 37.50

get 276799.67 0.43 0.97 34.50

set&&get 272387.70 0.44 1.06 28.90

● Data compression test

GaussDB(for Redis) provides data compression services, reducing data storagecosts. Preset a certain amount of data and check the storage space used byGaussDB(for Redis) and native Redis clusters.The following table lists the preset data volume and the used storage space.

Table 4-8 Data compression test results

Database Type Data Type Preset DataVolume (GB)

Used StorageSpace (GB)

GaussDB(forRedis)

string 1.43 0.187

GaussDB(for Redis) 4 Best Practices

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 151

Page 157: GaussDB(for Redis)

Database Type Data Type Preset DataVolume (GB)

Used StorageSpace (GB)

hash 1.43 0.282

Open-SourceRedis

string 1.43 1.96

hash 1.43 2.18

● Conclusion analysis

The preceding test results show that GaussDB(for Redis) has the followingadvantages:

a. Performance: Under the same test conditions, the QPS of GaussDB(forRedis) is 11% to 19% higher than that of the open-source Redis cluster.The average latency and P99 of GaussDB(for Redis) are 70% lower thanthose of the open-source Redis cluster. The P9999 of GaussDB(for Redis)is 15% lower than that of the open-source Redis cluster.

b. Write resistance: In the write test where the data volume is greater thanthe memory, the open-source Redis cluster runs out of memory (OOM)due to memory limitation. GaussDB(for Redis) can still provide highperformance services. The available storage space of GaussDB(for Redis)is determined by the size of the underlying SSDs. GaussDB(for Redis) hasobvious advantages over the native Redis cluster in terms of writeresistance.

c. Storage: GaussDB(for Redis) provides efficient data compression services.The data compression test results show that GaussDB(for Redis) usesonly one tenth of the storage space of the open-source Redis cluster.

GaussDB(for Redis) 4 Best Practices

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 152

Page 158: GaussDB(for Redis)

5 Performance White Paper

5.1 Test MethodThis section describes the performance test of GaussDB(for Redis), including thetest environment, tools, metrics, models, and procedures.

Test Environment● Region: CN North-Beijing4● AZ: AZ1● Elastic Cloud Server (ECS): c6.4xlarge.2 with 16 vCPUs, 32 GB of memory, and

CentOS 7.5 64 bit image.● Each DB instance includes three nodes.● For details about the instance class, see Table 5-1.

Table 5-1 Instance class

No. Instance Class

cluster1 4 vCPUs | 16 GB

cluster2 8 vCPUs | 32 GB

cluster3 16 vCPUs | 64 GB

cluster4 32 vCPUs | 128 GB

Test ToolIn this test, the multi-thread load test tool memtier_benchmark developed byRedis Labs is used. For details about how to use this tool, seememtier_benchmark.

GaussDB(for Redis) 5 Performance White Paper

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 153

Page 159: GaussDB(for Redis)

Test Metrics

Table 5-2 Test metrics

Abbreviation Description

OPS Number of read/write operationsexecuted per second.

Avg Latency Average latency of read and writeoperations, in milliseconds.

P99 Latency ● P99 latency of read and writeoperations.

● 99% of operations can becompleted within this delay. Only1% of operations have a latencylonger than this value.

● Unit: ms.

Testing Models● Workload model

Table 5-3 Workload model

Workload Model ID Test Model

100% Write 100% write operation (string set)

100% Read 100% read operations (string get).The even random access model isused in strict performance tests.

50% Read+50% Write 50% read operation (string get) and50% write operation (string set)

● Data model

Table 5-4 Data model

Data Model ID Data Model

value length The value is generated randomly.The length is 100 bytes.

● Test scenarios

GaussDB(for Redis) 5 Performance White Paper

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 154

Page 160: GaussDB(for Redis)

Table 5-5 Test scenarios

Test Scenario Description

The data volume is less than thememory size.

All data can be cached in thememory.

The data volume is larger than thememory size.

Some data can be cached in thememory, and some data can beaccessed in the DFV storage pool.

Test ProcedureScenario 1: The data volume is smaller than the memory size.

In this scenario, the following steps use the instance specifications of 4 vCPUs and16 GB memory as an example to describe how to obtain the performance metricsof each workload model.

● Test model: 100% write modelRun the following command to set the value length to 100 bytes, write60,000,000 pieces of data (6 GB), and record the performance metrics:./memtier_benchmark -s *** -a *** -p 8635 -c 4 -t 30 -n 1000000 --random-data --randomize --distinct-client-seed -d 100 --key-maximum=60000000--key-minimum=1 --key-prefix= --ratio=1:0 --out-file=./result/result_small_100_set.log

● Test model: 100% read modelRun the following command to randomly read 6 GB data and record theperformance metrics:./memtier_benchmark -s *** -a *** -p 8635 -c 4 -t 30 -n 500000 --key-maximum=60000000 --key-minimum=1 --key-prefix= --ratio=0:1 --out-file=./result/result_small_100_get.log

● Test model: 50% read and 50% writeRun the following command to randomly read 6 GB data and continuouslywrite data to the instance. Record the performance metrics../memtier_benchmark -s *** -a *** -p 8635 -c 4 -t 30 -n 500000 -d 100 --key-maximum=60000000 --key-minimum=1 --key-prefix= --ratio=1:1 --out-file=./result/result_small_100_setget.log

Scenario 2: The data volume is greater than the memory size.

In this scenario, the following steps use the instance specifications of 4 vCPUs and16 GB memory as an example to describe how to obtain the performance metricsof each workload model.

● 100% write modelRun the following command to set the value length to 100 bytes, continue towrite 720 million pieces of data (72 GB), and record the performance metrics.The total data volume is 780 million pieces of data (78 GB)../memtier_benchmark -s *** -a *** -p 8635 -c 4 -t 24 -n 15000000 --random-data --randomize --distinct-client-seed -d 100 --key-

GaussDB(for Redis) 5 Performance White Paper

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 155

Page 161: GaussDB(for Redis)

maximum=780000000 --key-minimum=60000001 --key-prefix= --ratio=1:0--out-file=./result/result_large_100_set.log

● 100% read modelRun the following command to randomly read 78 GB data and record theperformance metrics:./memtier_benchmark -s *** -a *** -p 8635 -c 4 -t 24 -n 625000 --key-maximum=780000000 --key-minimum=1 --key-prefix= --ratio=0:1 --out-file=./result/result_large_100_get.log

● 50% read + 50% write modelRun the following command to randomly read 78 GB data and continuouslywrite data to the instance. Record the performance metrics../memtier_benchmark -s *** -a *** -p 8635 -c 4 -t 24 -n 625000 -d 100 --key-maximum=780000000 --key-minimum=1 --key-prefix= --ratio=1:1 --out-file=./result/result_large_100_setget.log

5.2 Test DataThis section describes the GaussDB(for Redis) performance test results, includingthe performance metrics of each instance specification in different data models,test scenarios, and workload models.

● For details about test results in the scenario where the data volume is smallerthan the memory size, see Table 5-6.

● For details about test results in the scenario where the data volume is greaterthan the memory size, see Table 5-7.

Table 5-6 Data volume smaller than the memory size

InstanceSpecifications

Test Model WorkloadModel

QPS AverageLatency(ms)

P99Latency(ms)

4vCPUs,16 GB,and 3nodes

value_length=100 bytesrecord_count=60000000operation_count=60000000threads=120(12*10)

100%Write

231070 0.52 1.80

100% Read 245184 0.49 1.60

50% Read+50%Write

233740 Read:0.51 Read:1.97

Write:0.51 Write:1.93

8vCPUs,32 GB,and 3nodes

value_length=100 bytesrecord_count=120000000operation_count=120000000

100%Write

331631 0.58 1.80

100% Read 333263 0.57 1.90

50% Read+50%Write

330797 Read:0.58 Read:1.87

GaussDB(for Redis) 5 Performance White Paper

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 156

Page 162: GaussDB(for Redis)

InstanceSpecifications

Test Model WorkloadModel

QPS AverageLatency(ms)

P99Latency(ms)

threads=192(12*16)

Write:0.58 Write:1.87

16vCPUs,64 GB,and 3nodes

value_length=100 bytesrecord_count=240000000operation_count=240000000threads=300(12*25)

100%Write

499139 0.59 2.10

100% Read 490017 0.61 1.70

50% Read+50%Write

494503 Read:0.61 Read:1.57

Write:0.60 Write:1.47

32vCPUs,128 GB,3 nodes

value_length=100 bytesrecord_count=480000000operation_count=480000000threads=300(12*32)

100%Write

624570 0.61 1.91

100% Read 620326 0.63 1.80

50% Read+50%Write

621796 Read:0.62 Read:1.73

Write:0.61 Write:1.85

Table 5-7 Data volume greater than the memory size

InstanceSpecifications

Test Model WorkloadModel

QPS AverageLatency(ms)

P99Latency(ms)

4 vCPUs,16 GB,and 3nodes

value_length=100 bytesrecord_count=780000000operation_count=60000000threads=96(12*8)

100%Write

186057 0.52 1.47

100% Read 160919 0.59 1.97

50% Read+50%Write

182556 Read:0.54 Read:1.57

Write:0.51 Write:1.23

8 vCPUs,32 GB,and 3nodes

value_length=100 bytesrecord_count=1560000000operation_count=120000000

100%Write

267712 0.45 1.73

100% Read 201874 0.59 1.76

50% Read+50%Write

265636 Read:0.48 Read:1.70

GaussDB(for Redis) 5 Performance White Paper

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 157

Page 163: GaussDB(for Redis)

InstanceSpecifications

Test Model WorkloadModel

QPS AverageLatency(ms)

P99Latency(ms)

threads=120(12*10)

Write:0.42 Write:1.17

16vCPUs,64 GB,and 3nodes

value_length=100 bytesrecord_count=3120000000operation_count=240000000threads=180(12*15)

100%Write

333171 0.54 1.83

100% Read 283311 0.63 1.87

50% Read+50%Write

318870 Read:0.58 Read:1.35

Write:0.55 Write:1.24

32vCPUs,128 GB,3 nodes

value_length=100 bytesrecord_count=6240000000operation_count=480000000threads=300(12*20)

100%Write

452869 0.61 1.83

100% Read 381749 0.66 1.93

50% Read+50%Write

426941 Read:0.57 Read:1.52

Write:0.51 Write:1.38

GaussDB(for Redis) 5 Performance White Paper

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 158

Page 164: GaussDB(for Redis)

6 FAQs

6.1 Product Consulting

6.1.1 What Should I Pay Attention to When UsingGaussDB(for Redis)

1. DB instance operating systems (OSs) are invisible to you. Your applicationscan access a database only through an IP address and a port.

2. The backup files stored in OBS and the system containers used byGaussDB(for Redis) are invisible to you. They are visible only in theGaussDB(for Redis) management system.

3. Precautions after purchasing DB instances:After purchasing DB instances, you do not need to perform basic databaseO&M operations, such as applying HA and security patches, but you shouldstill note:

a. The CPU, input/output operations per second (IOPS), and space areinsufficient for the DB instances.

b. The DB instance has performance problems and whether optimization isrequired.

6.1.2 What Is the Availability of a GaussDB(for Redis) InstanceThe formula for calculating the instance availability is as follows:

DB instance availability = (1 – Failure duration/Total service duration) × 100%

The failure duration refers to the total duration of faults that occur during therunning of a DB instance after you buy the instance. The total service durationrefers to the total running time of the DB instance.

GaussDB(for Redis) 6 FAQs

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 159

Page 165: GaussDB(for Redis)

6.1.3 What Are the Differences Between GaussDB(for Redis)and Open Source Redis?

Table 6-1 Comparison between Redis and GaussDB(for Redis)

Item Redis GaussDB(for Redis)

Storagearchitecture

Data is processed in thememory of the open-sourceRedis. The amount of datathat can be stored is restrictedby the size of physicalmemory. When AOF or RDB isused for persistence, half ofthe memory needs to bereserved in some cases,resulting in high storage costs.

With decoupled compute andstorage, hot data is cached atthe computing layer, and fulldata is flushed to disks at thestorage layer. Remote directmemory access (RDMA) isused for high-speed networkaccess. Algorithms are used topredict user access behaviourand implement automatic hotand cold data exchange,improve read and writeperformance.

Data backupandrestoration

Not supported SupportedAfter you purchase aninstance, GaussDB(for Redis)will provide additional backupstorage of the same size asyou purchased. Data isautomatically backed up everyday. You can restore data atany time and manually backup data as required.

Load balancer Not supportedYou need to specify IPaddresses for accessing nodes.Primary/Secondary switchoverand failover cannot besmoothly processed.

SupportedLoad balancing is supported.Faulty nodes can beautomatically removed,ensuring smooth upgrade.

Disasterrecovery (DR)capability

WeakA maximum of two faultynodes can be tolerated at thesame time.

StrongThe distributed architectureprovides superlative faulttolerance (N-1 reliability).

GaussDB(for Redis) 6 FAQs

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 160

Page 166: GaussDB(for Redis)

Item Redis GaussDB(for Redis)

Dataconsistency

WeakWhen the master node breaksdown and the slave nodebecomes the master node, thedata on the original masternode is not completelysynchronized, causing datainconsistency. Take the tagsystem as an example. Whenthe master node breaks down,business recommendation,crowd identification, andintelligent filtering areaffected, resulting in decision-making losses.

StrongThe distributed storage DFV isused to implement strongconsistency of three copies,freeing you from worryingabout synchronizationaccumulation or inconsistency.In addition, up to six copiescan be easily supported.

Anti-writecapability

WeakOnly the master node iswritable, and the write speedof the master node is toohigh. As a result, a largeamount of data is stacked onthe master and slave nodes,which may cause data lossand out of memory (OOM).

StrongData can be written tomultiple nodes at the sametime, doubling the writecapability.

Scaling WeakDuring the capacity expansion,the migrate command is usedto migrate all data to the newnode. The access delay of themigrated data increasessignificantly.

StrongThe cloud native architectureis divided into the computinglayer and storage layer. At thecomputing layer, datamigration is not required. Onlyroute mapping needs to bemodified, which can becompleted in seconds. Thestorage layer is a super datalake with a large capacity atPB-level.

Availability WeakData replication uses themaster/slave architecture. As aresult, if a pair of master andslave nodes in a cluster with Nnodes are faulty at the sametime, the entire cluster isunavailable.

StrongWith decoupled compute andstorage, compute nodes canview and share all data witheach other, so this architecturecan provide N-1 reliability.

GaussDB(for Redis) 6 FAQs

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 161

Page 167: GaussDB(for Redis)

Item Redis GaussDB(for Redis)

Big key block A single thread blocks thedeletion, elimination, andbatch query of big keys.

Multiple threads support thedeletion, elimination, andbatch query of big keys.

Restartrecoveryspeed

Slow. RDB or AOF needs to beloaded.

Normal

Table 6-2 Comparison between open-source Redis and GaussDB(for Redis)advantages

Item Redis GaussDB(for Redis)

Costs All data can only be stored inthe memory, which is costly.

The cold and hot separationarchitecture reduces the costto a tenth of the open-sourceRedis cost.

Storage 100 GB level Petabyte level

Security ● You need to build your ownnetwork security system,which poses great technicalchallenges and is costly.

● You need to use third-partytools to implement SSLencryption.

● GaussDB(for Redis)provides the VPC andsecurity group to isolatetenants and control accessto networks.

● GaussDB(for Redis)supports SSL to ensuresecurity and data integrity.

Datareliability

● Data is flushed to disks inseconds, which may causedata loss.

● Asynchronous replicationbetween the master andslave databases causesdata inconsistency and therisk of dirty reads.

● Commands are flushed todisks one by one, and thereis no risk of data loss.

● Multiple copies are stronglyconsistent, avoiding dirtyreads.

Fault recovery The data restoration durationdepends on the data volume.It takes a long time to restorea large amount of data.

The data restoration durationis independent of the datavolume. Data can be restoredin minutes.

GaussDB(for Redis) 6 FAQs

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 162

Page 168: GaussDB(for Redis)

Item Redis GaussDB(for Redis)

Scale out ● Setup: It takes 1 to 2persons per day to preparethe server to install andcommission the Redissoftware.

● Monitoring: You need to setup a monitoring system.

● Setup: A DB instance canbe created within 3minutes.

● Monitoring: GaussDB(forRedis) provides more than50 monitoring metricsabout system resources,network traffic, QPS ofvarious commands, andlatency. In addition, youcan customize monitoringthresholds and alarmpolicies to detect systemexceptions in a timelymanner.

O&M The operations are complexand data migration isrequired, making it difficult toachieve hitless scale-out.

Ease of use: Hitless scale-outof compute nodes in secondsand storage nodes in minutes.

Expertsupport

You need to build an expertteam to maintain Redisdatabases.

Huawei database expert teamprovides 24/7 support,including routine vulnerabilityfixing and version update.

6.2 Billing

6.2.1 What Are the Differences Between Yearly/Monthly andPay-per-use Billing Mode?

Yearly/Monthly is a prepaid billing mode in which resources are billed based onthe service duration. This cost-effective mode is ideal when the duration ofresource usage is predictable. It is recommended for long-term users.

Pay-per-use is a post payment mode, so you can start or stop an instance at anytime. Less than one hour will be calculated as one hour.

6.2.2 Can I Switch Between Yearly/Monthly and Pay-per-UsePayments?

You can change the billing mode from yearly/monthly to pay-per-use or vice versa.

● For details about how to change the billing mode from yearly/monthly to apay-per-use, see Changing the Billing Mode from Yearly/Monthly to Pay-per-Use.

GaussDB(for Redis) 6 FAQs

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 163

Page 169: GaussDB(for Redis)

● For details about how to change the billing mode from pay-per-use to yearly/monthly, see Changing the Billing Mode from Pay-per-Use to Yearly/Monthly.

6.3 Database Usage

6.3.1 Why Is the Returned Value Empty When the KeyMatching a Specified Pattern Exists?

SymptomAs shown in the following figure, the value of key is test and exists in thedatabase. However, no data is returned using this scan match command.

Possible CausesThe MATCH command is used to iterate elements that only match a specifiedpattern. Pattern matching is performed after the command obtain elements fromthe data set and before the elements are returned to the client. If all the extractedelements do not match the pattern, no element is returned.

SolutionIf multiple scans are performed, the iteration is complete when the returnedcursor is 0. The cursor returned from the last scan is used for the next scan.

6.3.2 How Do I Select Specifications and Nodes WhenCreating a GaussDB(for Redis) Instance?

1. Higher specifications can provide better performance. For details about thesupported instance specifications, see DB Instance Specifications.

2. If the instance specifications are the same, more nodes provide betterperformance. For details about performance, see Test Data.

3. Select specifications that can meet your service requirements based on thetest data and reserve some resources for reliability redundancy and futureservice growth.

GaussDB(for Redis) 6 FAQs

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 164

Page 170: GaussDB(for Redis)

4. Generally, a single-core CPU has good performance when the data size is 16GB. For example, if the service data volume is 128 GB and is not expected toincrease any further, you can purchase two instances each with 4 vCPUs and16 GB memory.

6.3.3 Which Commands Are Supported and Restricted byGaussDB(for Redis)?

For details about the supported commands, see Supported and RestrictedCommands.

Compared with the O(1) operation, the performance of O(n) operation is reduced.Exercise caution when using the O(n) operation.

6.3.4 How Do I Process Existing Data Shards After Switchingto GaussDB(for Redis)?

With the compute and storage decoupled architecture, GaussDB(for Redis)supports dynamic data sharding management at the computing layer, providingpowerful smooth scaling capabilities. After the GaussDB(for Redis) instance isconnected, data sharding is not required on the service side.

6.4 Database Connection

6.4.1 How Do I Connect to GaussDB(for Redis)?You can access GaussDB(for Redis) through a private network, public network,domain name, load balancer IP address, or program code. For details, seeConnection Methods.

6.4.2 How Do I Use the IP Addresses of Multiple GaussDB(forRedis) Nodes?

GaussDB(for Redis) provides multiple IP addresses for you to access a cluster andachieve load balancing and disaster recovery.

You can use multiple IP addresses in any of the following ways.

1. Use the connection pool on the service side implement load balancing andfault detection.

2. Contact customer service to configure the Elastic Load Balance (ELB) serviceand provide a unique IP address.

3. Configure domain names for multiple proxy IP addresses. For details abouthow to connect to a DB instance through a private domain name, seeConnect to a DB Instance over a Private Network.

6.4.3 How Does Load Balancing Work in GaussDB(for Redis)?For details, see Elastic Load Balance.

GaussDB(for Redis) 6 FAQs

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 165

Page 171: GaussDB(for Redis)

6.4.4 How Can I Create and Connect to an ECS?1. To create an ECS, see Elastic Cloud Server User Guide.

– The ECS to be created must be in the same VPC with the GaussDB(forRedis) instance to which it connects.

– Configure the security group rules to allow the ECS to access to theinstance.

2. To connect to an ECS, see "Logging in to an ECS" Getting Started with ElasticCloud Server User Guide.

6.4.5 Can I Change the VPC of a GaussDB(for Redis) Instance?Once a GaussDB(for Redis) instance is created, the VPC where the instance residescannot be changed.

However, you can change a VPC by restoring the full backup of your instance tothe VPC you want to use. For details, see Restoring Data to a New DB Instance.

6.5 Backup and Restoration

6.5.1 How Long Can a GaussDB(for Redis) Instance Backup BeSaved?

Automated backup data is kept based on the backup retention period youspecified. There is no limit for the manual backup retention period. You can deletemanual backups as needed.

For more backup information, see Managing Automated Backups and ManagingManual Backups.

6.6 Regions and AZs

6.6.1 What Is AZ and How Can I Select an AZ?

AZAn AZ is a part of a physical region with its own independent power supply andnetwork. An AZ is generally an independent physical equipment room, ensuringindependence of the AZ.

Each region contains multiple AZs. If one AZ becomes faulty, the other AZs in thesame region can continue to provide services normally.

AZs in the same region can communicate with each other over an intranet.

Selecting an AZYou can deploy your instances in different AZs for high availability. If one of an AZbecomes faulty, databases in other AZs will not be affected. When selecting AZs:

GaussDB(for Redis) 6 FAQs

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 166

Page 172: GaussDB(for Redis)

● If only one AZ is available in a region, there is only one AZ in the region.● The AZ of a purchased DB instance cannot be changed.● The AZs in one region can communicate with each other over an intranet.

For more information, see Regions and AZs.

6.6.2 How Do I Select a Region?A region is a geographic area. Huawei has deployed data centers in multipleregions to provide services nationwide. A nation can have different regions.

It is recommended that you select the nearest region. For example, if you or yourcustomers are located in Beijing, select a CN North region for low network latencyand high service access rate.

For more information, see Regions and AZs.

6.6.3 Can Different AZs Communicate with Each Other?An AZ is a part of a physical region with its own independent power supply andnetwork. An AZ is generally an independent physical equipment room, ensuringindependence of the AZ.

Each region contains multiple AZs. If one AZ becomes faulty, the other AZs in thesame region can continue to provide services normally.

By default, different AZs in the same VPC can communicate with each otherthrough an internal network.

For more information, see Regions and AZs.

6.6.4 Can I Change the Region of a GaussDB(for Redis)Instance

Not supported After an instance is created, its region cannot be changed.

GaussDB(for Redis) 6 FAQs

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 167

Page 173: GaussDB(for Redis)

A Change History

Release Date Description

2021-06-15 This issue is the sixteenth official release, whichincorporates the following change:Adjusted the document structure.

2021-04-30 This issue is the fifteenth official release, whichincorporates the following change:Added the minimum storage capacity supported byinstances of different specifications in DB InstanceSpecifications.Changed the upper limit of the storage space from fourtimes of the memory to eight times of the memory inDB Instance Specifications.

2021-04-15 This issue is the fourteenth official release, whichincorporates the following changes:Adjusted the document structure.Updated monitoring metrics of GaussDB(for Redis)Optimized the page for purchasing GaussDB(for Redis)instances.

2021-01-30 This issue is the thirteenth official release, whichincorporates the following changes:Supported binding and unbinding EIPs to and EIP fromGaussDB(for Redis) instances.Optimized the page for purchasing GaussDB(for Redis)instances.Supported changing instance class, adding nodes to aninstance, and scaling up storage capacity.

2020-12-30 This issue is the twelfth official release, whichincorporates the following changes:Supported load balancer IP addresses for GaussDB(forRedis).

GaussDB(for Redis) A Change History

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 168

Page 174: GaussDB(for Redis)

Release Date Description

2020-11-30 This issue is the eleventh official release, whichincorporates the following changes:Added the commands restricted by GaussDB(for Redis).

2020-10-30 This issue is the tenth official release, whichincorporates the following changes:● Supported up to 20 tags per instance.● Allowed users to select at least 1 GB each time they

scale up.● Supported advanced O&M for GaussDB(for Redis).● Allowed users to reset GaussDB(for Redis) password

on the console.

2020-08-30 This issue is the eighth official release, whichincorporates the following changes:Supported the following functions of GaussDB(forRedis):● Supported DB instance name modifications.● Supported instance recycle bin.● Supports the yearly/monthly billing mode.● Added monitoring metrics.

2020-06-30 This issue is the sixth official release, which incorporatesthe following changes:Supported cross-AZ DR for GaussDB(for Redis).

2020-05-30 This issue is the sixth official release, which incorporatesthe following changes:● Supported scaling up of storage for GaussDB(for

Redis).● Supported instance restart for GaussDB(for Redis).● Supported restoring a full backup to a new

GaussDB(for Redis) instance.● Supported automated backups for GaussDB(for

Redis).● Supports manual backups for GaussDB(for Redis).

2020-01-20 This issue is the second official release, whichincorporates the following change:Supported GaussDB(for Redis) open beta testing.

GaussDB(for Redis) A Change History

Issue 16 (2021-06-15) Copyright © Huawei Technologies Co., Ltd. 169