CREATE CLUSTER REPLICA

CREATE CLUSTER REPLICA provisions a new replica for an unmanaged cluster.

💡 Tip: When getting started with Materialize, we recommend starting with managed clusters.

Conceptual framework

A cluster consists of zero or more replicas. Each replica of a cluster is a pool of compute resources that performs exactly the same computations on exactly the same data.

Using multiple replicas of a cluster facilitates fault tolerance. Clusters with multiple replicas can tolerate failures of the underlying hardware or network. As long as one replica remains reachable, the cluster as a whole remains available.

Syntax

CREATE CLUSTER REPLICA cluster_name . replica_name ( option = value , )
Field Use
cluster_name The cluster you want to attach a replica to.
replica_name A name for this replica.

Options

Field Value Description
SIZE text The size of the replica. For valid sizes, see Size.
AVAILABILITY ZONE text The availability zone of the underlying cloud provider in which to provision the replica. You must specify an AWS availability zone ID in either us-east-1, eu-west-1, or us-west-2, e.g. use1-az1. Note that you must use the zone’s ID, not its name.

Details

Size

The SIZE option for replicas is identical to the SIZE option for clusters option, except that the size applies only to the new replica.

Cluster size Compute Credits/Hour Total Capacity Notes
M.1-nano 0.75 26 GiB
M.1-micro 1.5 53 GiB
M.1-xsmall 3 106 GiB
M.1-small 6 212 GiB
M.1-medium 9 318 GiB
M.1-large 12 424 GiB
M.1-1.5xlarge 18 636 GiB
M.1-2xlarge 24 849 GiB
M.1-3xlarge 36 1273 GiB
M.1-4xlarge 48 1645 GiB
M.1-8xlarge 96 3290 GiB
M.1-16xlarge 192 6580 GiB Available upon request
M.1-32xlarge 384 13160 GiB Available upon request
M.1-64xlarge 768 26320 GiB Available upon request
M.1-128xlarge 1536 52640 GiB Available upon request

Materialize offers the following legacy cc cluster sizes:

💡 Tip:

In most cases, you should not use legacy sizes. M.1 sizes offer better performance per credit for nearly all workloads. We recommend using M.1 sizes for all new clusters, and recommend migrating existing legacy-sized clusters to M.1 sizes. Materialize is committed to supporting customers during the transition period as we move to deprecate legacy sizes.

The legacy size information is provided for completeness.

  • 25cc
  • 50cc
  • 100cc
  • 200cc
  • 300cc
  • 400cc
  • 600cc
  • 800cc
  • 1200cc
  • 1600cc
  • 3200cc
  • 6400cc
  • 128C
  • 256C
  • 512C

The resource allocations are proportional to the number in the size name. For example, a cluster of size 600cc has 2x as much CPU, memory, and disk as a cluster of size 300cc, and 1.5x as much CPU, memory, and disk as a cluster of size 400cc. To determine the specific resource allocations for a size, query the mz_cluster_replica_sizes table.

WARNING! The values in the mz_cluster_replica_sizes table may change at any time. You should not rely on them for any kind of capacity planning.

Clusters of larger sizes can process data faster and handle larger data volumes.

See also:

Homogeneous vs. heterogeneous hardware provisioning

Because Materialize uses active replication, all replicas will be instructed to do the same work, irrespective of their resource allocation.

For the most stable performance, we recommend using the same size and disk configuration for all replicas.

However, it is possible to use different replica configurations in the same cluster. In these cases, the replicas with less resources will likely be continually burdened with a backlog of work. If all of the faster replicas become unreachable, the system might experience delays in replying to requests while the slower replicas catch up to the last known time that the faster machines had computed.

Example

CREATE CLUSTER REPLICA c1.r1 (SIZE = 'M.1-large');

Privileges

The privileges required to execute this statement are:

  • Ownership of the cluster.

See also

Back to top ↑