Help Center/ GeminiDB/ GeminiDB Redis API/ Getting Started with GeminiDB Redis API/ Buying and Connecting to a Cluster Instance
Updated on 2024-12-02 GMT+08:00

Buying and Connecting to a Cluster Instance

This section describes how to buy a GeminiDB Redis cluster instance on the GeminiDB console and connect to the instance.

With a sharded cluster architecture, a cluster instance can be connected through proxies and is compatible with a single Redis node, Redis Sentinel, and Redis Cluster. The cluster instance has strong horizontal scaling capabilities and can handle millions of QPS and dozens of TB of data.

Each tenant has up to 50 GeminiDB Redis instances by default. To create more instances, contact customer service.

Step 1: Buying an Instance

  1. Log in to the GeminiDB console.
  2. In the service list, choose Databases > GeminiDB Redis API.
  3. On the Instances page, click Buy DB Instance.
  4. On the displayed page, select a billing mode, configure instance specifications, and click Next.
The following parameters are for reference only. Select proper specifications as needed. Table 1 lists details about the parameters.
Figure 1 Billing mode and basic information

Parameter

Example Value

Description

Billing mode description

Pay-per-use

Billing mode of an instance

  • Yearly/Monthly: A prepaid billing mode in which you pay for resources before using it. Bills are settled based on the subscription period. The longer the subscription term, the bigger the discount. This mode is a good option for long-term stable services.
  • Pay-per-use: A postpaid billing mode. Pay as you go and just pay for what you use. The DB instance usage is calculated by the second but billed every hour. This mode allows you to adjust resource usage easily. You neither need to prepare for resources in advance, nor end up with excessive or insufficient preset resources.

Region

Select CN-Hong Kong.

Region where a tenant is located

NOTICE:

Select a region near to your service area to reduce network latency and experience faster access. Instances deployed in different regions cannot communicate with each other over a private network. After you buy an instance, you cannot change its region.

DB Instance Name

User-defined

The instance name:

  • Can be the same as an existing instance name.
  • Contains 4 to 64 characters and must start with a letter. It is case-sensitive and allows only letters, digits, hyphens (-), and underscores (_). If the name contains Chinese characters, the length cannot exceed 64 bytes.

Compatible API

Redis.

-

Product Type

Standard

  • Standard: Stable and low-latency performance is provided, suitable for common scenarios such as advertising and recommendation, gaming, e-commerce, and Internet of Vehicles (IoV).
  • Capacity-oriented: Large-capacity key-value storage is provided, suitable for average performance requirements and expectations of low costs.

DB Instance Type

Cluster

Cluster:

With a sharded cluster architecture, a cluster instance can be connected through proxies and is compatible with a single Redis node, Redis Sentinel, and Redis Cluster. The cluster instance has strong horizontal scaling capabilities and can handle millions of QPS and dozens of TB of data.

Compatible Version

6.2

7.0, 6.2 (including 6.2.X), 5.0, and earlier versions

CPU Type

x86

x86 CPUs use the Complex Instruction Set Computing (CISC) instruction set. Each instruction can be used to execute low-level hardware operations. Executing these instructions is complex and time-consuming.

AZ

AZ 1, AZ 2, and AZ 3

Availability zone where the instance is created. An AZ is a part of a region with its own independent power supplies and networks. AZs are physically isolated but can communicate with each other over a private network.

Figure 2 Specifications and storage

Parameter

Example Value

Description

Instance Creation Method

Fast configure

Two options are available:

  • Fast configure

    Provides you with recommended specifications. You can select one of them based on service requirements, without the need to specify the specifications, node quantity, and storage space.

  • Standard configure

    Provides a standard process to configure instance specifications, including specifying the specifications, node quantity, and storage space.

    Currently, a maximum of 36 nodes are supported. To obtain more nodes, choose Service Tickets > Create Service Ticket in the upper right corner of the console and contact customer service.

Instance Specifications

2U8GB

Higher CPU specifications provide better performance. Select specifications based on your service requirements.

For details, see Instance Specifications.

Figure 3 Network and database configurations

Parameter

Example Value

Description

VPC

default_vpc

Virtual private network where your DB instances are located. A VPC isolates networks for different services. You can select an existing VPC or create a VPC.

NOTE:
  • After a GeminiDB Redis instance is created, its VPC cannot be changed.
  • If you want to connect to a GeminiDB Redis instance through an ECS over an internal network, the GeminiDB Redis instance and the 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.

Subnet

default_subnet

A subnet provides dedicated network resources that are logically isolated from other networks for security purposes.

Database Port

6379

Port number for accessing a database. If you do not specify a port number, default port 6379 is used. You can specify a port number based on your requirements. The port number ranges from 1024 to 65535 except 2180, 2887, 3887, 6377, 6378, 6380, 8018, 8079, 8091, 8479, 8484, 8999, 12017, 12333, and 50069.

Access Control

Skip

  • Skip: Access is restricted based on the VPC access policy by default.
  • Configure:

Specify how access is controlled. Three options are available:

All IP addresses: All IP addresses can access the instance.

Whitelist: Only IP addresses in a group can access the instance.

Blacklist: IP addresses in a group cannot access the instance.

Database Password

Configured based on the password policy

Password of the administrator account. The password:

  • Must be 8 to 32 characters long.
  • Can include two of the following: uppercase letters, lowercase letters, digits, and special characters: ~!@#%^*-_=+?
  • For security reasons, set a strong password. The system will verify the password strength.

Keep your password secure. The system cannot retrieve it if it is lost.

Enterprise Project

default

This parameter is provided for enterprise users.

An enterprise project groups cloud resources, so you can manage resources and members by project. The default project is default.

Select an enterprise project from the drop-down list. For more information about enterprise projects, see Enterprise Management User Guide.

Retain the default values for other parameters.

5. On the order confirmation page, check the instance information. If you need to modify the information, click Previous. If no modification is required, read and agree to the service agreement and click Submit.

6. Click Back to Instance Management to go to the instance list.

7. On the Instances page, view and manage the created instance.
  • Creating an instance takes about 5 to 9 minutes. During the process, the instance status becomes Creating.
  • After the creation is complete, the status changes to Available.
Figure 4 Successful purchase

Step 2: Connecting to an Instance Through DAS

DAS enables you to manage DB instances from a web-based console, simplifying database management and improving efficiency. You can connect and manage instances through DAS. By default, you have permission of remote login. DAS is secure and convenient for connecting to DB instances.

  1. Log in to the GeminiDB console.
  2. In the service list, choose Databases > GeminiDB Redis API.
  3. In the instance list, locate the target instance and click Log In in the Operation column.
    Figure 5 Connecting to a GeminiDB Redis instance

    Alternatively, click the instance name to go to the Basic Information page. Click Log In in the upper right corner of the page.

    Figure 6 Connecting to a GeminiDB Redis instance
  4. Enter the password for logging in to the instance.

    You need to enter the password only when you log in to a GeminiDB Redis instance first time or after you reset the password.

    Figure 7 Logging in to the GeminiDB Redis instance
  5. Manage relevant databases.
    Figure 8 Instance homepage
    • Save commands to the execution record.

      This function is enabled by default to save the recently executed commands for your later query.

      Then you can click the Executed Commands tab on the lower page to view historical commands.

      Figure 9 Viewing executed commands

      If this function is disabled, the commands executed subsequently are not displayed. You can click next to Save Executed SQL Statements in the upper right corner to disable this function.

    • Execute a command.

      Enter a command in the command window and click Execute or F8.

      • Do not use transactions, Lua scripts, Pub/Sub commands, or other commands that have blocking semantics.
      • For an instance that supports multiple databases, you can change the current database on the console but cannot change it using a SELECT statement.
      Figure 10 Executing a command

      After a command is executed, you can view the execution result on the Results page.

    • Save a command.

      You can save a command to all instances, the current instance, or the current database. Then you can view details in My Commands.

      Figure 11 Saving a command
    • View my commands.

      Common commands are displayed the My Commands page.

      You can set a filter to narrow the scope of commands. If you select All, all commands saved in the current account are displayed.

      Figure 12 Filtering commands

      Alternatively, you can enter a command title or statement in the search box to search for the corresponding command.

      Figure 13 Searching for a command

      On the My Commands page, you can also create, edit, and delete a command or copy it to the command window.

      Figure 14 Managing a command

    • Clear a command.

      You can also press F10 to clear the command in the command window.

      Figure 15 Clearing a command