All Products
Search
Document Center

Tablestore:ServeMode

Last Updated:Jan 15, 2026

Defines the service mode for a global table.

Data structure

  • PRIMARY_SECONDARY: Active-passive mode. The primary region supports read and write operations. The secondary region is read-only. Data is synchronized from the primary region to the secondary region. This mode is suitable for scenarios such as write-once-read-many (local read), disaster recovery and backup, and remote hot standby.

  • PEER_TO_PEER: Multi-write mode. All regions support read and write operations. Conflicts are resolved at the row or column level based on the Last Write Wins (LWW) principle. This mode is suitable for scenarios that require low-latency read and write operations across multiple regions.

enum ServeMode {
  //HOT_STANDBY = 1;
  PRIMARY_SECONDARY = 2;
  PEER_TO_PEER = 3;
}