Partition by region

Use geo-partitioning to pin data to regions

Use partition-by-region clusters to geo-locate data in specific regions.

Clusters consist of a primary region and any number of additional secondary regions, where the partitioned, region-specific data resides. You can add or remove regions as required. When first deploying, you can deploy a single cluster in the primary region.

Tablespaces

You place data in regions of the cluster using tablespaces. Tables that don't belong to any tablespace are stored in the primary region.

YugabyteDB Managed automatically creates tablespaces in the regions of your cluster named region_name_ts. For example, if you add the us-central1 region, the tablespace is named us_central1_ts.

To view your cluster tablespaces, you can enter the following command:

SELECT * FROM pg_tablespace;

Note that data pinned to a single region via tablespaces is not replicated to other regions, and remains subject to the fault tolerance of the cluster (Node- or Availability Zone-level).

For more information on specifying data placement for tables and indexes, refer to Tablespaces.

Features

Partition-by-region clusters include the following features:

  • Multi node clusters with replication factor (RF) of 3, and availability zone- and node-level fault tolerance.
  • No limit on cluster size - choose any cluster size based on your use case.
  • Horizontal and vertical scaling - add or remove nodes and vCPUs, and add storage to suit your production loads.
  • VPC networking required.
  • Automated and on-demand backups.
  • Available in all regions.
  • Enterprise support.

Prerequisites

  • Must be deployed in a VPC. Create a VPC for each region where you want to deploy the nodes in the cluster. YugabyteDB Managed supports AWC and GCP for peering. Refer to Create a VPC Network.
  • Create a billing profile and add a payment method before you can create a Dedicated cluster. Refer to Manage your billing profile and payment method.

Create a partition-by-region cluster

To create a partition-by-region cluster, on the Clusters page, click Add Cluster, and choose Dedicated to start the Create Cluster wizard.

The Create Cluster wizard has the following pages:

  1. General Settings
  2. Cluster Setup
  3. Network Access
  4. DB Credentials

General Settings

Add Cluster Wizard - General Settings

Set the following options:

  • Cluster Name: Enter a name for the cluster.
  • Provider: Choose a cloud provider - AWS or GCP.
  • Database Version: By default, dedicated clusters are deployed using a stable release. Before deploying a production cluster using a preview release, contact Support. If you have arranged a custom build with Yugabyte, it is also be listed here.

Cluster Setup

Select Multi-Region Deployment and set the following options.

Select data distribution mode

Add Cluster Wizard - Partition by region data distribution

Set Data Distribution to Partition by region.

Select a Fault Tolerance for the regions. Fault tolerance determines how resilient each region is to node and cloud zone failures. Choose one of the following:

  • Availability Zone Level - a minimum of 3 nodes spread across multiple availability zones with a replication factor (RF) of 3. YugabyteDB can continue to do reads and writes even in case of a cloud availability zone failure. This configuration provides the maximum protection for a data center failure. Recommended for production deployments. For horizontal scaling, nodes are scaled in increments of 3.
  • Node Level - a minimum of 3 nodes deployed in a single availability zone with a RF of 3. YugabyteDB can continue to do reads and writes even in case of a node failure, but this configuration is not resilient to cloud availability zone outages. For horizontal scaling, you can scale nodes in increments of 1.
  • None - single node, with no replication or resiliency. Recommended for development and testing only.

Fault tolerance is applied to all regions in the cluster, including those added after cluster creation.

Select regions and node size

Add Cluster Wizard - Primary region and size

Regions - For each region, choose the following:

  • the region where the nodes will be located.
  • the VPC in which to deploy the nodes. Only VPCs using the selected cloud provider and available in the selected region are listed. For multi-region GCP clusters, the same VPC is used for all regions. VPCs must be created before deploying the cluster. Refer to VPC networking.
  • the number of nodes to deploy in the regions; each region has the same number of nodes.

To add additional regions to the cluster, click Add Region.

Node size - enter the number of virtual CPUs per node and the disk size per node (in GB).

Partiton-by-region clusters support both horizontal and vertical scaling; you can add regions and change the cluster configuration after the cluster is created using the Edit Configuration settings. Refer to Scale and configure clusters.

Monthly total costs for the cluster are based on the number of vCPUs and estimated automatically. + Usage refers to any potential overages from exceeding the free allowances for disk storage, backup storage, and data transfer. For information on how clusters are costed, refer to Cluster costs.

Network Access

YugabyteDB Managed only allows access to clusters from trusted IP addresses. For applications in peered VPCs to be able to connect, you need to add the CIDR of the peered VPC to the cluster IP allow list. You can also assign IP allow lists to your cluster any time after the cluster is created.

Add Cluster Wizard - Network Access

You can add IP addresses using any combination of the following options.

Option Description
Add Current IP Address Creates an allow list using the public IP address of your computer and adds it to the cluster IP allow list.
Add Peered VPC Networks Only available for clusters being deployed in a VPC. VPCs must be peered, and the peering connection active for the peered networks to be added to the IP allow list.
Choose Add All Peered Networks to create an IP allow list from every network peered with the cluster VPC, and add it to the cluster.
Choose Add Individual Peered Networks to select specific peered networks to add to the cluster IP allow list.
Add Existing IP Allow List Choose from a list of IP allow lists already created for your account.
Create New IP Allow List Create a new IP allow list and manually enter the CIDR and public IP addresses.

Enable Public Access for this Cluster - To connect to a cluster deployed in a VPC from a public IP address (including your current address), you must enable Public Access for the cluster. When enabled, a public IP address is added to each region of the cluster. You can view the private and public host addresses under Connection Parameters on the cluster Settings tab.

Database Credentials

The database admin credentials are required to connect to the YugabyteDB database that is installed on the cluster.

You can use the default credentials generated by YugabyteDB Managed, or add your own.

For security reasons, the admin user does not have YSQL superuser privileges, but does have sufficient privileges for most tasks. For more information on database roles and privileges in YugabyteDB Managed, refer to Database authorization in YugabyteDB Managed clusters.

After the cluster is provisioned, you can add more users and change your password.

Add Cluster Wizard - Database credentials

Download the credentials, and click Create Cluster.

Important

Save your database credentials. If you lose them, you won't be able to use the database.

After you complete the wizard, the Clusters page appears, showing the provisioning of your new cluster in progress.

When the cluster is ready, the cluster Overview tab is displayed.

You now have a fully configured YugabyteDB cluster provisioned in YugabyteDB Managed with the database admin credentials you specified.

Next steps