Overview of Serverless instances

更新时间:
复制 MD 格式

This topic describes how Serverless instances work, their benefits, and common use cases to help you quickly understand Serverless instances of OceanBase Database.

Background

Databases are a critical part of modern enterprise IT systems. To ensure business stability, customers often provision database cluster resources, such as CPU, memory, and storage, for peak workloads. However, this approach leads to wasted resources because the database service is underutilized most of the time. Serverless instances solve this problem. By rapidly scaling resources and providing precise, second-level billing, they align resource usage with the actual business workload. This effectively reduces O&M overhead and costs.

The following figure compares the resource usage and allocation for standard cluster instances and Serverless instances when business workloads fluctuate.

image

The figure shows that when business workloads fluctuate significantly:

  • Standard cluster instances: Resources are wasted during off-peak periods and are insufficient during peak periods, which can negatively impact your business.

  • Serverless instances: Resources are dynamically scaled based on the business workload. This ensures that the resource usage curve closely follows the business growth curve, which minimizes resource waste and saves O&M costs.

Benefits

Serverless instances of OceanBase Database provide flexible resource scaling to meet business needs at different growth stages. Key benefits include the following:

  • Focus on applications, not infrastructure

    This application-centric approach abstracts away the management and operation of the underlying infrastructure, including deployment and upgrade processes. This allows developers to focus on writing core code, which shortens the development cycle and reduces infrastructure management and maintenance costs.

  • Automatic scaling

    Resources are automatically scaled based on the real-time business workload using a dynamic resource adjustment policy. You do not need to estimate and configure a fixed amount of service resources in advance. For example, if you select a range of 4 to 8 OCUs, OceanBase Database dynamically adjusts the number of OCUs based on changes in the actual business workload. It can scale out to a maximum of 8 OCUs to handle peak workloads and ensure business continuity and stability. When the workload decreases, it automatically scales in the resources to a minimum of 4 OCUs to prevent waste.

  • Value-based pricing

    Billing is based on OceanBase Capacity Units (OCUs). This lets you use the capabilities of the OceanBase distributed database at the smallest granularity. You are billed in real time for the resources that you use, calculated on a per-second basis. The fees are directly proportional to your resource usage. This creates a true pay-as-you-go model and helps you save costs.

How it works

Glossary

  • Serverless instance: A new instance type that is created when you purchase an instance.

  • OCU: OCU is the abbreviation for OceanBase Capacity Unit. It is the unit of measurement for Serverless instances of OceanBase Database. One OCU is equivalent to the service capacity of approximately 1 CPU core and 2 GB of memory. The minimum scaling step size for a compute resource is 0.5 OCU.

Serverless instance architecture

Serverless instances of OceanBase Database use multi-tenant resource isolation to ensure that the workloads of each instance do not interfere with each other. Multi-tenancy management is a native feature of OceanBase Database. This feature provides a native resource pool scheduling function that can flexibly allocate underlying data resources. As a result, OceanBase Database can quickly respond to changes in resource demands from each tenant. This capability enables seamless scaling in Serverless mode to meet your business needs with flexibility and precision.

Serverless resource scaling triggers

A Serverless instance automatically scales out when the actual resource usage meets either of the following conditions:

  • The difference between the actual resource usage and the current OCU resource limit is less than 5% of the scaling step size for more than 5 consecutive seconds.

    For example, if the current OCU resource limit is 4 OCU, 5% of the scaling step size is 0.025 OCU. When the actual resource usage exceeds 3.975 OCU for more than 5 consecutive seconds, an automatic scale-out of 0.5 OCU is triggered.

  • The difference between the actual resource usage and the current OCU resource limit is less than 20% of the scaling step size for more than 15 consecutive seconds.

    For example, if the current OCU resource limit is 4 OCU, 20% of the scaling step size is 0.1 OCU. When the actual resource usage exceeds 3.9 OCU for more than 15 consecutive seconds, an automatic scale-out of 0.5 OCU is triggered.

A Serverless instance automatically scales in when the actual resource usage meets the following condition:

  • The difference between the actual resource usage and the current OCU resource limit is greater than 0.75 OCU for more than 60 consecutive seconds.

    For example, if the current OCU resource limit is 4 OCU, an automatic scale-in of 0.5 OCU is triggered when the actual resource usage drops below 3.25 OCU for more than 60 consecutive seconds.

Note

The scaling step size is currently set to 0.5 OCU. One OCU is approximately equivalent to 1 core CPU and 2 GB of memory.

Scenarios

Serverless instances are suitable for the following scenarios:

  • Enterprise-level database usage for small and medium-sized businesses.

  • Low-frequency database usage, such as in development and staging environments.

  • Software as a Service (SaaS) applications, such as website building services for small and medium-sized enterprises.

  • Educational settings, such as for school teaching and student experiments.

  • Users with fluctuating or unpredictable workloads.

Limits

Currently, you can create Serverless instances with a dual-data-center deployment only in the China (Hangzhou) region.

Billing description

Serverless instances of OceanBase Database are billed on a pay-as-you-go basis, and the billing unit is the OCU. For more information about the specific billing rules, see Serverless billing.

Note

One OCU is equivalent to approximately 1 core CPU and 2 GB of memory.