Set up cross-cluster replication for Aiven for OpenSearch® Limited availability
Set up cross-cluster replication (CCR) for your Aiven for OpenSearch service to synchronize data across regions and cloud providers efficiently.
Cross cluster replication is not available for the Free and Startup plans.
Steps to set up CCR
- Aiven Console
- Aiven API
-
Log in to the Aiven Console, and select the Aiven for OpenSearch service.
-
On the service's Overview page, scroll to the Cross cluster replication section.
-
Click Create follower.
-
On the Create OpenSearch follower cluster page:
- Enter a name for the follower service.
- Select the cloud provider, region, and service plan.
- Add additional disk storage if required.
noteThe follower service must use the same service plan as the leader service during creation to ensure sufficient memory. You can change the service plan later.
-
Click Create.
To set up cross-cluster replication using the Aiven API, create the follower service
and include the opensearch_cross_cluster_replication integration in the service
creation request. For more information, see
Create service.
curl -X POST https://api.aiven.io/v1/project/PROJECT_NAME/service \
-H "Authorization: Bearer API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"service_type": "opensearch",
"plan": "business-4",
"cloud": "gcp-us-east1",
"service_name": "follower-os-cluster",
"service_integrations": [
{
"integration_type": "opensearch_cross_cluster_replication",
"source_service": "LEADER_SERVICE_NAME",
"user_config": {}
}
]
}'
Parameters:
PROJECT_NAME: Aiven project nameAPI_TOKEN: API authentication tokenLEADER_SERVICE_NAME: Leader service name
To learn about the limitations with cross-cluster replications for Aiven for OpenSearch, see the Limitations section.
View follower services
To view the follower services configured for your Aiven for OpenSearch service:
- Go to the Overview page of your service.
- Scroll to the Cross-cluster replication section.
- Click a follower service name to view its details.
The Leader and Follower chips below the service names identify the service roles.
Promote a follower service to a standalone service
You can promote a follower service to standalone status to make it work independently, without replicating data from a leader service. This is helpful in disaster recovery situations where replication needs to stop, and the service must function on its own.
Promoting a follower service to standalone stops replication and deletes the replication integration. A standalone service cannot be reverted to a follower service.
- Aiven Console
- Aiven API
- Log in to the Aiven Console, and select the Aiven for OpenSearch service.
- On the service's Overview page, scroll to the Cross-cluster replica status section.
- Click the follower Aiven for OpenSearch service to promote.
- On the follower service's Overview page, click Promote to standalone in the Cross-cluster replica status.
- Click Confirm to complete the promotion.
The follower service is now a standalone service and can accept writes. You can set up replication again if needed.
To promote a follower service to standalone using the Aiven API,
delete the opensearch_cross_cluster_replication integration from the service.
curl -X DELETE https://api.aiven.io/v1/project/<PROJECT_NAME>/integration/<INTEGRATION_ID> \
-H "Authorization: Bearer <API_TOKEN>"
Parameters:
<PROJECT_NAME>: Aiven project name.<INTEGRATION_ID>: ID of theopensearch_cross_cluster_replicationintegration.<API_TOKEN>: API authentication token.
Removing the integration transitions the follower service to a standalone service.