Help Center> GaussDB(for MySQL)> User Guide> Serverless> Buying a Serverless DB Instance
Updated on 2024-05-21 GMT+08:00

Buying a Serverless DB Instance

Scenarios

The capacities of serverless DB instances automatically change based on application requirements.

This section describes how to create a serverless DB instance on the GaussDB(for MySQL) console.

Constraints

Currently, instances billed at a serverless billing can be purchased in the following regions:

  • CN North-Beijing4
  • CN East-Shanghai1
  • CN South-Guangzhou
  • AP-Singapore

Billing

For details, see Serverless Billing.

Prerequisites

  • You can create an IAM user or user group on the IAM console and grant it specific operation permissions, to perform refined management on Huawei Cloud. For details, see Creating a User and Granting Permissions.
  • Your account balance is not below zero.

Procedure

  1. Go to the Buy DB Instance page.
  2. On the displayed page, select Serverless for Billing Mode, configure required information, and click Next.

    Figure 1 Basic information

    Table 1 Basic information

    Parameter

    Description

    Region

    A region where the DB instance is located. You can change this on the creation page, or go back to the Instances page and change it in the upper left corner.

    NOTICE:

    Products in different regions cannot communicate with each other through a private network. After a DB instance is purchased, the region cannot be changed.

    DB Instance Name

    A name must start with a letter and consist of 4 to 64 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.

    • If you create multiple instances at a time, a hyphen (-) followed by a number with four digits will be appended to the instance name, starting with -0001. For example, if you enter instance, the first instance will be named instance-0001, the second instance-0002, and so on.
    • The names for instances created in batches must consist of 4 to 59 characters. Only letters, digits, hyphens (-), and underscores (_) are allowed.

    DB Engine

    GaussDB(for MySQL)

    DB Engine Version

    MySQL 8.0

    DB Instance Type

    Only primary/standby DB instances are supported.

    Primary/Standby: A primary/standby instance contains one primary node and one read replica. The primary node processes read and write requests, and the read replica processes only read requests. If the primary node becomes unavailable, GaussDB(for MySQL) automatically fails over to the read replica. Primary/standby instances apply to medium- and large-sized enterprises in the Internet, taxation, banking, and insurance sectors.

    AZ Type

    An AZ is a physical region where resources have their own independent power supply and networks. AZs are physically isolated but interconnected through an internal network. Some regions support both single-AZ and multi-AZ deployment and some only support single-AZ deployment.

    • Single-AZ: The primary node and the read replica are deployed in the same AZ.
    • Multi-AZ: The primary node and the read replica are deployed in different AZs to ensure high reliability.

    Time Zone

    You need to select a time zone for your instance based on the region hosting your instance. The time zone is selected during instance creation and cannot be changed after the instance is created.

    Figure 2 Specifications and storage of a serverless instance

    Table 2 Specifications and storage

    Parameter

    Description

    Compute Configuration

    Currently, only Custom is supported.

    Compute Range

    1 TCU is approximately equal to the instances with 1 vCPU and 2 GB of memory.

    Value range: 1 to 32.

    Nodes

    By default, a DB instance contains one primary node and multiple read replicas. When purchasing a serverless DB instance, you can apply for zero or one read replica. Read replicas cannot be created after a DB instance is purchased.

    Storage

    It contains the system overhead required for inode, reserved block, and database operation.

    Storage will be scaled up dynamically based on the amount of data that needs to be stored, and is billed hourly on a pay-per-use basis.

    Backup Space

    GaussDB(for MySQL) provides free backup space equal to the amount of your used storage. After the free backup space is used up, you will be billed for the additional space on a pay-per-use basis.

    Figure 3 Network
    Table 3 Network

    Parameter

    Description

    VPC

    • Indicates a dedicated virtual network in which your DB instances are located. It isolates networks for different services. You can select an existing VPC or create a VPC. For details about how to create a VPC, see Creating a VPC.

      If no VPC is available, GaussDB(for MySQL) allocates a VPC to you by default.

      NOTICE:

      After a DB instance is created, the VPC cannot be changed.

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

      A private IP address is automatically assigned when you create a DB instance. You can also enter an idle private IP address in the subnet CIDR block.

      NOTE:

      Currently, GaussDB(for MySQL) does not support IPv6.

    Security Group

    Enhances security by controlling access to GaussDB(for MySQL) from other services. When you select a security group, you must ensure that it allows the client to access instances.

    If no security group is available or has been created, GaussDB(for MySQL) allocates a security group to you by default.

    NOTE:

    To ensure subsequent database connections and access, click Add Inbound Rule to allow all IP addresses to access your DB instance through port 3306 and over ICMP.

    For details, see Configuring Security Group Rules.

    Table 4 Database proxy

    Parameter

    Description

    Database Proxy

    It is enabled by default. After the database proxy is enabled, you can use the IP address of a proxy instance to connect to your DB instance.

    When the number of nodes is 1, database proxy cannot be enabled.

    NOTE:

    To use this function, submit a service ticket by choosing Service Tickets > Create Service Ticket.

    Proxy Mode

    You can select Read/Write or Read-only as needed.

    • Read/Write: All write requests are forwarded only to the primary node, and all read requests are forwarded to the selected nodes based on the read weights.
    • Read-only: The primary node does not process write and read requests, and all read requests are forwarded to the selected read replicas based on read weights.

    Proxy Instance Specifications

    You can select the proxy instance specifications as needed.

    Table 5 Database configuration

    Parameter

    Description

    Administrator

    The default login name for the database is root.

    Administrator Password

    Must consist of 8 to 32 characters and contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters (~!@#%^*-_=+?,()&$). Enter a strong password and periodically change it to improve security and defend against threats such as brute force cracking attempts.

    Keep this password secure. If lost, the system cannot retrieve it.

    After a DB instance is created, you can reset this password. For details, see Resetting the Administrator Password.

    Confirm Password

    Must be the same as Administrator Password.

    Table 6 Parameter template

    Parameter

    Description

    Parameter Template

    Contains engine configuration values that can be applied to one or more instances. You can modify the instance parameters as required after the instance is created.

    NOTICE:
    • If you use a custom parameter template when creating a DB instance, the following specification-related parameters in the custom template are not applied. Instead, the default values are used.

      "innodb_buffer_pool_size"

      "innodb_log_buffer_size"

      "max_connections"

      "innodb_buffer_pool_instances"

      "innodb_page_cleaners"

      "innodb_parallel_read_threads"

      "innodb_read_io_threads"

      "innodb_write_io_threads"

      "threadpool_size"

    • The value of innodb_parallel_select_count is determined by your instance specifications, instead of the parameter value you configured in the parameter template. The default value is OFF for instance with 16 vCPUs or less and ON for instances with more than 16 vCPUs.

    After a DB instance is created, you can adjust it based on service requirements. For details, see Modifying a Parameter Template.

    Table Name

    Specifies whether table names are case sensitive. This option cannot be changed later.

    • Case sensitive: Table names are case sensitive.
    • Case insensitive: Table names are case insensitive and are stored in lowercase letters by default.

    Enterprise Project

    Only available for enterprise users. If you want to use this function, contact customer service.

    An enterprise project provides a way to manage cloud resources and enterprise members on a project-by-project basis.

    You can select an enterprise project from the drop-down list. The default project is default.

    Table 7 Tags

    Parameter

    Description

    Tag

    This parameter is optional. Adding tags helps you better identify and manage your DB instances. A maximum of 20 tags can be added for each instance.

    After a DB instance is created, you can view its tag details on the Tags tab. For details, see Managing Tags.

    The performance of a DB instance depends on its configuration. Hardware configuration items include the instance specifications, storage type, and storage space.

  3. Confirm your specifications.

    • If you need to modify your settings, click Previous.
    • If you do not need to modify your settings, click Submit.

  4. To view and manage instances, go to the Instances page.

    • During the creation process, the instance status is Creating. After the instance status becomes Available, the instance can be used.
    • Automated backup is enabled by default during instance creation. After your instance was created, the backup policy cannot be disabled and a full backup will be automatically created.
    • After the instance is created, you can confirm the DB instance type on the Instances page.
    • After the instance is created, you can add a description.
    • The default database port is 3306, but you can change it after instance creation is complete.

      For details, see Changing a Database Port.

      To ensure data and instance security, change the database port immediately after the instance is created.