Create a CockroachDB Serverless Cluster

On this page Carat arrow pointing down

This page guides you through the process of creating a cluster using CockroachDB Serverless. Only CockroachDB Cloud Org Administrators or users with Cluster Creator / Cluster Admin roles assigned at organization scope can create clusters. If you need to create a cluster and do not have one of the required roles, contact your CockroachDB Cloud Administrator.

Before you begin

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

Note:

Organizations without billing information on file can only create one CockroachDB Serverless cluster.

Step 1. Start the cluster creation process

  1. Log in to your 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. If there are multiple organizations in your account, select the correct organization in the top right corner.

  3. On the Overview page, click Create Cluster.

  4. On the Select a plan page, select Serverless.

Step 2. Select the cloud provider

On the Cloud & Regions page, select a cloud provider (GCP or AWS) in the Cloud provider section. Creating a Serverless cluster on Azure is not supported.

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 Serverless cluster, you should select that cloud provider and the region closest to your existing cloud services to maximize performance.

Step 3. Select the regions

In the Regions section, select a region for the cluster. Refer to CockroachDB Cloud Regions for the regions where CockroachDB Serverless clusters can be deployed.

For optimal performance, select the cloud provider and region nearest to where your SQL clients, applications, or external data are located. For multi-region clusters, CockroachDB will optimize access to data from the Primary region. Refer to Plan a CockroachDB Serverless Cluster to learn more. To express interest in additional regions, contact Support or your Cockroach Labs account team.

To create a multi-region cluster, click Add regions and select additional regions. A cluster can have at most six regions.

Note:

You cannot currently remove regions once they have been added.

After creating a multi-region cluster deployed on AWS, you can optionally set up AWS PrivateLink (Limited Access) so that incoming connections to your cluster from applications or services running in your AWS account flow over private AWS network infrastructure rather than the public internet.

Private connectivity is not available for Serverless clusters on GCP.

Click Next: Capacity.

Step 4. Configure cluster capacity

Your cluster's capacity dictates its resource limits, which are the maximum amount of storage and RUs you can use in a month. If you reach your storage limit, your cluster will be throttled and you may only be able to delete data. If you reach your RU limit, your cluster will be disabled until the end of the billing cycle unless you raise the limit.

All CockroachDB Cloud organizations get 50M RUs and 10 GiB of storage for free each month. Free resources can be spent across all CockroachDB Serverless clusters in an organization. You can set higher resource limits to maintain a high level of performance with larger workloads. You will only be charged for what you use.

The best way to estimate your resource usage is to set resource limits you're comfortable with and run your workload. You can see the RUs and storage your cluster has used in the Usage this month section of the Cluster Overview page. Once enough usage data is available, you can also see a graph of your monthly resource usage and recommended spend limit on the Edit cluster page.

A typical SELECT query consumes between 1 and 15 RUs, depending on the amount of data it scans and returns. A typical INSERT or UPDATE statement consumes between 10 and 25 RUs, depending on the amount of data it inserts or updates. To estimate the RU consumption of individual SQL statements, you can use the EXPLAIN ANALYZE SQL statement. For an example, see Example Request Unit calculation. For more information, see Planning your cluster.

  1. On the Capacity page, select the Start for free option.

    Note:

    This will only be available if you haven't already created a free CockroachDB Serverless cluster or set up billing information.

  2. Click Next: Finalize.

  1. On the Capacity page, if the option to Start for free is still available to you, select Upgrade your capacity instead.

  2. Configure On-Demand capacity.

    • If you select Unlimited, your cluster will scale to meet your application's needs. You will only be charged for the resources you use.
    • If you select Set a monthly limit, you can set storage and RU limits individually, or enter a dollar amount that will be split automatically between both resources. You will only be charged for the resources you use.
  3. Click Next: Finalize.

Step 5. Enter billing details

  1. On the Finalize page, verify your cluster and capacity capacity configuration.

    Note:

    The cost displayed does not include taxes and provides a maximum cost estimate. Your final bill will reflect your actual usage.

  2. If you haven't already, add your preferred payment method.

Step 6. Name the cluster

The cluster is automatically given a randomly-generated name. If desired, change the cluster's name. The cluster name must be 6-20 characters in length, and can include lowercase letters, numbers, and dashes (but no leading or trailing dashes). A cluster's name cannot be edited after it is created.

Click Create cluster. Your cluster will be created in a few seconds.

Video demo

To learn the basics of multi-region Serverless clusters, watch the following video:

What's next


Yes No
On this page

Yes No