Repository navigation
docs: distributed topology through replica clusters - #5133
Conversation
|
❗ By default, the pull request is configured to backport to all release branches.
|
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
3 similar comments
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
2 similar comments
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
There was a problem hiding this comment.
This paragraph confuses me.
We start by saying
(1) that with only two data centers available, a sing Kubernetes cluster is the only way
And then in the end we say that the user must create two Kubernetes clusters in active/passive.
So, it seems, we go back on (1)
I think there are three different points:
1 - with two data centers in the same AZ, only a single k8s cluster is viable
2 - two data centers in separate AZs are not enough to create an HA K8s cluster
3 - if you do have two data centers in different AZs, then you have to create two K8s clusters
There was a problem hiding this comment.
I read it fine:
- if you have two DCs with low latency
- you can't create a single K8s cluster that covers both, you'd need three DCs (AZs)
- therefore, you must have two single AZ K8s clusters, an active one and a passive one
And the following hint explain that you may have taken the decision too early, before knowing the implications.
Although I would pluralise the beginning of the sentence. I think that it makes a bit clearer that the k8s clusters must be 2.
| A single availability zone Kubernetes cluster is the only viable option when | |
| only **two data centers** are available within reach of a low-latency | |
| connection (typically in the same metropolitan area). Having only two zones | |
| prevents the creation of a multi-availability zone Kubernetes cluster, which | |
| requires a minimum of three zones. As a result, users must create two separate | |
| Kubernetes clusters in an active/passive configuration, with the second cluster | |
| primarily used for Disaster Recovery (see the [replica cluster feature](replica_cluster.md)). | |
| Single availability zone Kubernetes clusters are the only viable option when | |
| only **two data centers** are available within reach of a low-latency | |
| connection (typically in the same metropolitan area). Having only two zones | |
| prevents the creation of a multi-availability zone Kubernetes cluster, which | |
| requires a minimum of three zones. As a result, users must create two separate | |
| Kubernetes clusters in an active/passive configuration, with the second cluster | |
| primarily used for Disaster Recovery (see the [replica cluster feature](replica_cluster.md)). |
There was a problem hiding this comment.
not sure this is helpful. We add it here but then don't explain what these things mean, and while <CLUSTER_NAME> is something all CNPG users will be familiar with, what is meant by <SOURCE>?
So, I think it's better to say less here and refer earlier to the replica cluster document.
There was a problem hiding this comment.
👍
Although the change in the behaviour of enabled should be here, so a bit of context should remain.
There was a problem hiding this comment.
what happens if the externalClusters are not identical?
There was a problem hiding this comment.
That it will be hell maintaining the clusters. Although nothing will force the sections to be identical, they could be managed by different operators, in different clusters.
We could "strongly suggest".
There was a problem hiding this comment.
IMO "craft" is a bit rich.
| Leverage replica clusters to craft [distributed database topologies](replica_cluster.md#distributed-topology) | |
| Leverage replica clusters to create [distributed database topologies](replica_cluster.md#distributed-topology) |
There was a problem hiding this comment.
Regions here is a bit overloaded. The replica switchover could conceivably be done in a single
k8s across data centers, and in any case using streaming.
So I think the point is "it can be done even without streaming replication", no?
| This setup can efficiently operate across two or more regions, using only | |
| object stores for replication, and guarantees a maximum RPO (Recovery Point | |
| Objective) of 5 minutes. This advanced feature is uniquely provided by | |
| This setup can efficiently operate across two or more availability zones, | |
| can rely entirely on object stores for replication, and guarantees a | |
| maximum RPO (Recovery Point | |
| Objective) of 5 minutes. This advanced feature is uniquely provided by |
There was a problem hiding this comment.
We are talking about distributed topologies. It makes sense to talk about regions. Availability zones are already covered by a single cluster with anti-affinity.
The "can rely entirely on object stores for replication" make sense.
There was a problem hiding this comment.
IMO "separate" and "other" used together cause confusion.
| A replica cluster is a separate CloudNativePG `Cluster` resource designed to | |
| replicate data from another PostgreSQL instance, ideally also managed by | |
| CloudNativePG. | |
| A replica cluster is a CloudNativePG `Cluster` resource designed to | |
| replicate data from another PostgreSQL instance, ideally also managed by | |
| CloudNativePG. |
There was a problem hiding this comment.
| 2. **WAL Archive**: Utilize the WAL (Write-Ahead Logging) archive stored in an | |
| 2. **WAL Archive**: Use the WAL (Write-Ahead Logging) archive stored in an |
There was a problem hiding this comment.
| object store. WAL files are regularly transferred from the source to the object | |
| object store. WAL files are regularly transferred from the source cluster to the object |
There was a problem hiding this comment.
My brain is twisted at this point.
The south cluster will use the cluster-eu-central as source, but the storage for cluster-eu-central is in the south.
So, we do a crossing here, and then we do another crossing in the replica section below.
But, the storage for the south cluster is likely in the south, no?
There was a problem hiding this comment.
| When the primary PostgreSQL cluster is shut down, write operations are no | |
| longer possible. CloudNativePG then: | |
| When the primary PostgreSQL cluster is demoted, write operations are no | |
| longer possible. CloudNativePG then: |
There was a problem hiding this comment.
Mechanically, there is a shutdown, because it needs one to restart as a replica. But we are talking about demotions, so 👍
There was a problem hiding this comment.
yikes. I hope we offer a plugin command to handle making this change safely
There was a problem hiding this comment.
yes, we need to create a kubectl cnpg subcommand for this
There was a problem hiding this comment.
Broken link:
| environments, thanks to its [distributed topology](distributed_topology.md) | |
| environments, thanks to its [distributed topology](replica_cluster.md#distributed-topology) |
There was a problem hiding this comment.
I read it fine:
- if you have two DCs with low latency
- you can't create a single K8s cluster that covers both, you'd need three DCs (AZs)
- therefore, you must have two single AZ K8s clusters, an active one and a passive one
And the following hint explain that you may have taken the decision too early, before knowing the implications.
Although I would pluralise the beginning of the sentence. I think that it makes a bit clearer that the k8s clusters must be 2.
| A single availability zone Kubernetes cluster is the only viable option when | |
| only **two data centers** are available within reach of a low-latency | |
| connection (typically in the same metropolitan area). Having only two zones | |
| prevents the creation of a multi-availability zone Kubernetes cluster, which | |
| requires a minimum of three zones. As a result, users must create two separate | |
| Kubernetes clusters in an active/passive configuration, with the second cluster | |
| primarily used for Disaster Recovery (see the [replica cluster feature](replica_cluster.md)). | |
| Single availability zone Kubernetes clusters are the only viable option when | |
| only **two data centers** are available within reach of a low-latency | |
| connection (typically in the same metropolitan area). Having only two zones | |
| prevents the creation of a multi-availability zone Kubernetes cluster, which | |
| requires a minimum of three zones. As a result, users must create two separate | |
| Kubernetes clusters in an active/passive configuration, with the second cluster | |
| primarily used for Disaster Recovery (see the [replica cluster feature](replica_cluster.md)). |
There was a problem hiding this comment.
That it will be hell maintaining the clusters. Although nothing will force the sections to be identical, they could be managed by different operators, in different clusters.
We could "strongly suggest".
There was a problem hiding this comment.
👍
Although the change in the behaviour of enabled should be here, so a bit of context should remain.
There was a problem hiding this comment.
Maybe we should simply remove this and add it back when we rework delayed replica clusters
There was a problem hiding this comment.
We are talking about distributed topologies. It makes sense to talk about regions. Availability zones are already covered by a single cluster with anti-affinity.
The "can rely entirely on object stores for replication" make sense.
There was a problem hiding this comment.
Very disputed quote according to random people on internet 😄 , but the most similar documented one seems to be by Dwight Eisenhower (November 1957, "planning is everything").
There was a problem hiding this comment.
Mechanically, there is a shutdown, because it needs one to restart as a replica. But we are talking about demotions, so 👍
Document how to enable PostgreSQL distributed database topologies across Kubernetes clusters for hybrid and multi-cloud scenarios using replica clusters. With CloudNativePG, you can: - Declaratively control the primary PostgreSQL cluster. - Seamlessly demote the current primary and promote another cluster without re-cloning. The goal is to provide enough information to set up an environment across multiple regions with object stores for replication, guaranteeing a maximum RPO of 5 minutes, a unique feature of CloudNativePG. Rename the existing "Replica Cluster" feature to "Standalone Replica Cluster". Provide information on how to upgrade existing installations to the distributed topology strategy. Closes #5087 Signed-off-by: Gabriele Bartolini <[email protected]>
Signed-off-by: Francesco Canovai <[email protected]>
|
Build Error! No Linked Issue found. Please link an issue or mention it in the body using #<issue_id> |
|
/ok-to-merge no need for E2e tests, we changed only the documentation |
Closes #5087