Updated on 2024-10-30 GMT+08:00

Compatible Commands

GeminiDB Redis API provides cluster and primary/standby instances. It is compatible with community Redis 5.0 and earlier versions, Redis 6.2 (including 6.2.X), and Redis 7.0 commands. You do not need to modify code when migrating applications to the cloud.

This section describes the compatibility of commands supported by GeminiDB Redis API 5.0, 6.2 (including 6.2.X), and 7.0, providing references to DBAs and developers.

Basic GeminiDB Commands

The following table lists commands provided by community Redis and compatibility of GeminiDB Redis API 5.0, 6.2 (including 6.2.X), and 7.0.

Table 1 Command compatibility of GeminiDB Redis API 5.0.

Redis Command Classification

Description

Compatibility with GeminiDB Redis 5.0

Compatibility with GeminiDB Redis API 6.2 (Including 6.2.x)

Compatibility with GeminiDB Redis API 7.0

String

String commands

100%

100%

100%

Hash

Hash commands

100%

100%

100%

List

List commands

100%

100%

100%

Sorted set

Sorted set commands

100%

100%

100%

Set

Set commands

100%

100%

100%

Bitmap

Bitmap commands

100%

100%

100%

Stream

Stream commands

100%

The XGROUP subcommand createconsumer is not supported.

Features of version 7.0 are not supported.

GEO

GEO commands

100%

100%

100%

HyperLogLog

HyperLogLog commands

100%

100%

100%

Pub/Sub

Pub/Sub commands

100%

100%

100%

Scripting and function

Scripting and function commands

100%

100%

Features of version 7.0 are not supported.

Transactions

Transaction commands

100%

100%

100%

Generic

Generic commands

SWAPDB and MOVE commands are not supported.

The following commands are not supported:

SWAPDB and MOVE

100%

Advanced GeminiDB Commands

  • EXHASH
    • Application scenarios: GeminiDB allows you to set an expiration time for each field of a hash key and is suitable for services such as frequency control and shopping cart.
    • Command list: For details, see EXHASH Commands.
    • Usage: For details, see EXHASH for Ad Frequency Control.
  • Bloom filter
    • Functions: A Bloom filter enables you to check if an element is present in a large-size collection. It is applicable to scenarios such as web interceptors and anti-cache penetration.
    • Command list: See Bloom filter.
    • Usage: See Bloom filter description.

GeminiDB O&M Commands

GeminiDB provides comprehensive and easy-to-use O&M functions based on the community Redis commands such as INFO, CLIENT, SLOWLOG, MONITOR, and CONFIG.

Table 2 O&M functions of GeminiDB Redis API

Function

GeminiDB O&M Functions

Community Redis Commands/Capabilities

Metrics

QPS, average latency, and p99 latency of commands, various metrics of nodes, and aggregation metrics of instances are provided.

INFO

Instance sessions

Client IP addresses and the top sessions of an instance are displayed. Users can kill sessions in batches with a few clicks.

CLIENT

Parameter configuration

Slow query logs and diagnosis details are provided.

CONFIG

Viewing slow query logs

High-risk commands and operations can be audited.

SLOWLOG

User permission management

Supports account management.

ACL (Access Control List)

Viewing audit logs

Kernel parameters can be queried and modified with only a few clicks. This function is an enhancement of CONFIG command provided by the community Redis.

MONITOR

Real-time big key diagnosis

Big keys are monitored in real time and without affecting services.

Not supported

Real-time hot key diagnosis

Hot keys are monitored in real time and without affecting services.

Not supported

Real-time key prefix analysis

Distribution of key prefixes is monitored in real time, which does not affect services.

Not supported

Critical command renaming

Users can modify command aliases and view renaming records.

You can rename commands by modifying configuration files.

Abnormal key circuit break

Specified keys can be shielded in one click to avoid access to services, which can be used for rapid data recovery.

Not supported

Precautions

  • GeminiDB Redis API does not support RESP3. Redis Serialization Protocol (RESP) is used for communication between a Redis server and a client. Mainstream clients such as Jedis use RESP2 by default, which can be used to access a GeminiDB Redis instance.
  • GeminiDB Redis API 7.0 does not support functions.