Self-adaptive cross-machine-room Harbor mirror image management system
Through the combination of distributed Harbor cluster, JuiceFS distributed file system and global intelligent DNS system, the problem of cross-computer room mirror data consistency and resource utilization efficiency is solved, efficient mirror synchronization and storage are achieved, and operation and maintenance complexity is reduced. cost, and enhanced security.
Patent Information
- Application Number
- CN202410850012.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-27
- Publication Date
- 2024-08-27
AI Technical Summary
Existing technology is difficult to achieve real-time or near-real-time container image data consistency in a cross-machine room environment, and resource consumption and management complexity are high, resulting in slow image pull speed and heavy operation and maintenance burden.
The distributed Harbor cluster deployment unit is used, combined with the JuiceFS distributed file system and the global intelligent DNS system, to achieve policy-driven automatic mirror synchronization and high-performance storage, and enhance load balancing and failover capabilities.
It achieves almost real-time data synchronization, significantly improves image reading speed and ease of operation and maintenance, reduces resource and cost requirements, and enhances security and compliance.
Smart Images

Figure CN118555288A
Abstract
Description
Technical Field
[0001] The invention relates to an adaptive cross-computer room Harbor mirror management system. Background Art
[0002] With the global expansion of corporate business, the deployment of multiple data centers has become the norm, and the image pulling speed and data consistency between computer rooms have become key factors affecting system performance.
[0003] At present, there are several solutions in the industry:
[0004] Solution 1. Distributed Harbor deployment + data synchronization tools (such as Rsync). This solution involves deploying a Harbor cluster independently in each computer room, and using external data synchronization tools (such as Rsync or Cron-based scripts) to regularly synchronize mirror data in different computer rooms. In this way, it aims to achieve redundant backup and access acceleration of mirror resources in multiple geographical locations. It has the following defects: insufficient real-time performance: it relies on scheduled tasks for data synchronization, and cannot achieve real-time or near real-time data consistency. For frequently updated mirror libraries, it may cause data delays in different computer rooms; resource consumption: the data synchronization process may occupy more network bandwidth and computing resources, especially when the data volume is large or the synchronization frequency is high; management complexity: it is cumbersome to maintain synchronization scripts and handle synchronization failures, which increases the operation and maintenance burden.
[0005] Solution 2: Use a distributed file system (such as Ceph or GlusterFS) as the backend storage of Harbor. This solution uses a distributed file system as the backend storage solution of Harbor. The Harbor instances in each computer room share the same storage resources, thereby achieving data consistency and accelerating access. This method can theoretically reduce the complexity of data replication because all instances directly read and write the same storage pool. It has the following defects: Implementation complexity: Configuring and maintaining a distributed file system is complex, especially in a multi-computer room environment, and factors such as network latency and data redundancy strategies need to be considered; Performance bottleneck: Although data consistency is improved, the performance of the distributed file system may become a bottleneck in high-concurrency access or large-scale data transmission; Cost issues: High-performance distributed storage solutions may bring higher hardware and maintenance costs. Summary of the invention
[0006] The present invention provides an adaptive cross-computer room Harbor image management system to solve the difficulties faced by enterprises in cross-computer room container image management and distribution, as well as the technical problem of how to ensure image acceleration and data consistency.
[0007] The present invention solves the above technical problems through the following technical solutions:
[0008] The present invention provides an adaptive cross-computer room Harbor image management system, including a distributed Harbor cluster deployment unit; the distributed Harbor cluster deployment unit includes a plurality of Harbor clusters independently deployed to each computer room and having a built-in replication mechanism; and further includes: a JuiceFS distributed file system, the JuiceFS distributed file system is integrated into the storage layer of the Harbor cluster; and a global intelligent DNS system, the global intelligent DNS system is connected to each Harbor cluster of the distributed Harbor cluster deployment unit.
[0009] In this technical solution, a distributed Harbor cluster is deployed in each computer room. Different from the traditional single-center deployment, this solution deploys a Harbor cluster independently in each computer room and uses Harbor's high-availability design to ensure service continuity in each area. Compared with the solution that relies only on a single data center, this design significantly enhances fault tolerance and regional access speed. At the same time, Harbor has a built-in replication mechanism, integrates JuiceFS to achieve storage acceleration, and can perform global intelligent DNS scheduling.
[0010] Preferably, two sets of software, Keepalived and HAProxy, are configured in the Harbor cluster.
[0011] In this technical solution, two sets of software, Keepalived and HAProxy, are used to ensure load balancing and fault switching.
[0012] Preferably, the Harbor cluster has a master node and several slave nodes.
[0013] In this technical solution, each Harbor cluster is configured to include a master node and several slave nodes. By utilizing Harbor's built-in high availability mode, even if a single point of failure occurs, it can quickly switch to the backup node, which can easily shorten the service interruption time. At the same time, through load balancing, requests can be effectively distributed to each node to avoid single point overload.
[0014] Preferably, the Harbor cluster is provided with a policy-driven automatic mirror synchronization module.
[0015] In this technical solution, by setting up policy-driven automatic mirror synchronization, it is ensured that the mirror data across computer rooms is updated in real time or on demand; it not only reduces the additional system integration complexity, but also improves synchronization efficiency and data consistency.
[0016] Preferably, the automatic mirror synchronization module is formed by the replication function of Harbor cluster 2.x and above.
[0017] In this technical solution, different from the solution that relies on external synchronization tools, the replication function of Harbor 2.x and above is directly used to achieve automatic mirror synchronization driven by setting policies.
[0018] Preferably, the storage backend of the Harbor cluster is a JuiceFS distributed file system, the JuiceFS distributed file system is mounted to the local file system of the computer room, and the JuiceFS distributed file system is configured to connect to the cloud storage system.
[0019] In this technical solution, the JuiceFS distributed file system is integrated into the storage layer of Harbor, and its high-performance cache mechanism based on object storage is used to provide near-memory-level read and write speeds for frequently accessed image layers. Compared with directly using local file systems or traditional network file systems, JuiceFS greatly improves I / O performance and reduces storage costs through intelligent caching and deduplication technology.
[0020] Preferably, the storage layer of the Harbor cluster is composed of a Harbor image repository database, an IDC storage module and an IDC cache module.
[0021] In this technical solution, storage is achieved through the Harbor image warehouse database, IDC storage module and IDC cache module.
[0022] Preferably, the Harbor cluster has a Harbor image repository.
[0023] In this technical solution, when pulling the image of the computer room, the image enters the Harbor image warehouse and is then stored in the Harbor image warehouse database, IDC storage module and IDC cache module.
[0024] Preferably, the global intelligent DNS system is configured with a geolocation function module.
[0025] In this technical solution, by configuring the geolocation function, the source IP address of the user's DNS request is automatically resolved to the Harbor cluster IP address of the nearest computer room.
[0026] Preferably, the global intelligent DNS system is connected to the Harbor image repository of the Harbor cluster through an IDC gateway.
[0027] In this technical solution, an intelligent DNS resolution service is introduced to dynamically resolve the source of the user request to the nearest Harbor cluster address, avoiding delays caused by geographical distance; compared with fixed IP or simple load balancing strategies, this is smarter and more efficient, ensuring that users always get the best access experience.
[0028] On the basis of being in accordance with the common sense in the art, the above-mentioned preferred conditions can be arbitrarily combined to obtain the preferred embodiments of the present invention.
[0029] The positive and progressive effects of the present invention are:
[0030] Improved real-time performance and efficiency, by optimizing the Harbor replication mechanism, almost real-time data synchronization is achieved, overcoming the delay problem of traditional timed synchronization solutions. The addition of JuiceFS increases the mirror reading speed several times compared to traditional storage solutions, significantly shortening the application deployment time;
[0031] Improved O&M simplicity. The integrated Harbor management interface and automated deployment scripts reduce the workload of manual configuration. Compared with the previous manual maintenance of synchronization scripts and complex storage configurations, it greatly reduces O&M complexity and error probability.
[0032] Cost and resource optimization has been carried out. JuiceFS's intelligent caching and deduplication mechanism reduces storage resource requirements, while intelligent DNS optimizes the use of network resources. Overall, it is more cost-effective than solutions that rely on expensive CDN or over-configured hardware.
[0033] Improved security and compliance. By integrating TLS encryption, fine-grained access control and other measures, compared with some solutions that only focus on performance and ignore security, this solution improves efficiency while ensuring the security of data transmission and storage, meeting the high standards of enterprise-level applications;
[0034] In summary, the adaptive cross-computer room Harbor image management system provided by the present invention has achieved effective transcendence of the existing technology through technical innovations in distributed Harbor clusters, data synchronization mechanisms, local storage acceleration, and intelligent routing. It not only solves the problems of slow image pulling speed and data consistency in a cross-computer room environment, but also improves operation and maintenance efficiency, optimizes resource utilization, and strengthens security on this basis, providing strong support for the enterprise's cloud-native application deployment. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 Schematic diagram of the system of the present invention.
[0036] Figure 2 It is a schematic diagram of the core architecture of the present invention.
[0037] Description of Reference Numerals
[0038] 1. Distributed Harbor cluster deployment unit; 101. Harbor cluster; 1011. Automatic mirror synchronization module;
[0039] 2. JuiceFS distributed file system; 201. Cloud storage system; 202. Local file system;
[0040] 3. Global intelligent DNS system; 301, geolocation function module. DETAILED DESCRIPTION
[0041] The present invention is further described below by way of examples, but the present invention is not limited to the scope of the examples.
[0042] like Figure 1-2 As shown, the adaptive cross-data center Harbor image management system.
[0043] It includes a distributed Harbor cluster deployment unit 1; the distributed Harbor cluster deployment unit 1 includes a plurality of Harbor clusters 101 independently deployed in each computer room and having a built-in replication mechanism; two sets of software, Keepalived and HAProxy, are configured in the Harbor cluster 101, and load balancing and fault switching are ensured by the two sets of software, Keepalived and HAProxy; the Harbor cluster 101 has a master node and a plurality of slave nodes.
[0044] A set of Harbor cluster 101 is deployed in each computer room, including at least two Harbor cluster 101 instances to achieve high availability, and load balancing and failover are ensured through Keepalived and HAProxy. Each Harbor cluster 101 instance is configured to include a master node and several slave nodes, using Harbor's built-in high availability mode.
[0045] It plays the following roles to improve service availability: even if a single point of failure occurs, the service can be quickly switched to the backup node, and the service interruption time is shortened to seconds; resource utilization: through load balancing, requests are effectively distributed to each node to avoid single point overload.
[0046] Different from the traditional single-center deployment, this solution deploys Harbor cluster 101 independently in each computer room and uses Harbor's high-availability design to ensure service continuity in each area. Compared with the solution that relies only on a single data center, this design significantly enhances fault tolerance and regional access speed.
[0047] The Harbor cluster 101 is provided with a policy-driven automatic mirror synchronization module 1011; the automatic mirror synchronization module 1011 is constructed by the replication function of the Harbor cluster 1012.x and above versions.
[0048] Different from solutions that rely on external synchronization tools, Harbor 2.x and above versions of the replication function are directly used to set up policy-driven automatic mirror synchronization to ensure that mirror data across computer rooms is updated in real time or on demand. This not only reduces the complexity of additional system integration, but also improves synchronization efficiency and data consistency.
[0049] Configure the image replication strategy in the Harbor management interface, specify that images of specific projects or tags are automatically synchronized in each computer room; set a reasonable synchronization frequency (such as once every 5 minutes) and bandwidth limit to balance data freshness and network resource usage.
[0050] It plays the following roles: Data freshness: real-time or near real-time data synchronization to ensure data consistency in each computer room and reduce deployment problems caused by data delays; network resource optimization: through bandwidth limitation, avoid the impact on the business network during peak hours.
[0051] The storage backend of the Harbor cluster 101 is a JuiceFS distributed file system 2, which is mounted to the local file system 202 of the computer room, and the JuiceFS distributed file system 2 is configured to connect to the cloud storage system 201; the JuiceFS distributed file system 2 is integrated in the storage layer of Harbor, and its high-performance cache mechanism based on object storage is used to provide near-memory-level read and write speeds for the frequently accessed image layer. Compared with directly using the local file system 202 or the traditional network file system, JuiceFS greatly improves I / O performance and reduces storage costs through intelligent caching and deduplication technology; the storage layer of the Harbor cluster 101 is composed of a Harbor image warehouse database, an IDC storage module, and an IDC cache module; storage is achieved through the Harbor image warehouse database, the IDC storage module, and the IDC cache module; the Harbor cluster 101 has a Harbor image warehouse; when pulling the image of the computer room, the image enters the Harbor image warehouse, and then is stored in the Harbor image warehouse database, the IDC storage module, and the IDC cache module.
[0052] By changing the storage backend of Harbor cluster 101 to connect to JuiceFS distributed file system 2, JuiceFS distributed file system 2 is mounted to local file system 202 and configured to connect to cloud storage system 201 (such as Alibaba Cloud OSS or AWS S3). Through JuiceFS's cache strategy, hot data is stored in local file system 202, and cold data is retained in low-cost cloud storage system 201.
[0053] It plays the following roles: Performance improvement: According to the test report, when JuiceFS reads frequently accessed images, the average IOPS increases by more than 5 times, significantly reducing the pulling time; Cost savings: Through intelligent tiered storage, it reduces the dependence on high-performance local storage and reduces the overall storage cost.
[0054] The global intelligent DNS system 3 is configured with a geolocation function module 301; by configuring the geolocation function, the source IP address of the user's DNS request is automatically resolved to the IP address of the Harbor cluster 101 in the nearest computer room; the global intelligent DNS system 3 is connected to the Harbor mirror warehouse of the Harbor cluster 101 through the IDC gateway; the intelligent DNS resolution service is introduced to dynamically resolve to the nearest Harbor cluster 101 address according to the source of the user's request, avoiding delays caused by geographical distance; compared with fixed IP or simple load balancing strategies, this is more intelligent and efficient, ensuring that users always get the best access experience.
[0055] By deploying a global intelligent DNS system 3 (such as CoreDNS) and configuring the geolocation function, the source IP address of the user's DNS request is automatically resolved to the IP address of the Harbor cluster 101 in the nearest computer room.
[0056] It plays the following roles: Access speed optimization: According to the test, the average time for users to pull images is reduced by more than 30%, thanks to the DNS intelligent routing to the nearest Harbor instance; User experience: Users can enjoy the optimal image pulling path without manual selection or configuration, which improves overall user satisfaction.
[0057] The present invention is not limited to the above-mentioned embodiments. Any changes in shape or structure are within the protection scope of the present invention. The protection scope of the present invention is defined by the attached claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principle and essence of the present invention, but these changes and modifications are within the protection scope of the present invention.
Claims
1. Adaptive cross-computer room Harbor image management system, characterized by: It comprises a distributed Harbor cluster deployment unit (1); the distributed Harbor cluster deployment unit (1) comprises a plurality of Harbor clusters (101) independently deployed in each computer room and having a built-in replication mechanism; Also includes: JuiceFS distributed file system (2), the JuiceFS distributed file system (2) is integrated into the storage layer of the Harbor cluster (101); A global intelligent DNS system (3), wherein the global intelligent DNS system (3) is connected to each Harbor cluster (101) of the distributed Harbor cluster deployment unit (1).
2. The adaptive cross-computer room Harbor image management system according to claim 1, characterized in that: The Harbor cluster (101) is configured with two sets of software: Keepalived and HAProxy.
3. The adaptive cross-computer room Harbor image management system according to claim 1, characterized in that: The Harbor cluster (101) has a master node and several slave nodes.
4. The adaptive cross-computer room Harbor image management system according to claim 1, characterized in that: The Harbor cluster (101) is provided with a policy-driven automatic mirror synchronization module (1011).
5. The adaptive cross-computer room Harbor image management system according to claim 4, characterized in that: The automatic mirror synchronization module (1011) is constructed by the replication function of the Harbor cluster (101) 2.x and above versions.
6. The adaptive cross-computer room Harbor image management system according to claim 1, characterized in that: The storage backend of the Harbor cluster (101) is a JuiceFS distributed file system (2), the JuiceFS distributed file system (2) is mounted to the local file system (202) of the computer room, and the JuiceFS distributed file system (2) is configured to connect to the cloud storage system (201).
7. The adaptive cross-computer room Harbor image management system according to claim 1, characterized in that: The storage layer of the Harbor cluster (101) is composed of a Harbor image repository database, an IDC storage module and an IDC cache module.
8. The adaptive cross-computer room Harbor image management system according to claim 1, characterized in that: The Harbor cluster (101) has a Harbor image repository.
9. The adaptive cross-computer room Harbor image management system according to claim 1, characterized in that: The global intelligent DNS system (3) is equipped with a geographic positioning function module (301).
10. The adaptive cross-computer room Harbor image management system according to claim 1, characterized in that: The global intelligent DNS system (3) is connected to the Harbor image repository of the Harbor cluster (101) via an IDC gateway.
