You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The IP warm-up feature allows Terway to pre-allocate a specified number of IP addresses when a node starts up. This helps reduce pod startup latency by having IPs ready in the pool before pods are scheduled.
4
+
5
+
## Configuration
6
+
7
+
The warm-up size can be configured through the `eni-config` ConfigMap:
8
+
9
+
| Parameter | Description | Default Value | Example |
|`ip_warm_up_size`| Number of IPs to pre-allocate during node warm-up |`0` (disabled) |`10`, `20`|
12
+
13
+
## How It Works
14
+
15
+
1.**Initialization**: When a node starts and `ip_warm_up_size` is configured (> 0), the controller initializes the warm-up state:
16
+
-`WarmUpTarget`: Set to the configured `ip_warm_up_size`
17
+
-`WarmUpAllocatedCount`: Tracks the number of IPs allocated via OpenAPI during warm-up
18
+
-`WarmUpCompleted`: Set to `false` initially
19
+
20
+
2.**Allocation**: During reconciliation, if warm-up is not completed, the controller calculates additional IP demand to reach the warm-up target and allocates IPs accordingly.
21
+
22
+
3.**Completion**: Warm-up is marked as completed when `WarmUpAllocatedCount >= WarmUpTarget`. Once completed, the warm-up process will not run again for that node.
23
+
24
+
## Relationship with Pool Size
25
+
26
+
**Important**: The `ip_warm_up_size` is independent of `min_pool_size` and `max_pool_size`. It can be set to a value larger or smaller than the pool size limits.
27
+
28
+
However, setting `ip_warm_up_size` larger than `max_pool_size` is **not recommended** because:
29
+
30
+
- The warm-up process will allocate IPs up to `ip_warm_up_size`
31
+
- After warm-up completes, the pool management and idle IP reclaim policy will release excess IPs to maintain the pool within `min_pool_size` and `max_pool_size` boundaries
32
+
- This results in unnecessary IP allocation and deallocation, wasting resources and API calls
33
+
34
+
### Recommended Configuration
35
+
36
+
```json
37
+
{
38
+
"version": "1",
39
+
"max_pool_size": 20,
40
+
"min_pool_size": 5,
41
+
"ip_warm_up_size": 15
42
+
}
43
+
```
44
+
45
+
In this example:
46
+
47
+
- On node startup, 15 IPs will be pre-allocated (warm-up)
48
+
- The pool will maintain between 5-20 IPs during normal operation
49
+
- Since `ip_warm_up_size` (15) is within the pool size range (5-20), all pre-allocated IPs will be retained
50
+
51
+
### Not Recommended Configuration
52
+
53
+
```json
54
+
{
55
+
"version": "1",
56
+
"max_pool_size": 10,
57
+
"min_pool_size": 2,
58
+
"ip_warm_up_size": 20
59
+
}
60
+
```
61
+
62
+
In this example:
63
+
64
+
- On node startup, 20 IPs will be pre-allocated (warm-up)
65
+
- After warm-up completes, 10 IPs will be released because `max_pool_size` is only 10
66
+
- This causes unnecessary IP churn and API calls
67
+
68
+
## Status Fields
69
+
70
+
The warm-up progress can be monitored through the Node CR status:
71
+
72
+
| Field | Description |
73
+
|-------|-------------|
74
+
|`warmUpTarget`| The target number of IPs to allocate during warm-up |
75
+
|`warmUpAllocatedCount`| Current count of IPs allocated via OpenAPI during warm-up |
76
+
|`warmUpCompleted`| Whether warm-up has been completed |
77
+
78
+
Example status:
79
+
80
+
```yaml
81
+
status:
82
+
warmUpTarget: 10
83
+
warmUpAllocatedCount: 10
84
+
warmUpCompleted: true
85
+
```
86
+
87
+
## Use Cases
88
+
89
+
1. **Batch Job Scheduling**: When scheduling many pods simultaneously on a new node, pre-allocated IPs reduce waiting time.
90
+
91
+
2. **Auto-scaling**: New nodes in auto-scaling groups can have IPs ready before workloads are scheduled.
92
+
93
+
3. **Low-latency Requirements**: Applications requiring fast pod startup benefit from having IPs pre-allocated.
94
+
95
+
## Notes
96
+
97
+
- Warm-up only runs once per node lifecycle (when the node first joins the cluster)
98
+
- If a node already has warm-up status initialized, changing `ip_warm_up_size` will not affect the ongoing warm-up
99
+
- Warm-up progress is tracked independently of actual IP usage, ensuring consistent behavior even if IPs are allocated/deallocated during warm-up
0 commit comments