Create a CockroachDB Dedicated Cluster

On this page Carat arrow pointing down

This page walks you through the process of creating a CockroachDB Dedicated cluster. Note that only CockroachDB Cloud Org Administrators or users with Cluster Creator / Cluster Admin roles assigned at organization scope can create clusters. If you are a Developer and need to create a cluster, contact your CockroachDB Cloud Administrator.

Tip:

To create and connect to a 30-day free CockroachDB Dedicated cluster and run your first query, see the Quickstart.

Step 1. Start the cluster creation process

  1. If you haven't already, sign up for a CockroachDB Cloud account.

    Note:
    We recommend that CockroachDB Cloud Console users log in with Single Sign-On (SSO), optionally with two-factor authentication (2FA) enabled for the SSO provider. This prevents potential attackers from using stolen credentials to access or tamper with your critical data.

    CockroachDB Cloud Basic SSO supports SSO with GitHub, Google, and Microsoft. Cloud Organization SSO provides additional configuration and flexibility, and includes support for OIDC or SAML protocols, autoprovisioning, and limiting the email domains that can use a given authentication method.

    Visit your CockroachDB Cloud Console's account settings page and switch to SSO to improve the security of your cluster.

  2. Log in to your CockroachDB Cloud account.

  3. If there are multiple organizations in your account, select the correct organization in the top right corner.

  4. On the Overview page, click Create Cluster.

  5. Select the Dedicated standard or Dedicated advanced plan.

Note:

CockroachDB Dedicated advanced clusters have access to features required for PCI readiness in addition to all CockroachDB Dedicated standard features. You must be a contract customer to create a CockroachDB Dedicated advanced cluster. For more information, contact us.

Step 2. Select the cloud provider

In the Cloud provider section, select either Google Cloud or AWS as your preferred cloud provider.

Note:

You do not need an account with the cloud provider you choose in order to create a cluster on that cloud provider. The cluster is created on infrastructure managed by Cockroach Labs. If you have existing cloud services on either GCP or AWS that you intend to use with your CockroachDB Dedicated cluster, you should select that cloud provider and the region closest to your existing cloud services to maximize performance.

CockroachDB Cloud GCP clusters use N1 standard machine types and Persistent Disk storage. AWS clusters use M5 instance types and Elastic Block Store (EBS).

For GCP clusters, each GiB of storage costs $0.0011986 per hour, and 30 IOPS per GiB are provisioned. For AWS clusters, each GiB of storage costs $0.0005088 per hour, and 15 IOPS per GiB are provisioned at an additional cost of $0.0000196 per IOPS per hour.

For a pricing comparison of compute power, refer to the following table:

Compute GCP Pricing (per node, per hour) AWS Pricing (per node, per hour)
2 vCPU $0.43 $0.50
4 vCPU $0.71 $0.90
8 vCPU $1.18 $1.60
16 vCPU $2.30 $3.11
32 vCPU $4.20 $5.34

Step 3. Select the region(s)

In the Regions & nodes section, select a region. For optimal performance, select the cloud provider region in which you are running your application. For example, if your application is deployed in GCP's us-east1 region, select us-east1 for your CockroachDB Dedicated cluster.

To create a multi-region cluster, click Add regions until you have the desired number of regions.

Note:

Multi-region clusters must contain at least 3 regions to ensure that data spread across regions can survive the loss of one region. See Planning your cluster for the requirements and recommendations for CockroachDB Dedicated cluster configuration.

Known issue: We had to temporarily disable the following GCP regions due to GCP's quota restrictions:

  • Mumbai (asia-south1)
  • Osaka (asia-northeast2)
  • Hamina (europe-north1)
  • Frankfurt (europe-west3)
  • Zurich (europe-west6)

If you want to create a cluster in a disabled or unavailable region, please contact Support.

Step 4. Select the number of nodes

In the Regions & nodes section, select the number of nodes.

  • For single-region application development and testing, you may create a 1 node cluster.
  • For single-region production deployments, we recommend a minimum of 3 nodes. The number of nodes also depends on your storage capacity and performance requirements. See Example for further guidance.
  • For multi-region deployments, we require a minimum of 3 nodes per region. For best performance and stability, you should use the same number of nodes in each region.
  • See Plan a CockroachDB Cloud cluster for the requirements and recommendations for CockroachDB Dedicated cluster configuration.
Note:

CockroachDB Cloud does not support scaling a multi-node cluster down to a single node.

Currently, you can add a maximum of 150 nodes to your cluster. For larger configurations, contact us.

Step 5. Select the hardware per node

The choice of hardware per node determines the cost, throughput, and performance characteristics of your cluster.

  1. Select the Compute.

    When selecting your compute power, consider the following factors:

    Factor Description
    Transactions per second Each vCPU can handle around 1000 transactions per second. For example, 2 vCPUs can handle 2000 transactions per second and 4 vCPUs can handle 4000 transactions per second.
    Scaling When scaling up your cluster, it is generally more effective to increase node size up to 16 vCPUs before adding more nodes. For most production applications, we recommend at least 4 to 8 vCPUs per node.
  2. Select the Storage.

    Warning:

    Storage space cannot be removed from a node once added.

    We recommending choosing up to 320 GiB per vCPU . See Step 2 for pricing information. When selecting your storage capacity, consider the following factors:

    Factor Description
    Capacity Total raw data size you expect to store without replication.
    Replication The default replication factor for a CockroachDB Cloud cluster is 3.
    Buffer Additional buffer (overhead data, accounting for data growth, etc.). If you are importing an existing dataset, we recommend you provision at least 50% additional storage to account for the import functionality.
    Compression The percentage of savings you can expect to achieve with compression. With CockroachDB's default compression algorithm, we typically see about a 40% savings on raw data size.

    For more detailed disk performance numbers, see the relevant GCP and AWS documentation.

To change the hardware configuration after the cluster is created, see Manage a CockroachDB Dedicated Cluster.

See the Example for further guidance.

Step 6. Name the cluster

The cluster name must be 6-20 characters in length, and can include lowercase letters, numbers, and dashes (but no leading or trailing dashes).

Click Next. Optionally, you can enable VPC peering for your cluster.

Step 7. Enable VPC Peering (optional)

VPC peering is only available for GCP clusters. For AWS clusters, you can set up AWS PrivateLink after creating your cluster.

Note:

If you have multiple clusters, you will have to create a new VPC Peering or AWS PrivateLink connection for each cluster.

You can use VPC peering to connect your GCP application to the CockroachDB Cloud cluster. To enable VPC peering:

  1. Under Additional Settings, toggle the VPC Peering switch to Yes.
  2. Configure the IP address range and size (in CIDR format) for the CockroachDB Cloud network based on the following considerations:

    • As per GCP's overlapping subnets restriction, configure an IP range that doesn't overlap with the IP ranges in your application network.
    • The IP range and size cannot be changed after the cluster is created. Configuring a smaller IP range size may limit your ability to expand into multiple regions in the future. We recommend configuring an IP range size of /16 or lower.

      Alternatively, you can use CockroachDB Cloud's default IP range and size (172.28.0.0/14) as long as it doesn't overlap with the IP ranges in your network.

      To use the default IP range, select Use the default IP range. To configure your own IP range, select Configure the IP range and enter the IP range and size in CIDR format.

      Note:

      Custom IP ranges are temporarily unavailable for multi-region clusters.

  3. Click Next.

    Once your cluster is created, see Establish VPC Peering or AWS PrivateLink to finish setting up VPC Peering for your cluster.

Step 8. Enter billing details

  1. On the Summary page, verify your selections for the cloud provider, region(s), number of nodes, and the hardware configuration per node.
  2. Verify the hourly estimated cost for the cluster.
    Note:
    The cost displayed does not include taxes.
    You will be billed monthly.
  3. Add your preferred payment method.
  4. If applicable, the 30-day trial code is pre-applied to your cluster.
    Note:
    Make sure that you delete your trial cluster before the trial expires. Your credit card will be charged after the trial ends. You can check the validity of the code on the Billing page.
  5. Click Create cluster.

Your cluster will be created in approximately 20-30 minutes.

What's next

To start using your CockroachDB Cloud cluster, see the following pages:

If you created a multi-region cluster, it is important to carefully choose:

Not doing so can result in unexpected latency and resiliency. For more information, see the Multi-Region Capabilities Overview.


Yes No
On this page

Yes No