Network Address Allocation
When you create a new cluster or data center (DC) with Instaclustr you specify a network address range that is used for Private IP addresses as instances are created. The network range is specified in CIDR format, which is a compact representation of a range of IP addresses (e.g.: 10.0.0.0/26). The CIDR basically takes an IP address and a network prefix length, which represents a range of IP addresses (also known as CIDR block).
The specified DC network is further divided into subnetworks which are allocated for racks.
The provided network must be part of the private address space or RFC6598 address spaces. The network must also have a network prefix between /16 to /26. This is to make sure the network supports at least 3 racks having at least 10 nodes each.
Subnetting of the Data Centre Network is done in the following way:
- Between 2 to 3 bits reserved for specifying the rack (so 4 to 8 racks per DC), each rack in 1 subnet:
- 2 bits = 4 total subnets–supports target replication factor of 2 and 3.
- 3 bits = 8 total subnets–supports target replication factor of 5.
- 6 reserved IPs:
- The maximum number of hosts per rack is the size of the selected subnet minus the number of reserved IPs.
- For example:
- for a /26 DC Network CIDR, with 3 rack cluster, supports a maximum 10 hosts per rack.
- for a /25 DC Network CIDR, with 3 rack cluster, supports a maximum 26 hosts per rack.
- for a /16 DC Network CIDR, with 3 rack cluster, supports a maximum 16,378 hosts per rack.
- For example:
These calculations are all displayed on our dashboard when you specify a network range before creating a cluster or adding a data center.
When you choose a specified network, please consider the following things:
- Private IP Cassandra clusters nodes can half the number of nodes available per rack (as they require the use of 2 private IPs per node when Instaclustr utilizes the Advanced Node Replace functionality).
- It is important that you select a network CIDR range that not only allows for your initial cluster size, but also substantial horizontal growth in the size of your cluster. Instaclustr is unable to add additional network space to an existing cluster.
- If you exhaust available network space, your options will be limited to vertically resizing the cluster, or to perform a cluster migration to a larger CIDR range.
Data center ranges are allocated sequentially by default or can be changed to a custom subnet when creating or adding a DC. So, if for example, you specified 10.223.120.0/25 as your data center range our system would suggest the following ranges when creating or adding data centers 10.223.120.128/25, 10.223.121.0/25, 10.223.121.128/25 … 10.223.127.128/25, or you may choose to specify your own.
If you want to connect to your cluster via these internal addresses then you must choose to create a Private Network Cluster, or use the Use private IPs broadcast for auto-discovery option on cluster creation. After that you will need to set up VPC peering to connect.