Creating a distributed high-availability cluster

When using your cloud

Before creating your cluster, make sure you have enough resources. Without enough resources, your request to create a cluster fails.

When using BigAnimal's cloud

The following options aren't available when creating your cluster:

  • AWS IAM authentication
  • Superuser access
  • PgBouncer
  1. Sign in to the BigAnimal portal.

  2. On the Overview or Clusters page, select Create New > Database cluster.

  3. On the Create Cluster page, start with the Cluster Info tab.

Cluster Info tab

  1. Select the type of cluster to deploy.

    • Distributed High Availability creates a cluster, powered by EDB Postgres Distributed, with up to two data groups spread across multiple cloud regions to deliver higher performance and faster recovery.

    If you want to create a single-node or primary/standby high-availability cluster, follow the Single Node or Primary/Standby High Availability page.

    See Supported cluster types for more information about the different cluster types.

    Note

    You can't switch from a single-node or primary/standby high-availability cluster to a distributed high-availability cluster or vice versa.

  2. Select the type of cloud account for your cluster. You can choose BigAnimal's cloud account or set up your own. For more information, see Deployment options.

    Note

    If you use BigAnimal's cloud account, your estimated cloud infrastructure costs are calculated into your cluster's estimated monthly price shown at the bottom of the page.

  3. Select Next: Cluster Settings

Cluster Settings tab

  1. In the Cluster Name field, enter the name for your cluster.

  2. In the Password field, enter a password for your cluster. This is the password for the user edb_admin.

  3. Under Tags, select +.

  4. To assign an existing tag, in the search bar under Tags, enter a tag name. To add a new tag, instead select + Add Tag.

  5. Select Next: Data Groups.

Data Groups Tab

  1. Go to the Node Settings tab for the first Data Group. In the Nodes section, select Two Data Nodes or Three Data Nodes.

    For more information on node architecture, see Distributed high availability.

  2. In the Provider & Region section, select the cloud provider and region where you want to deploy your cluster.

    Tip

    For the best performance, we strongly recommend that this region be the same as your other resources that communicate with your cluster. For a list of available regions, see Supported regions. If you're interested in deploying a cluster to a region that isn't currently available, contact Support.

  3. In the Database Type section:

    1. Select the type of Postgres you want to use in the Postgres Type field:

    2. In the Postgres Version list, select the version of Postgres that you want to use.

  4. In the Instance Type section:

    1. Select the category that works best for your applications and workload:

      • Memory optimized for large data sets
      • Compute optimized for compute bound applications
      • General purpose if you don't require memory or compute optimization
    2. Select the instance series and size. See Sizes for virtual machines in Azure, Amazon EC2 Instance Types, or the Google Cloud Machine families resource and comparison guide for information to help you choose the appropriate instance type.

      Note

      When provisioning a cluster, some CPU and memory resources are reserved for use by BigAnimal and your cloud provider. For example, when using Kubernetes, provisioning a server with 8GB of memory yields only about 6GB of memory after accounting for the requirements of Kubernetes and BigAnimal.

      Tip

      To maximize your disk size for AWS, select R5b as your instance and then io2 Block Express as your storage to get a maximum disk size of 64 TB and 256,000 IOPS.

  5. In the Storage section:

    Tip

    When choosing your storage options, for most workloads, consider using at least 20GB of storage.

    By default, the Database Storage volume stores the Postgres data and the write-ahead logs (WAL) together. If you want to improve write performance for WAL files, you can allocate separate storage volume for the WAL files. To allocate separate storage volume for WAL files, select Use a separate storage volume for Write-Ahead Logs. Then select the volume type, size, IOPS, and disk throughput separately for Database Storage and Write-Ahead Logs Storage. If you allocate separate storage volume for the WAL files, you have to pay cloud infrastructure costs for the second volume. Once separate storage volume is allocated for WAL files, you can't remove it from the cluster settings later on.

    From the Volume Type list, select your volume type.

    Azure

    For Azure, in Volume Type, select Premium SSD or Ultra Disk. Compared to Premium SSD volumes, ultra disks offer lower-latency, high-performance options and direct control over your disk's input/output operations per second (IOPS). For BigAnimal, we recommend using ultra disks for workloads that require the most demanding performance. See Using Azure ultra disks for more information.

    • For Premium SSD, in Volume Properties, select the type and amount of storage needed for your cluster. See Azure Premium SSD storage types for more information.

    • For ultra disk, in Volume Properties, select the disk size and IOPS for your cluster. BigAnimal calculates disk throughput based on your IOPS settings, but you have the option of updating the value.

    Important

    While setting the required IOPS for the disk that you selected, consider the VM limits that are tied to the VM size that you selected. See Ultra disk IOPS for more information.

    AWS

    For AWS, in Volume Type, select General Purpose SSD (GP3), io2, or io2 Block Express.

    Note

    io2 Block Express is available for selected instance types, such as R5b. However, you can't switch between io2 and io2 Block Express after creating your cluster.

    In Volume Properties, select the disk size for your cluster, and configure the IOPS.

    GCP

    For Google Cloud, in Volume Type, select SSD Persistent Disk.

    In Volume Properties, select the disk size for your cluster.


    Note for all cloud providers

    When provisioning database storage, not all of the storage space you specify is available for holding your data. Some space is reserved for other purposes. For a full explanation of the structure of a Postgres data directory, see Database File Layout. You can make more storage space available for data if you specify separate storage for WAL.

  6. In the Networking section:

    In Connectivity Type, specify whether to use private or public networking. Networking is set to Public by default. Public means that any client can connect to your cluster's public IP address over the internet. Optionally, you can limit traffic to your public cluster by specifying an IP allowlist, which allows access only to certain blocks of IP addresses. To limit access, tick the Use allowlists box and add one or more classless inter-domain routing (CIDR) blocks. CIDR is a method for allocating IP addresses and IP routing to a whole network or subnet. If you have any CIDR block entries, access is limited to those IP addresses. If none are specified, all network traffic is allowed.

    Private networking allows only IP addresses in your private network to connect to your cluster.

    If you're using private networking and you're using BigAnimal's cloud account, you must enter your cloud service provider's account information. BigAnimal uses it to auto-approve your private endpoints and also to provide access for logging and telemetry. To enable you to create your private endpoint, BigAnimal provides you with the corresponding service name, which you can use to connect to your cluster privately.

    See Cluster networking architecture for more information.

  7. In the Backups section:

    Change the default database backup retention period of 30 days using the Retention Period controls. You can configure the retention period to a number of days, weeks, or months. The retention period must be between 1-180 days, 1-25 weeks, or 1-6 months.

    BigAnimal deletes backups older than the retention period.

  8. In the Maintenance section:

    The Custom Maintenance Window is enabled and set for a weekly 60-minute maintenance window in which maintenance upgrades occur for the cluster. You can change the maintenance window to a time that works best for you.

    Note

    Typically, maintenance updates take only a few minutes to complete.

    For more information, see Periodic maintenance.

  9. In the Connections section:

    When enabled, the Read-only Workloads option configures a connection string you can use for read-only operations to lighten the workload on the write leader and improve the cluster's performance.

    See Read-only workloads for more information.

  10. Select Next: DB Configuration

  11. In the Parameters section on the DB Configuration tab, you can update the value of the database configuration parameters for the data group as needed.

    To update the parameter values, see Modifying your database configuration parameters.

  12. Select Create: Data Group. The data group preview appears.

  13. If you want to create a second data group, select Add a Data Group. To finish creating your cluster, select Create Cluster.

Creating a second data group

After creating the first data group, you can create a second data group for your distributed high-availability cluster by selecting Add a Data Group before you create the cluster.

By default, the settings for your first data group populate the second data group's settings. However, you can change certain settings if you want to. Just know that your changes can change the settings for the entire cluster. That being said, the database type and cloud provider must be consistent across both data groups.

The data groups and the witness group must all be in different regions. Otherwise, you can choose the second data group's settings as needed.

When choosing the number of data nodes for the second data group, see Distributed high availability for information on node architecture.

Note

To maintain high availability, BigAnimal doesn't allow the maintenance windows of data groups to overlap.

What’s next

After you create your cluster, use these resources to learn about cluster use and management:

For information on related CLI commands, see: