p2paddon
What Is P2P Image Distribution?
When Docker is used to run containers, the host usually downloads images from the Registry service (such as Docker Hub). When a large number of hosts need to download images from the Registry to run containerized applications (for example, when a new version is released), the Registry service becomes the bottleneck of image distribution. It takes a long time to transmit images to all hosts, extending the application release period.
To address this bottleneck, some users download images for each node to obtain images in batches and start applications at the preset time. This method alleviates the problem to a certain extent, but it does not solve the bottleneck of Registry distribution.
To resolve this bottleneck, the SWR service provides a plug-in using the P2P protocol to accelerate image distribution. The plug-in allows shared images between nodes in a cluster to form a distributed P2P download network, thus improving network throughput.
The Docker will restart during add-on installation. Exercise caution when using this add-on.
Notes and Constraints
This add-on can be installed only in CCE clusters and Kunpeng clusters of v1.9 to v1.13.
Recommendation
The add-on is recommended when the number of nodes in a cluster exceeds 50.
Installing the Add-on
- Log in to the CCE console. In the navigation pane, choose Add-ons. On the Add-on Marketplace tab page, click Install Add-on under p2paddon.
- On the Install Add-on page, select the cluster and the add-on version, and click Next: Configuration.
- Currently, the image distribution add-on has no configurable parameters. Click Install to directly install the add-on.
After the add-on is installed, click Go Back to Previous Page. On the Add-on Instance tab page, view the running instance. This indicates that the add-on has been installed on each node in the cluster. When a new node is added, this add-on will be automatically installed.
You can pull an image more quickly when creating a workload.
Upgrading the Add-on
- Log in to the CCE console. In the navigation pane, choose Add-ons. On the Add-on Instance tab page, click Upgrade under p2paddon.
- If the Upgrade button is not available, the current add-on is already up-to-date and no upgrade is required.
- During the upgrade, the p2paddon add-on of the original version on cluster nodes will be discarded, and the add-on of the target version will be installed.
- On the Basic Information page, select the add-on version and click Next.
- Click Upgrade.
Uninstalling the Add-on
- Log in to the CCE console. In the navigation pane, choose Add-ons. On the Add-on Instance tab page, click Uninstall under p2paddon.
- In the dialog box displayed, click Yes to uninstall the add-on.
Last Article: tf-operator
Next Article: rc-recycler
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.