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 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 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 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:
Synchronized state and periodically create restore points based on the configured restore point creation interval.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.