API Doc
Search Docs...
⌘ K
ACOSABSAVEANSABDR

Replication service

The replication service is the core component of the replication module and runs as a virtual machine in the cluster.

The replication service is responsible for executing synchronous replication and fault handling jobs, managing associated synchronous replication plans, replication objects, and other resources, and interacting with AOC and ABS to query, read, and write data.

Three core service modules run as containers in the replication service virtual machine: kube-apiserver, etcd, and controller-manager.

kube-apiserver

kube-apiserver is the data bus and data hub of the replication service, and serves as the hub for data interaction and communication between the replication service and other components. kube-apiserver provides HTTP REST APIs for managing metadata.

When operations such as creating synchronous replication plans and executing synchronous replication and fault handling jobs are performed, AOC Server and controller-manager query, create, modify, or delete resource objects through kube-apiserver. kube-apiserver persistently stores all metadata of the replication service that it obtains in etcd.

etcd

etcd is a distributed key-value store and is also the default data storage engine of Kubernetes. etcd persistently stores all metadata of the replication service obtained by kube-apiserver, such as synchronous replication plans, synchronous replication jobs, and restore points.

controller-manager

controller-manager is the module in the replication service that is responsible for scheduling synchronous replication plans and executing synchronous replication and fault handling logic.

controller-manager includes multiple controllers. Each controller is responsible for scheduling, managing, and executing jobs for a corresponding type of resource. The controllers perform the following tasks:

  • Trigger corresponding synchronous replication jobs based on the configured protected objects and initialization time.
  • Periodically reclaim expired restore points based on the configured restore point retention policy.
  • Execute synchronous replication jobs. When a job is running, perform operations to keep replication objects in the Synchronized state and periodically create restore points based on the configured restore point creation interval.
  • Execute asynchronous replication jobs and clean up temporary resources when jobs succeed or fail.
  • Execute failover jobs and roll back replica objects to the pre-failover state when jobs fail.
  • Execute failover test jobs and clean up generated test virtual machines when jobs fail.
  • Execute failback jobs and clean up temporary resources when jobs succeed or fail.
  • Execute permanent failover jobs and clean up resources when jobs succeed.

When executing synchronous replication and fault handling jobs, controller-manager interacts with other components, including:

  • Listening for resource object creation, editing, and deletion events in kube-apiserver, and updating CR object status after executing logic.

  • Accessing AOC to query and obtain replication object metadata and snapshot information, and to create and delete replication object snapshots.

  • Accessing ABS to read or write volume data or perform other functions through the RPC protocol.