OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

Product Overview
DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V3.2.4Enterprise Edition

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & CertificationTicket
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V3.2.4
    iconOceanBase Database
    SQL - V 3.2.4Enterprise Edition
    SQL
    KV
    • V 4.6.0
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    Automatic load balancing

    Last Updated:2023-10-27 09:57:43  Updated
    share
    What is on this page
    Load balancing groups
    Load balancing rules

    folded

    share

    Automatic load balancing for partition replicas is intended to adjust the distribution of partition replicas among resource units of a tenant to minimize the load difference between the resource units. Automatic load balancing for partition replicas is a tenant-level action that occurs within a single zone. RootService migrates data replicas of a tenant among resource units within a zone to achieve load balancing for the resource units.

    Load balancing groups

    Partition replica balancing is intended to evenly schedule all partitions of a tenant in a single zone to all resource units in the zone. During partition replica balancing for a zone, OceanBase Database divides all partitions in the zone into multiple groups. Each group is a basic unit for balanced scheduling and called a load balancing group. A load balancing group is a collection of partitions. Load balancing groups are independent of each other. When load balancing is achieved for partitions in each load balancing group, OceanBase Database considers that overall load balancing is achieved for all partitions in the zone.

    OceanBase Database supports the following three types of load balancing groups:

    • Type 1 load balancing group: contains all partitions of a table group that consists of multiple partitions.

    • Type 2 load balancing group: contains all partitions of a multi-partition table that does not belong to any table group.

    • Type 3 load balancing group: contains all partitions other than those in type 1 and type 2 load balancing groups. A tenant can have only one type 3 load balancing group in each zone.

    Load balancing rules

    In OceanBase Database, you can set the balancer_tolerance_percentage parameter to specify the sensitivity of disk load balancing. The parameter value is a percentage within the range of [1, 100].

    Load balancing rules for different types of load balancing groups based on the balancer_tolerance_percentage parameter:

    • Type 1 load balancing group

      All partitions in a type 1 load balancing group come from one table group. Such a load balancing group is intended to evenly schedule partition groups to all resource units in a zone so that the difference between the numbers of partition groups in all resource units is not greater than 1. While ensuring that the number of partition groups meets the requirement, OceanBase Database migrates partition groups among resource units to make the difference between disk usages of the resource units less than the value of the balancer_tolerance_percentage parameter.

      For more information about partition groups, see Table groups.

    • Type 2 load balancing group

      All partitions in a type 2 load balancing group come from one multi-partition table. Such a load balancing group is intended to evenly schedule all partitions of the multi-partition table to all resource units in a zone so that the difference between the numbers of partitions in all resource units is not greater than 1. While ensuring that the number of partitions meets the requirement, OceanBase Database migrates partitions among resource units to make the difference between disk usages of the resource units less than the value of the balancer_tolerance_percentage parameter.

    • Type 3 load balancing group

      A type 3 load balancing group contains all partitions other than those in type 1 and type 2 load balancing groups. OceanBase Database evenly schedules these partitions to all resource units in a zone so that the difference between the numbers of partitions in all resource units is not greater than 1. While ensuring that the number of partitions meets the requirement, OceanBase Database migrates partitions among resource units to make the difference between disk usages of the resource units less than the value of the balancer_tolerance_percentage parameter.

    Previous topic

    Multi-replica consensus protocols
    Last

    Next topic

    Table groups
    Next
    What is on this page
    Load balancing groups
    Load balancing rules