Overview

更新时间:
复制 MD 格式

This tutorial shows you how to seamlessly scale tenants.

Concepts

OceanBase Database scales clusters using standard or temporary specification changes. It scales tenants by adjusting their specifications. To meet business demands and manage costs, you can select a scaling plan based on your scenario. The plans are:

  • Standard specification change

    This plan adjusts resource capacity during use. You are billed for the adjusted capacity until the next standard specification change.

  • Temporary specification change

    This plan adjusts resource capacity for a short period. The incremental cost during this period is billed hourly. For more information, see Billing rules for temporary specification changes.

  • Tenant specification change

    This plan scales tenants by adjusting the specification and number of their Units.

Scaling dimension

Category

Scaling method

Scenarios

Cluster

Standard specification change

Storage space scaling

  • Scale out storage when your business accumulates more data and needs more space.

  • Scale in storage after you migrate or delete historical data and use less space.

Standard specification change

Package specification scaling

  • Scale out by upgrading the package specification when your business traffic or data volume grows.

  • Scale in by downgrading the package specification when cluster resource utilization is low.

Standard specification change

Scaling by adding or removing nodes

  • When your cluster or tenant has insufficient capacity, add nodes to allow the cluster to accommodate more tenants. Adding nodes also allows tenants to handle more data and service traffic.

  • When the cluster or tenant has redundant capacity, take nodes offline to reduce costs.

After you add or remove nodes, adjust the number of Units for the tenant to scale out its specifications.

Temporary specification change

Temporary upgrade or downgrade

When your business has small-scale, high-frequency promotions or other events, temporarily change the cluster specifications and capacity. After the event, restore the original configuration.

Tenant

Tenant specification change

Scaling by changing tenant specifications

When tenant performance does not meet business requirements, or when a new service has a small data volume and is used as a staging environment, scale out or scale in by modifying the tenant specifications.

Tutorial tasks

This tutorial shows you how to seamlessly scale OceanBase Database tenants. The main steps are:

image

Order

Procedure

Details

1

Create a cluster instance

If you are new to OceanBase Database, request a free trial to activate an OB Cloud 4C 16 GB cluster instance. For more information, see Free trial guide for cluster instances. You can also use an existing cluster for the following steps.

2

Create MySQL tenants

Create two MySQL-mode tenants named `tutorial_mysql01` and `tutorial_mysql02`. Set the tenant specification to 2C 8 GB.

3

Scale in by changing tenant specification

Scale in the `tutorial_mysql01` tenant by changing its specification to 1C 4 GB.

4

Scale out by changing tenant specification

Scale out the `tutorial_mysql02` tenant by changing its specification to 3C 12 GB.