IP Address Allocation for ULZ Chat — Unique AI Documentation

IP Address Allocation for ULZ Chat

Overview

This document outlines the IP address allocation strategy for the ULZ Chat project, detailing the allocation for AKS clusters, PostgreSQL servers, Tyk Redis, and Azure Application Gateway. It ensures adherence to Azure service quotas and provides a scalable, efficient network design.

Scope

The scope includes key limits and requirements, a detailed IP allocation table, advantages and disadvantages of the approach, and a conclusion for each scenario.

Key Limits

Source: Azure Service Quotas and Limits

Worst-Case Scenario IP Allocation

Total IP Addresses Needed:

  1. Total IP addresses for nodes: 5,000 (1 per node)
  2. Total IP addresses for pods: 150,000
  3. Total IP addresses for AKS cluster: 5,000 (nodes) + 150,000 (pods) = 155,000

Updated IP Allocation Table (Starting from 10.106.0.0):

Given the requirement to accommodate up to 155,000 IP addresses, we will use multiple /16 subnets.

Subnet Allocation Table

Component Subnet Address Range of Addresses Useable IPs Hosts
AKS Nodes 10.106.0.0/16 10.106.0.0 - 10.106.255.255 10.106.0.1 - 10.106.255.254 65,534
AKS Pods (1st Block) 10.107.0.0/16 10.107.0.0 - 10.107.255.255 10.107.0.1 - 10.107.255.254 65,534
AKS Pods (2nd Block) 10.108.0.0/16 10.108.0.0 - 10.108.255.255 10.108.0.1 - 10.108.255.254 65,534
AKS Pods (3rd Block) 10.109.0.0/17 10.109.0.0 - 10.109.127.255 10.109.0.1 - 10.109.127.254 32,766
PostgreSQL Server 10.109.128.0/24 10.109.128.0 - 10.109.128.255 10.109.128.1 - 10.109.128.254 254
Tyk Redis 10.109.129.0/24 10.109.129.0 - 10.109.129.255 10.109.129.1 - 10.109.129.254 254
Azure App Gateway 10.109.130.0/24 10.109.130.0 - 10.109.130.255 10.109.130.1 - 10.109.130.254 254

Network Size Necessary:
To cover all the subnet requirements, a network size of 10.106.0.0/14 is necessary. This range provides sufficient IP addresses to cover all subnets for AKS nodes, pods, and additional services.

Detailed Breakdown:

AKS Nodes:

AKS Pods:

PostgreSQL Server:

Tyk Redis:

Azure App Gateway:

Advantages:

Disadvantages:

Conclusion

This IP allocation ensures that the AKS cluster can scale up to the maximum limits defined by Azure service quotas and limits, while efficiently using IP addresses and avoiding overprovisioning. It provides the required IP addresses for nodes and pods, as well as sufficient addresses for other critical services such as PostgreSQL, Redis, and Azure Application Gateway.

Subnet Allocation Table of Unique

Scenario: For networks requiring a balance between scalability and efficient use of addresses, a moderate allocation strategy is ideal.

Subnet Allocation Table

Component Subnet Address Range of Addresses Useable IPs Hosts
AKS Nodes 10.106.0.0/24 10.106.0.0 - 10.106.0.255 10.106.0.1 - 10.106.0.254 254
AKS Pods 10.106.1.0/20 10.106.1.0 - 10.106.15.255 10.106.1.1 - 10.106.15.254 4,094
App Gateway 10.106.16.0/28 10.106.16.0 - 10.106.16.15 10.106.16.1 - 10.106.16.14 14
Tyk Redis 10.106.17.0/28 10.106.17.0 - 10.106.17.15 10.106.17.1 - 10.106.17.14 14
PostgreSQL Server 10.106.18.0/28 10.106.18.0 - 10.106.18.15 10.106.18.1 - 10.106.18.14 14

Network Size Necessary:

To cover all the subnet requirements, a network size of 10.106.0.0/16 is necessary. This range provides sufficient IP addresses to cover all subnets for AKS nodes, pods, and additional services.

Detailed Breakdown:

  1. AKS Nodes:
    • Allocated 10.106.0.0/24 providing 254 usable IP addresses.
  2. AKS Pods:
    • Allocated 10.106.1.0/20 providing 4,094 usable IP addresses.
  3. App Gateway:
    • Allocated 10.106.16.0/28 providing 14 usable IP addresses.
  4. Tyk Redis:
    • Allocated 10.106.17.0/28 providing 14 usable IP addresses.
  5. PostgreSQL Server:
    • Allocated 10.106.18.0/28 providing 14 usable IP addresses.

Advantages:

Disadvantages:

Conclusion

This subnet allocation ensures that the AKS cluster and supporting services have the necessary IP addresses while maintaining efficient use of the address space.

Subnet Allocation Table with least IP addresses allocation

Scenario: For smaller networks where the scale is limited, it is essential to use IP addresses efficiently to avoid wastage and simplify network management.

Subnet Allocation Table

Component Subnet Address Range of Addresses Useable IPs Hosts
AKS Nodes 10.106.0.0/24 10.106.0.0 - 10.106.0.255 10.106.0.1 - 10.106.0.254 254
AKS Pods 10.106.1.0/23 10.106.1.0 - 10.106.2.255 10.106.1.1 - 10.106.2.254 510
App Gateway 10.106.3.0/28 10.106.3.0 - 10.106.3.15 10.106.3.1 - 10.106.3.14 14
Tyk Redis 10.106.3.16/28 10.106.3.16 - 10.106.3.31 10.106.3.17 - 10.106.3.30 14
PostgreSQL Server 10.106.3.32/28 10.106.3.32 - 10.106.3.47 10.106.3.33 - 10.106.3.46 14
Reserved for Future Use 10.106.3.48/28 10.106.3.48 - 10.106.3.63 10.106.3.49 - 10.106.3.62 14

Detailed Breakdown:

  1. AKS Nodes:
    • Allocated 10.106.0.0/24 providing 254 usable IP addresses.
  2. AKS Pods:
    • Allocated 10.106.1.0/23 providing 510 usable IP addresses.
  3. App Gateway:
    • Allocated 10.106.3.0/28 providing 14 usable IP addresses.
  4. Tyk Redis:
    • Allocated 10.106.3.16/28 providing 14 usable IP addresses.
  5. PostgreSQL Server:
    • Allocated 10.106.3.32/28 providing 14 usable IP addresses.
  6. Reserved for Future Use:
    • Allocated 10.106.3.48/28 providing 14 usable IP addresses.

Advantages:

Disadvantages:

Conclusion

This subnet allocation within a /22 network ensures that the AKS cluster and supporting services have the necessary IP addresses while maintaining efficient use of the address space. The allocations are designed to fit within the defined range, allowing for future growth and additional services.