Updated on 2024-05-20 GMT+08:00

Compatible Commands

The GeminiDB Redis API provides the cluster edition and active/standby edition. It is compatible with community Redis 5.0 and earlier versions and Redis 6.2 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 and 6.2 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 and 6.2.

Table 1 Command compatibility of GeminiDB Redis API 5.0.

Redis Command Classification

Description

Compatibility with GeminiDB Redis 5.0

Compatibility with GeminiDB Redis 6.2

String

String commands

100%

100%

Hash

Hash commands

100%

100%

List

List commands

100%

100%

Sorted set

Sorted set commands

100%

100%

Set

Set commands

100%

100%

Bitmap

Bitmap commands

100%

100%

Stream

Stream commands

100%

The XGROUP subcommand createconsumer is not supported.

GEO

GEO commands

100%

100%

HyperLogLog

HyperLogLog commands

100%

100%

Pub/Sub

Pub/Sub commands

100%

100%

Scripting and function

Scripting and function commands

100%

100%

Transactions

Transaction commands

100%

100%

Generic

Generic commands

SWAPDB and MOVE commands are not supported.

The following commands are not supported:

SWAPDB and MOVE

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 Solution 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: For details, see Bloom Filter.
    • Usage: For details, 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

Redis Serialization Protocol (RESP) is used for communication between the Redis server and client. Redis 5.0 and earlier versions support the RESP2 protocol. Redis 6.2 and later versions also support the RESP3 protocol. Currently, GeminiDB Redis does not support the RESP3 protocol. Mainstream clients such as Jedis use the RESP2 protocol by default. You can access GeminiDB Redis in default mode.