open-consul/website/content/docs/connect/cluster-peering/index.mdx

51 lines
3.7 KiB
Plaintext
Raw Normal View History

2022-06-13 17:58:16 +00:00
---
layout: docs
page_title: What is Cluster Peering?
description: >-
This page details the cluster peering process for connecting Consul clusters across datacenters, including differences between cluster peering and the similar concept of WAN federation.
2022-06-13 17:58:16 +00:00
---
# What is Cluster Peering?
2022-06-13 18:31:13 +00:00
~> **Cluster peering is currently in technical preview**: Functionality associated with cluster peering is subject to change. You should never use the technical preview release in secure environments or production scenarios. Features in technical preview may have performance issues, scaling issues, and limited support.
2022-06-13 18:31:13 +00:00
You can create peering connections between two or more independent clusters so that services deployed to different partitions or datacenters can communicate.
2022-06-13 18:31:13 +00:00
## Overview
Cluster peering allows Consul clusters in different datacenters to communicate with each other. The cluster peering process consists of the following steps:
1. Create a peering token to share with other clusters
1. Establish a connection between clusters
1. Make services available to other clusters
For detailed instructions on setting up cluster peering with the Consul CLI, refer to [Create and Manage Peering Connections](/docs/connect/cluster-peering/create-manage-peering).
2022-06-13 18:31:13 +00:00
### Differences between WAN federation and cluster peering
2022-06-13 18:31:13 +00:00
WAN federation and cluster peering are different ways to connect clusters. The most important distinction is that WAN federation assumes clusters are owned by the same operators, so it maintains and replicates global states such as ACLs and configuration entries. As a result, WAN federation requires a _primary datacenter_ to serve as an authority for replicated data.
2022-06-13 18:31:13 +00:00
Regardless of whether you connect your clusters through WAN federation or cluster peering, human and machine users can use either method to discover services in other clusters or dial them through the service mesh.
2022-06-13 18:31:13 +00:00
| | WAN Federation | Cluster Peering |
| :----------------------------------------------- | :------------: | :-------------: |
| Connects clusters across datacenters | ✅ | ✅ |
| Shares support queries and service endpoints | ✅ | ✅ |
| Connects clusters owned by different operators | ❌ | ✅ |
| Functions without declaring primary datacenter | ❌ | ✅ |
| Shares key/value stores | ✅ | ❌ |
| Uses gossip protocol | ✅ | ❌ |
2022-06-13 18:31:13 +00:00
2022-06-15 19:21:58 +00:00
## Technical preview constraints
Not all features and functionality are available in the technical preview release. In particular, consider the following technical constraints:
2022-06-13 18:31:13 +00:00
- Consul ACLs must be disabled or the ACL `default_policy` must be set to `allow`.
- Mesh gateways for _server to server traffic_ are not available. However, mesh gateways for _service to service traffic_ between clusters are available.
- Services exported to peered clusters must be configured to use the TCP protcol (not HTTP, HTTP 2 and gRPC).
- Support for dynamic routing such as splits, custom routes, or redirects is not available.
- The `consul intention CLI` command is not supported. To manage intentions that specify services in peered clusters, use [configuration entries](/docs/connect/config-entries/service-intentions).
- [L7 permissions](/docs/connect/l7-traffic) are not supported.
- Configuring service failover across peers is not supported.
- Accessing key/value stores across peers is not supported.
- Consul datacenters that are already federated stay federated.
- Non-enterprise Consul instances cannot sync services with namespaces outside of the `default` namespace.