Network Address Allocation

When you create a new cluster with Instaclustr you specify a network address range that is used for internal IP address as instances are created. If you want to connect to your cluster via this internal addresses then you must choose the "Use private IP addresses for node discovery" option on cluster creation and then set up VPC peering to connect (in AWS - contact support for other environments).

This article explains how we divide up the specified network range to do determine the IPs allocated to each node as they are created (which might be important for your network planning).

The network range in specified in CIDR format (https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing, http://www.ipaddressguide.com/cidr) which is a compact representation of a range of IP addresses. The CIDR basically takes an IP address and divides it into a fixed part and then a variable part which constitutes the range. From this variable part we allocate:

  • 4 bits for specifying the data center (so allows 16 DCs per cluster)
  • 2 bits for specifying the rack (so 4 racks per DC)
  • remaining bits per host - 6 reserved IPs. So for example,
    • for a /21 CIDR, 26 hosts per rack
    • for a /16 CIDR, 1018 hosts per rack

These calculations are all displayed on our dashboard when you specify a network range before creating a cluster.

Within the cluster range, data center ranges are allocated sequentially. So, if for example you specified 10.223.120.0/21 as your cluster range our system would create data centers using the ranges 10.223.120.0/25, 10.223.120.128/25, 10.223.121.0/25, 10.223.121.128/25 ... 10.223.127.128/25.

Last updated:
If you have questions regarding this article, feel free to add it to the comments below.

0 Comments

Please sign in to leave a comment.