Cross-Cluster Connections in Search with OpenSearch

Learn about cross-cluster connections in Search with OpenSearch.

You can use cross-cluster connections to search and analyze data across several OpenSearch clusters, enabling you to gain insights from distributed data sources. You to perform operations such as cross-cluster search, as if the data was from a single source.

Cross-cluster connections are available by default with the Security plugin, but you need to configure each cluster to allow remote connections from other clusters. This involves setting up cluster connections and configuring access permissions.

When configuration a cross-cluster connection in Search with OpenSearch, the outbound (leader) cluster is the cluster you want to connect to other clusters. The inbound (follower) cluster is the cluster being connected to from the outbound cluster.

The following table maps the Search with OpenSearch terminology to the terminology used by OpenSearch for cross-cluster search and cross-cluster replication.

Search with OpenSearch Term

OpenSearch Cross-Cluster Search Term

OpenSearch Cross-Cluster Replication Term

Outbound cluster Coordinating cluster Leader cluster/index
Inbound cluster Remote cluster Follower cluster/index

Prerequisites

The following prerequisites apply to cross-cluster connections:
  • Permissions: You must have appropriate permissions for both the inbound and outbound clusters to perform cross-cluster operations. For the specific cluster permissions required, see Performing Cross-Cluster Replication.

  • IAM Policies: For information about required IAM policies and permissions, see IAM Policies.

Version Requirements

Cross-cluster connections has the following version requirements:

  • Cross-cluster search (CCS) is supported for clusters running OpenSearch 2.11 or later.
  • Cross-cluster replication (CCR) is supported for clusters running OpenSearch 2.15 or later.
  • For CCR, the outbound cluster must be running a version equal to or newer than the inbound cluster. This version compatibility limitation doesn't apply to CCS.

Limitations

Cross-cluster connections has the following limitations:

  • You can configure a maximum of five clusters per tenancy.
  • Clusters can connect to other clusters with the same OpenSearch version or one version lower.
  • Cross-cluster connections are supported for the following:
    • Clusters within the same OC1 region, or
    • Across all regions within the OC1 realm.

Performing Cross-Cluster Replication

With cross-cluster replication, you replicate indexes, mappings, and metadata from one OpenSearch cluster (outbound cluster) to another OpenSearch cluster (inbound cluster). All later operations on the outbound cluster are replicated on the inbound cluster, such as creating, updating, or deleting documents. Use cross-cluster replication for the following scenarios:

  • To maintain a backup cluster that you can switch to if the primary cluster fails.
  • Provide faster query performance by keeping data closer to users in geographically distributed regions.
  • Distribute query and indexing loads across more than one cluster.

The following can impact cross-cluster replication performance:

  • Network latency between the outbound and inbound clusters.
  • The size and frequency of updates to the outbound index.
  • Resource availability on both the outbound cluster and the inbound clusters.

Permissions

To enable cross-cluster replication, you need cluster-level permissions for replication and index-level permissions for both the outbound cluster and inbound cluster. For more information, see your OpenSearch documentation under Permissions.

Replication Operations

The following table lists the replication operations you can perform. See Cross-cluster replication API for more information.

Operation Description
Start replication Begins the replication of an index from the outbound cluster to the inbound cluster.
Stop replication Ends the replication and converts the inbound index to a standard index
Pause replication Pauses replication of the outbound index.
Resume replication Resumes replication of the outbound index.
Get replication status Gets the status of index replication. Possible statuses are SYNCING, BOOTSTRAPING, PAUSED, and REPLICATION NOT IN PROGRESS.

Use the syncing details to measure replication lag.

Get leader cluster stat Gets information about replicated outbound indexes on a specified cluster.
Get follower cluster stats Gets information about inbound indexes on a specified cluster.
Get auto-follow stats Gets information about autofollow activity and any replication rules configured on the specified cluster.
Update settings Updates settings on the inbound index.
Create replication rule Automatically starts replication on indexes matching a specified pattern. If a new index on the outbound cluster matches the pattern, OpenSearch automatically creates a inbound index and begins replication. You can also use this API to update existing replication rules.
Delete replication rule Deletes the specified replication rule. This operation prevents any new indexes from being replicated but doesn't stop existing replication already started based on the rule. Replicated indexes remain read-only until you stop replication.