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
- Maximum nodes per cluster: 5,000
- Maximum pods per node: 250 (Azure CNI and Kubenet)
- Maximum total pods: 150,000 (derived from maximum nodes and pods per node)
Source: Azure Service Quotas and Limits
Worst-Case Scenario IP Allocation
Total IP Addresses Needed:
- Total IP addresses for nodes: 5,000 (1 per node)
- Total IP addresses for pods: 150,000
- 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:
- Allocated 10.106.0.0/16 providing 65,534 usable IP addresses.
AKS Pods:
- Allocated three /16 subnets and one /17 subnet to provide the necessary IP addresses.
- First Block: 10.107.0.0/16
- Second Block: 10.108.0.0/16
- Third Block: 10.109.0.0/17
PostgreSQL Server:
- Allocated 10.109.128.0/24 providing 254 usable IP addresses.
Tyk Redis:
- Allocated 10.109.129.0/24 providing 254 usable IP addresses.
Azure App Gateway:
- Allocated 10.109.130.0/24 providing 254 usable IP addresses.
Advantages:
- Scalability: Easily supports large clusters with up to 5,000 nodes and 150,000 pods.
- Simplicity: Simplified management due to fewer subnets and larger address blocks.
- Buffer Capacity: Provides a buffer of extra IP addresses, enhancing flexibility for future expansions or additional services.
Disadvantages:
- Wastage of IP Addresses: Potential wastage of IP addresses as /16 subnets provide a large number of addresses, some of which may remain unused.
- Routing Complexity: Larger subnets can lead to more complex routing configurations and potential performance issues in very large networks.
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:
- AKS Nodes:
- Allocated 10.106.0.0/24 providing 254 usable IP addresses.
- AKS Pods:
- Allocated 10.106.1.0/20 providing 4,094 usable IP addresses.
- App Gateway:
- Allocated 10.106.16.0/28 providing 14 usable IP addresses.
- Tyk Redis:
- Allocated 10.106.17.0/28 providing 14 usable IP addresses.
- PostgreSQL Server:
- Allocated 10.106.18.0/28 providing 14 usable IP addresses.
Advantages:
- Efficient Use of Addresses: Smaller subnets reduce the likelihood of wasting IP addresses.
- Improved Performance: Smaller subnets can lead to simpler routing and improved network performance.
- Flexibility: Offers flexibility in addressing and can be adjusted based on specific service requirements.
Disadvantages:
- Complex Management: Managing a larger number of smaller subnets can be more complex.
- Limited Scalability: Smaller subnets may require reconfiguration or additional subnets as the network grows.
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:
- AKS Nodes:
- Allocated 10.106.0.0/24 providing 254 usable IP addresses.
- AKS Pods:
- Allocated 10.106.1.0/23 providing 510 usable IP addresses.
- App Gateway:
- Allocated 10.106.3.0/28 providing 14 usable IP addresses.
- Tyk Redis:
- Allocated 10.106.3.16/28 providing 14 usable IP addresses.
- PostgreSQL Server:
- Allocated 10.106.3.32/28 providing 14 usable IP addresses.
- Reserved for Future Use:
- Allocated 10.106.3.48/28 providing 14 usable IP addresses.
Advantages:
- Balanced Approach: Provides a good balance between address space and routing complexity.
- Future-Proofing: Reserved subnets allow for future expansion without significant reconfiguration.
- Efficient Use of Addresses: Ensures efficient use of IP addresses with minimal wastage.
Disadvantages:
- Moderate Scalability: May not be sufficient for very large networks or those expecting rapid growth.
- Management Complexity: Similar to /24 and /20 allocations, managing multiple subnets can add complexity.
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.