This page walks you through the process of creating a cluster using CockroachDB Serverless. 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.
Before you begin
If you haven't already, sign up for a CockroachDB Cloud account.
Organizations without billing information on file can only create one CockroachDB Serverless cluster.
Step 1. Start the cluster creation process
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.
If there are multiple organizations in your account, select the correct organization in the top right corner.
On the Overview page, click Create Cluster.
Step 2. Select a cloud provider & region
(Optional) Select a cloud provider (GCP or AWS) in the Cloud provider section.
(Optional) Select a region in the Regions section. For optimal performance, select the cloud provider region closest to the region in which you are running your application.
If you want to create a cluster in an unavailable region, please contact Support.
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. Set resource limits
Your cluster's resource limits 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.
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.
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.
Click Create cluster.
Your cluster will be created in a few seconds.
If the option to Start for free is still available to you, select Upgrade your resources instead.
Enter your Resource limits.
- 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.
- 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.
Click Next: Payment.
Verify your cluster configuration and resource limits.
Note:The cost displayed does not include taxes.
Add your preferred payment method.
Click Create cluster.
Your cluster will be created in a few seconds.
What's next
- Connect to your CockroachDB Serverless cluster
- Authorize users
- Learn CockroachDB SQL.
- Explore our example apps for examples on how to build applications using your preferred driver or ORM and run it on CockroachDB.
- Migrate your existing data.
- Build a simple CRUD application in Go, Java, Node.js, or Python.
- For examples of applications that use free CockroachDB Cloud clusters, check out the following Hack the North projects: