-
Notifications
You must be signed in to change notification settings - Fork 469
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DOC-75] Document guidance for hybrid and multi-cloud #19123
Open
mdlinville
wants to merge
13
commits into
main
Choose a base branch
from
DOC-75
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
2681da8
[DOC-75] Document guidance for hybrid and multi-cloud
mdlinville 0ede0e0
Mike B's feedback
mdlinville 6a71e1b
Merge branch 'main' into DOC-75
mdlinville a556ec9
Apply suggestions from code review
mdlinville a8c03e2
Update src/current/_includes/common/hybrid-multi-cloud.md
mdlinville 34eb00a
Merge branch 'main' into DOC-75
mdlinville 13354a4
Merge branch 'main' into DOC-75
mdlinville e8b4099
Merge branch 'main' into DOC-75
mdlinville 4fc213d
Merge branch 'main' into DOC-75
mdlinville b666e89
Michael's feedback
mdlinville 62e2e48
Merge remote-tracking branch 'origin/main' into DOC-75
mdlinville a8c4130
Adjust TOCs
mdlinville a8c699d
Merge branch 'main' into DOC-75
mdlinville File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
This page provides information about hybrid and multi-cloud self-hosted deployments of CockroachDB. Each of these types of deployments can help an organization to meet its service-level and disaster recovery objectives. | ||
|
||
- In a _hybrid deployment_, a cluster's nodes are deployed in a combination of infrastructure you manage, private cloud provider infrastructure, and public cloud provider infrastructure. | ||
- In a _multi-cloud deployment_, a cluster's nodes are deployed in multiple cloud providers' public or private infrastructure. | ||
|
||
Often, the two terms are used interchangeably. | ||
|
||
A hybrid or multi-cloud deployment can help you to: | ||
|
||
- Power a single application with data stored across multiple clouds. | ||
- Use data that is created in one cloud to perform analysis in another cloud without having to move data manually. | ||
- Enhance the mobility of applications by being able to move them from one cloud to another. | ||
- Protect against a single cloud provider outage becoming a single point of failure (SPOF). | ||
|
||
Hybrid and multi-cloud deployments are more complex to manage than a simpler deployment. Without care, this type of deployment may experience increased latency, because most cloud providers optimize their networks to minimize network latency for traffic that stays within their infrastructure. In addition, these deployments may incur additional costs for network traffic that egresses from the cloud provider's infrastructure. | ||
|
||
{{site.data.alerts.callout_success}} | ||
CockroachDB makes no distinction between a deployment in a single cloud provider, a hybrid deployment, and a multi-cloud deployment. | ||
{{site.data.alerts.end}} | ||
|
||
This page provides information to help you decide if a hybrid or multi-cloud deployment is appropriate for your workload, and to optimize the performance of this type of deployment. | ||
|
||
{{site.data.alerts.callout_info}} | ||
CockroachDB {{ site.data.products.cloud }} does not support hybrid or multi-cloud deployments. | ||
{{site.data.alerts.end}} | ||
|
||
## Configure a hybrid or multi-cloud deployment | ||
|
||
To set up a hybrid or multi-cloud deployment: | ||
|
||
- **Each node must be able to communicate with and route traffic to each of the cluster's other nodes** using the hostnames or IP addresses referenced by the `--join` flag of the [`cockroach start`]({% link {{ page.version.version }}/cockroach-start.md %}) command. A node's network is configured at the level of the node's operating system. Nodes could be connected by peering cloud provider virtual private cloud (VPC) networks together, using a VPN, encrypted network tunnels, by a combination of routing and port forwarding, or using another mechanism. | ||
|
||
CockroachDB could route SQL client requests to any cluster node, regardless of where the client connection originates. | ||
- **There must be no overlapping IP address ranges** across the cluster. It is an error for multiple nodes to have the same IP address or to resolve to the same hostname. | ||
|
||
DNS name resolution is particularly complex in a Kubernetes deployment. We recommend that you replace `kube-dns` with Core DNS. Refer to [Deploy CockroachDB on GKE](https://github.com/mbookham7/crdb-multi-cloud-k8s/blob/master/markdown/5-deploy-cockroach.md) for details. | ||
- **In a multi-region Kubernetes deployment, we recommend that you use manifests**. Refer to [Deploy multi-cloud CockroachDB on GKE](https://github.com/mbookham7/crdb-multi-cloud-k8s/blob/master/markdown/5-deploy-cockroach.md) for details. | ||
- **Each node deployed in the same environment must indicate this using locality tags** to ensure that the cluster's replicas are spread across deployment environments and to prevent single points of failure or hot spots. To specify a node's locality, pass the `--locality` flag when [starting a node]({% link {{ page.version.version }}/cockroach-start.md %}). This flag accepts an arbitrary set of key-value pairs that describe the location of the node. | ||
|
||
If nodes are deployed in multiple regions within the same cloud provider, specify the region as an additional locality, to ensure that replicas are spread across regions in each cloud provider's infrastructure. | ||
|
||
For example: | ||
|
||
- If nodes are deployed in both Azure and Digital Ocean, you could set each node's locality to either `--locality data-center=azure` or `--locality data-center=digital-ocean`. | ||
- Nodes in the same data center but different regions could use the same value for a `datacenter` locality tag but a different value for a `region` locality tag. | ||
|
||
## Simulate an outage | ||
|
||
This section shows some ways to simulate an outage and validate disaster recovery procedures in a hybrid or multi-cloud deployment. These tests can help you verify that you have set up the nodes' locality tags correctly. | ||
|
||
- **To simulate a single-node outage**, you could forcibly shut down the `cockroach` process on the host or VM, such as by running `kill -9`, or you could disable the host's network interface. | ||
- **To simulate a single-region cloud-provider outage**, you could forcibly shut down the `cockroach` process on all hosts or VMs in that region on that cloud provider, you could disable their network interfaces, adjust routing or firewall rules, or make other networking adjustments to prevent nodes in one region from connecting to the cluster. | ||
- **To simulate a cloud-provider-wide outage**, you could forcibly shut down the `cockroach` process all hosts or VMs running in that cloud provider, you could disable their network interfaces, adjust routing or firewall rules, or make other networking adjustments to prevent nodes in that cloud provider from connecting to the cluster. | ||
|
||
As long as the cluster has enough available nodes to achieve quorum, queries will succeed during the simulated outage. | ||
|
||
{{site.data.alerts.callout_info}} | ||
If a node is offline for longer than the duration of the [cluster setting]({% link {{ page.version.version }}/cluster-settings.md %}) `server.time_until_store_dead` (5 minutes by default), the node's status changes to `DEAD` and the node's replicas will be moved to other nodes. After this point, if the node rejoins the cluster, it joins as a new node. | ||
{{site.data.alerts.end}} | ||
|
||
## See also | ||
|
||
- CockroachDB Blog posts: | ||
- [Why we need a multi-cloud database, and how to build one](https://www.cockroachlabs.com/blog/why-multicloud-database/) | ||
- [Multi-cloud demystified: pros, cons, and considerations according to the expert](https://www.cockroachlabs.com/blog/multi-cloud-report/) | ||
- [What is a multi-cloud database, and how to deploy one?](https://www.cockroachlabs.com/blog/multi-cloud-deployment/) | ||
- [Multi-cloud architecture: Three real-world examples from fintech](https://www.cockroachlabs.com/blog/fintech-multi-cloud-architecture/) | ||
- [Webinar: Going cloud-native across clouds](https://www.cockroachlabs.com/webinars/going-cloud-native-across-clouds-with-form3-/) | ||
- [Video: Navigating the Multi-Cloud Maze with CockroachDB](https://www.youtube.com/watch?v=3MdLIwFa_ns) | ||
- [CockroachDB multi-cloud Kubernetes deployment examples](https://github.com/mbookham7/crdb-multi-cloud-k8s) on GitHub | ||
- [Multi-cloud deep dive](https://dantheengineer.com/multi-cloud-database-deep-dive/) by a Cockroach Labs engineer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Hybrid and multi-cloud deployments | ||
summary: Learn about running a self-hosted cluster in a hybrid or multi-cloud deployment. | ||
toc: true | ||
docs_area: deploy | ||
--- | ||
|
||
{% include common/hybrid-multi-cloud.md %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Hybrid and multi-cloud deployments | ||
summary: Learn about running a self-hosted cluster in a hybrid or multi-cloud deployment. | ||
toc: true | ||
docs_area: deploy | ||
--- | ||
|
||
{% include common/hybrid-multi-cloud.md %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Hybrid and multi-cloud deployments | ||
summary: Learn about running a self-hosted cluster in a hybrid or multi-cloud deployment. | ||
toc: true | ||
docs_area: deploy | ||
--- | ||
|
||
{% include common/hybrid-multi-cloud.md %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: Hybrid and multi-cloud deployments | ||
summary: Learn about running a self-hosted cluster in a hybrid or multi-cloud deployment. | ||
toc: true | ||
docs_area: deploy | ||
--- | ||
|
||
{% include common/hybrid-multi-cloud.md %} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you state "In a k8s deployment, we recommend that you replace ..."
I think we want to make this doc generic (aka not kube specific)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do say "in a Kubernetes deployment" just before the "We" so I don't think this change would add much. WDYT?