Pre-Binding Container ENI for CCE Turbo Clusters¶
In the Cloud Native 2.0 network model, each pod is allocated an ENI or a sub-ENI (called container ENI). The speed of ENI creation and binding is slower than that of pod scaling, severely affecting the container startup speed in large-scale batch creation. Therefore, the Cloud Native Network 2.0 model provides the dynamic pre-binding of container ENIs to accelerate pod startup while improving IP resource utilization.
Constraints¶
CCE Turbo clusters of 1.19.16-r4, 1.21.7-r0, 1.23.5-r0, 1.25.1-r0, or later support ENI pre-binding, global configuration at the cluster level, and custom settings at the node pool level. Custom settings of nodes out of a node pool is not supported.
CCE Turbo clusters of 1.19.16-r2, 1.21.5-r0, 1.23.3-r0 to 1.19.16-r4, 1.21.7-r0, 1.23.5-r0 only support two parameters, nic-minimum-target and nic-warm-target, and do not support custom settings at the node pool level.
Modify the dynamic pre-binding parameters using the console or API instead of the node annotations in the background. Otherwise, the modified annotations will be overwritten by the original values after the cluster is upgraded.
How It Works¶
CCE Turbo provides four dynamic pre-binding parameters for container ENIs. You can properly configure the parameters based on your service requirements. (The node pool-level dynamic ENI pre-binding parameters take priority over the cluster-level dynamic ENI pre-binding parameters.)
Parameter | Default Value | Description | Suggestion |
---|---|---|---|
nic-minimum-target | 10 | Minimum number of container ENIs bound to a node. The parameter value must be a positive integer. The value 10 indicates that there are at least 10 container ENIs bound to a node. If the number you entered exceeds the container ENI quota of the node, the ENI quota will be used. | Configure these parameters based on the number of pods. |
nic-maximum-target | 0 | If the number of ENIs bound to a node exceeds the value of nic-maximum-target, the system does not proactively pre-bind ENIs. If the value of this parameter is greater than or equal to the value of nic-minimum-target, the check on the maximum number of the pre-bound ENIs is enabled. Otherwise, the check is disabled. The parameter value must be a positive integer. The value 0 indicates that the check on the upper limit of pre-bound container ENIs is disabled. If the number you entered exceeds the container ENI quota of the node, the ENI quota will be used. | Configure these parameters based on the number of pods. |
nic-warm-target | 2 | Minimum number of pre-bound ENIs on a node. The value must be a number. When the value of nic-warm-target + the number of bound ENIs is greater than the value of nic-maximum-target, the system will pre-bind ENIs based on the difference between the value of nic-maximum-target and the number of bound ENIs. | Set this parameter to the number of pods that can be scaled out instantaneously within 10 seconds. |
nic-max-above-warm-target | 2 | Only when the number of idle ENIs on a node minus the value of nic-warm-target is greater than the threshold, the pre-bound ENIs will be unbound and reclaimed. The value can only be a number.
| Set this parameter based on the difference between the number of pods that are frequently scaled on most nodes within minutes and the number of pods that are instantly scaled out on most nodes within 10 seconds. |
Configuration Example¶
Level | Service Scenario | Configuration Example |
---|---|---|
Cluster | All nodes use the c7.4xlarge.2 model (sub-ENI quota: 128). Most nodes run about 20 pods. Most nodes can run a maximum of 60 pods. Most nodes can scale out 10 pods within 10 seconds. Most nodes frequently scale in or out 15 pods within minutes. | Cluster-level global configuration:
|
Node pool | A node pool that uses the c7.8xlarge.2 high-specification model is created in the cluster. (sub-ENI quota: 256) Most nodes run about 100 pods. Most nodes can run a maximum of 128 pods. Most nodes can scale out 10 pods within 10 seconds. Most nodes frequently scale in or out 12 pods within minutes. | Custom settings at the node pool level:
|
Note
Pods using HostNetwork are excluded.
Cluster-level Global Configuration¶
Log in to the CCE console. In the navigation pane, choose Clusters.
Click next to the target cluster and choose Manage.
In the window that slides out from the right, click Networking Components. For details about the parameter configurations, see Configuration Example.
After the configuration is complete, click OK. Wait for about 10 seconds for the configuration to take effect.
Custom Settings at the Node Pool Level¶
Log in to the CCE console.
Click the cluster name to access the cluster console, choose Nodes in the navigation pane, and click the Node Pools tab.
Locate the row containing the target node pool and click Manage.
In the window that slides out from the right, click Networking Components and enable node pool container ENI pre-binding. For details about the parameter configurations, see Configuration Example.
After the configuration is complete, click OK. Wait for about 10 seconds for the configuration to take effect.