System deployment method, device, equipment and computer storage medium

By using extended load balancing policies and blue-green version configuration items in distributed architectures to deploy different versions of services in the same registry, the problem of waste of resources and errors in the call of versions is solved, and efficient resource utilization and service stability are achieved isolation.

CN114090022BActive Publication Date: 2024-12-20CCB FINTECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202111440008.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-11-30
Publication Date
2024-12-20
Estimated Expiration
2041-11-30

AI Technical Summary

Technical Problem

In distributed architecture, existing blue-green deployment methods require twice the server resources during upgrade, resulting in waste of resources and cannot effectively avoid protocol mismatch errors between different versions of applications.

Method used

Through an extended load balancing strategy, different versions of services are deployed under different nodes in the same registry center, and the blue-green version configuration items and preset number of policies are used to deploy and offline service nodes to ensure the isolation and resources of different versions of services. efficient use.

Benefits of technology

The ability to deploy different versions of services in the same registry is realized, reducing resource waste, and ensuring the stability and isolation of services through load balancing policies, avoiding errors caused by version calls.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114090022B_ABST
    Figure CN114090022B_ABST
Patent Text Reader

Abstract

This application provides a system deployment method, apparatus, device, and computer storage medium. The method includes: setting a blue-green version configuration item, which includes a first configuration item; determining, based on an extended load balancing strategy, that service cluster nodes deploying the first version correspond to a first node of the registration center, and service cluster nodes not deploying the first version correspond to a second node of the registration center; and deploying the second version of the service to the cluster nodes corresponding to the second node of the registration center using the first configuration item. According to the system deployment method of this application, different versions can be deployed on different registration nodes of the same registration center, avoiding resource waste.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the technical field of distributed systems, and in particular, relates to a system deployment method, apparatus, device and computer storage medium. Background Art

[0002] At present, with the rapid development of business, traditional single applications can no longer satisfy people, so distributed architecture has emerged. In a distributed architecture, different businesses are distributed in different application services. When upgrading, the interface protocol between application services needs to be changed. It is necessary to control the mutual invocation between applications of different versions, otherwise there will be errors due to protocol mismatch.

[0003] The existing technical solution can ensure that only application services of the same version can call each other by adopting the blue-green deployment upgrade strategy when upgrading the distributed system. Specifically, a new registration center is deployed while deploying the new version of the application service, and the new version of the application service is deployed on the new registration center to achieve isolation of different versions of applications and avoid errors caused by different versions of applications calling each other. However, the above method not only requires new service resource configuration, but also requires twice the server resources, which will cause a waste of resources. Summary of the invention

[0004] The embodiments of the present application provide a system deployment method, apparatus, device, computer storage medium and computer program product, which can deploy different versions of services on service nodes under different nodes of the same registration center through an extended load balancing strategy, thereby reducing resource waste.

[0005] In a first aspect, an embodiment of the present application provides a system deployment method, the method comprising:

[0006] Set the blue-green version configuration items, which include the first configuration item;

[0007] Determine based on the extended load balancing strategy that the service cluster node that deploys the first version corresponds to the first node of the registration center, and the service cluster node that does not deploy the first version corresponds to the second node of the registration center;

[0008] Deploy the second version of the service to the cluster node corresponding to the second node of the registration center through the first configuration item;

[0009] Among them, the second version is higher than the first version.

[0010] According to one aspect of the present application, the blue-green version configuration item also includes a second configuration item; all nodes of the first version of the service cluster corresponding to the first node of the registration center are taken offline through the second configuration item.

[0011] According to one aspect of the present application, deploying a second version of the service on a service cluster node corresponding to a second node of a registration center through a first configuration item also includes:

[0012] When the traffic of the first version service is lower than a preset threshold, a first preset number of nodes of the first version service cluster node are taken offline through the second configuration item;

[0013] Deploy the second version of the service to a first preset number of cluster nodes of the second node of the registration center through the first configuration item, where the first preset number of cluster nodes of the second node of the registration center is the first preset number of nodes of the first version of the service cluster;

[0014] Taking offline a second preset number of nodes of the first version service cluster through the second configuration item;

[0015] Deploy the second version of the service to a second preset number of cluster nodes of the second node of the registration center through the first configuration item;

[0016] The sum of the first preset number and the second preset number is the number of cluster nodes where the first version of the service is deployed.

[0017] According to one aspect of the present application, the method further comprises:

[0018] Suspend the services of the first version of the service cluster nodes;

[0019] Start the services of the second version of the service cluster node.

[0020] In a second aspect, an embodiment of the present application provides a system deployment device, the device comprising:

[0021] A setting module, used to set blue-green version configuration items, where the blue-green version configuration items include a first configuration item;

[0022] A determination module, used to determine, based on the extended load balancing strategy, that the service cluster node that deploys the first version corresponds to the first node of the registration center, and that the service cluster node that does not deploy the first version corresponds to the second node of the registration center;

[0023] A deployment module, used to deploy the second version of the service to the cluster node corresponding to the second node of the registration center through the first configuration item;

[0024] Among them, the second version is higher than the first version.

[0025] According to one aspect of the present application, the setting module is used to set a blue-green version configuration item, the blue-green version configuration item includes a first configuration item, and the blue-green version configuration item also includes a second configuration item;

[0026] The offline module is used to offline all nodes of the first version of the service cluster corresponding to the first node of the registration center through the second configuration item.

[0027] According to one aspect of the present application, a deployment module is used to deploy a second version of a service to a cluster node corresponding to a second node of a registration center through a first configuration item, including:

[0028] An offline module, configured to offline a first preset number of nodes of the first version service cluster node through a second configuration item when the traffic of the first version service is lower than a preset threshold;

[0029] A deployment module, used to deploy the second version of the service to a first preset number of cluster nodes of the second node of the registration center through the first configuration item, where the first preset number of cluster nodes of the second node of the registration center is the first preset number of nodes of the first version of the service cluster;

[0030] The offline module is further used to offline a second preset number of nodes of the first version service cluster through a second configuration item;

[0031] The deployment module is further used to deploy the second version of the service to a second preset number of cluster nodes of the second node of the registration center through the first configuration item;

[0032] The sum of the first preset number and the second preset number is the number of cluster nodes where the first version of the service is deployed.

[0033] According to one aspect of the present application, the device further includes:

[0034] A pause module, used to pause the service of the first version of the service cluster node;

[0035] The startup module is used to start the service of the second version of the service cluster node.

[0036] In a third aspect, an embodiment of the present application provides a system deployment device, the device comprising:

[0037] a processor, and a memory storing computer program instructions;

[0038] The processor reads and executes computer program instructions to implement the system deployment method of the first aspect.

[0039] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and when the computer program instructions are executed by a processor, the system deployment method of the first aspect is implemented.

[0040] In a fifth aspect, an embodiment of the present application provides a computer program product, characterized in that when instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the system deployment method of the first aspect.

[0041] The system deployment method, apparatus, equipment, computer storage medium and computer program product of the embodiments of the present application can deploy different versions of services on service cluster nodes under different nodes of the same registration center by setting configuration items and determining different versions of service cluster nodes corresponding to different registration centers based on an extended load balancing strategy, thereby avoiding the waste of resources caused by deploying different versions of services in different registration centers. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0043] Figure 1 It is a flowchart of a system deployment method provided in an embodiment of the present application;

[0044] Figure 2 It is a schematic diagram of a system deployment method provided in an embodiment of the present application;

[0045] Figure 3 It is a schematic diagram of a system deployment method provided in an embodiment of the present application;

[0046] Figure 4 It is a schematic diagram of a system deployment method provided in an embodiment of the present application;

[0047] Figure 5 It is a schematic diagram of a system deployment method provided in an embodiment of the present application;

[0048] Figure 6 It is a structural diagram of a system deployment device provided in an embodiment of the present application;

[0049] Figure 7 It is a structural diagram of a system deployment device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0050] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.

[0051] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0052] The existing blue-green deployment for distributed architecture means running two versions of the application at the same time. The new version of the service is directly deployed without stopping the old version of the service. After the new version of the service is running, all traffic is switched to the new version of the service. When deploying a new version of the service, a new registration center needs to be deployed, and the new version of the service is registered on the new registration center. Only by registering different versions of the service on two registration centers can the nodes of different versions of the service be isolated and will not call each other. However, the above method requires twice the service resources during the upgrade process, which will cause resource waste.

[0053] In order to solve the problems of the prior art, the embodiments of the present application provide a system deployment method, apparatus, device, computer storage medium and computer program product. The system deployment method provided by the embodiments of the present application is first introduced below.

[0054] Figure 1 FIG. 1 is a flow chart showing a system deployment method provided by an embodiment of the present application. Figure 1 As shown, the method may include the following steps:

[0055] S110. Set blue-green version configuration items, where the blue-green version configuration items include a first configuration item.

[0056] In the Apollo configuration center, set the first configuration item of the blue-green version. Setting the first configuration item of the blue-green version includes: modifying the value of the blue-green version configuration item. For example, modify the original configuration item "version = 1" to "version = 2", and the modified "version = 2" is the first configuration item. The value of the first configuration item takes effect after the service program is restarted. Among them, the configuration item is used for the application service to configure and set according to the configuration item value.

[0057] S120. Determine, based on the extended load balancing strategy, that the service cluster node where the first version is deployed corresponds to the first node of the registration center, and that the service cluster node where the first version is not deployed corresponds to the second node of the registration center.

[0058] Based on the extended load balancing strategy, service nodes of the same version can be filtered out, and the service cluster nodes that have deployed the first version correspond to the first node of the registration center, and the service cluster nodes that have not deployed the first version correspond to the second node of the registration center, where the first node of the registration center and the second node of the registration center are two nodes of the same registration center; the extended load balancing strategy corresponds to the load balancing strategy class.

[0059] In one example, the extended load balancing strategy is "DiscoveryPredicate", and the corresponding load balancing strategy class is "DiscoveryRule". "DiscoveryPredicate" can be used to filter out service nodes of the same version.

[0060] The default load balancing strategy used when a distributed system is deployed is "ZoneAvoidanceRule", which filters nodes through the "ZoneAvoidancePredicate" class method. In this strategy, the nodes of the called service are filtered to obtain available nodes. The extended load balancing strategy "DiscoveryPredicate" defined in the embodiment of the present application is used as the default load balancing strategy for all application services in the entire system, and the service nodes of the same version are filtered out. The specific implementation method is as follows: The blue-green version information of the service node is configured to the metadata of the node with the help of the Spring configuration item "eureka.instance.metadata-map". When a node registers with the registration center, the request will carry the full information of the node, including metadata. When the service node synchronizes the service list with the registration center, it will also obtain the metadata information of all nodes, so as to know the blue-green version of each service node, which can be compared with its own version when calling.

[0061] S130. Deploy a second version of the service to the cluster node corresponding to the second node of the registration center through the first configuration item; wherein the second version is higher than the first version.

[0062] The second version of the service is deployed on the cluster node under the second node of the registration center, and the second version of the service is deployed through the first configuration item, that is, the configuration value corresponding to the application service is set according to the configuration item value. Among them, the second version is higher than the first version, which means that the second version of the service is a new service and the first version of the service is an old service.

[0063] In one example, if Figure 2 In the manner of deploying the second version of the service shown, all traffic points to the first version of the service. The first version of the service cluster includes server 1 and server 2. Server 1 includes node 1 of application A and node 1 of application B. Server 2 includes node 2 of application A and node 2 of application B. Among them, node 1 of application A and node 1 of application B, node 1 of application A and node 2 of application B have a mutual calling relationship; node 2 of application A and node 1 of application B, node 2 of application A and node 2 of application B have a mutual calling relationship. When it is confirmed through nginx that all traffic points to the first version of the service cluster, the second version of the service is deployed on a new server where the first version of the service is not deployed, that is, the second version of the service cluster includes server 3 and server 4. Server 3 includes node 1 of application A and node 1 of application B, and server 4 includes node 2 of application A and node 2 of application B. Among them, node 1 of application A and node 1 of application B, node 1 of application A and node 2 of application B have a mutual calling relationship; node 2 of application A and node 1 of application B, node 2 of application A and node 2 of application B have a mutual calling relationship. The cluster of the first version service registers and pulls the service list through the first node of the registration center, and the cluster of the second version service registers and pulls the service list through the second node of the registration center, wherein the first node of the registration center and the second node of the registration center belong to the same registration center cluster. Specifically, all traffic directed to the first version service cluster refers to that all services of the server are provided by the first version service cluster.

[0064] The system deployment method provided in the embodiment of the present application can deploy different versions of services in service cluster nodes under different nodes of the same registration center through an extended load balancing strategy, thereby avoiding the waste of resources caused by deploying different versions of services in different registration centers.

[0065] In some embodiments, the blue-green version configuration item also includes a second configuration item; all nodes of the first version of the service cluster corresponding to the first node of the registration center are offline through the second configuration item. The Apollo configuration center also includes a second configuration item, and the second configuration item corresponds to the configuration of the first version of the service cluster node. After the second version of the service is deployed, the cluster node of the deployed first version of the service is offline. At this time, the registration center only runs the second version of the service.

[0066] In an example, the second configuration item is "version=v1", and the first configuration item obtained after modification is "version=2", that is, the first version of the service is v1, and the second version of the service is v2.

[0067] In some embodiments, when setting configuration items, the configuration item name and value can be customized, for example, "version = v1". According to the configuration item "eureka.instance.metadata-map" provided by Spring, add another configuration item "eureka.instance.metadata-map.version = v1". When the service node sends a registration request to the registration center, the key-value pairs under "eureka.instance.metadata-map" will be converted into a Map and sent to the registration center as the "metadata" of the node. The registration center will save the data. When other service nodes synchronize the service list with the registration center, they will also obtain the metadata information of all nodes, so as to know the blue-green version of each service node, which can be compared with their own version when calling.

[0068] In some embodiments, before taking the cluster nodes of the deployed first version of the service offline, the deployed second version of the service needs to be verified, that is, the deployed second version of the service is started, and when the deployed second version of the service can run normally, the cluster nodes of the deployed first version of the service are taken offline. If the deployed second version of the service cannot run normally, switch to the first version of the service, complete the upgrade rollback, and then redeploy the second version of the service.

[0069] In some embodiments, deploying the second version of the service to the service cluster node corresponding to the second node of the registration center through the first configuration item also includes: when the traffic of the first version of the service is lower than the preset threshold, taking the first preset number of nodes of the service cluster node of the first version offline through the second configuration item; deploying the second version of the service to the first preset number of cluster nodes of the second node of the registration center through the first configuration item, the first preset number of cluster nodes of the second node of the registration center is the first preset number of nodes of the service cluster of the first version; taking the second preset number of nodes of the service cluster of the first version offline through the second configuration item; deploying the second version of the service to the second preset number of cluster nodes of the second node of the registration center through the first configuration item; wherein the sum of the first preset number and the second preset number is the number of cluster nodes deploying the first version of the service. When the traffic of the first version of the service is lower than the preset threshold, it is a low-peak traffic period, and the first preset number of nodes of the service cluster node of the first version are taken offline, and all traffic is directed to the first version of the service. Deploy the second version of the service on the first preset number of nodes offline, and then take the second preset number of nodes of the first version offline. Deploy the second version of the service on the second preset number of nodes of the first version offline, and at this time, the second version of the service is deployed.

[0070] In one embodiment, all traffic is directed to the first version service. The first version service cluster includes server 1 and server 2. Server 1 includes node 1 of application A and node 1 of application B. Server 2 includes node 2 of application A and node 2 of application B. Node 1 of application A and node 1 of application B, node 1 of application A and node 2 of application B have a mutual calling relationship; node 2 of application A and node 1 of application B, node 2 of application A and node 2 of application B have a mutual calling relationship. Figure 3 The second version of the service deployment method shown in the figure takes half of the nodes in the first version of the service cluster offline, that is, the nodes of server 2 offline. At this time, all traffic is directed to the remaining half of the nodes, that is, the nodes of server 1. The second version of the service is deployed on the half of the offline nodes. At this time, the deployment of half of the nodes of the second version of the service is completed. Then Figure 4 As shown in Figure 1, the remaining half of the nodes of the first version service are offline, and all traffic is directed to the half of the nodes where the second version service has been deployed. Figure 5 As shown, the second version of the service is deployed on the remaining half of the nodes. At this time, the second version of the service is deployed and all traffic is directed to all nodes of the second version of the service.

[0071] In some embodiments, the method further includes: suspending the service of the first version of the service cluster node; and starting the service of the second version of the service cluster node. After completing the deployment of the second version of the service, suspending the service of the first version of the service cluster node; starting the service of the second version of the service cluster node, and completing the initialization of the application through the first configuration item when starting the second version of the service.

[0072] The system deployment method provided in the embodiment of the present application determines service cluster nodes of different versions through an extended load balancing strategy, corresponds service cluster nodes of different versions to different registration center nodes, and implements the deployment of new version services through configuration items. The blue-green deployment solution can be completed in one registration center, reducing resource waste.

[0073] Figure 6 Schematic diagram of a device structure provided in an embodiment of the present application. Figure 6 As shown, the device 600 may include a setting module 610 , a determination module 620 and a deployment module 630 .

[0074] The setting module 610 is used to set the blue-green version configuration items, and the blue-green version configuration items include the first configuration item.

[0075] The determination module 620 is used to determine, based on the extended load balancing strategy, that the service cluster node deploying the first version corresponds to the first node of the registration center, and that the service cluster node not deploying the first version corresponds to the second node of the registration center.

[0076] The deployment module 630 is used to deploy the second version of the service to the cluster node corresponding to the second node of the registration center through the first configuration item.

[0077] Among them, the second version is higher than the first version.

[0078] The system deployment device 600 provided in the embodiment of the present application can deploy different versions of services in service cluster nodes under different nodes of the same registration center through an extended load balancing strategy, thereby avoiding the waste of resources caused by deploying different versions of services in different registration centers.

[0079] In some embodiments, the setting module 610 is used to set the blue-green version configuration item, the blue-green version configuration item includes a first configuration item, and the blue-green version configuration item also includes a second configuration item; the offline module 640 is used to offline all nodes of the first version of the service cluster corresponding to the first node of the registration center through the second configuration item.

[0080] In some embodiments, a deployment module 630 is used to deploy a second version of the service to the cluster nodes corresponding to the second node of the registration center through a first configuration item, including: an offline module 640, used to take offline a first preset number of nodes of the first version service cluster node through a second configuration item when the traffic of the first version service is lower than a preset threshold; the deployment module 630 is used to deploy the second version of the service to the first preset number of cluster nodes of the second node of the registration center through the first configuration item, and the first preset number of cluster nodes of the second node of the registration center is the first preset number of nodes of the first version service cluster; the offline module 640 is also used to take offline the second preset number of nodes of the first version service cluster through the second configuration item; the deployment module 630 is also used to deploy the second version of the service to the second preset number of cluster nodes of the second node of the registration center through the first configuration item; wherein the sum of the first preset number and the second preset number is the number of cluster nodes deploying the first version of the service.

[0081] In some embodiments, the apparatus further includes: a pause module 650 for pausing the service of the service cluster node of the first version; and a start module 660 for starting the service of the service cluster node of the second version.

[0082] The system deployment device provided in the embodiment of the present application can prevent service nodes of different versions from calling each other based on an extended load balancing strategy, thereby achieving isolation of services of different versions, corresponding services of different versions to different nodes of the same registration center cluster and deploying the second version of the service, thereby reducing waste of resources.

[0083] Figure 6 Each module in the device shown has the function of realizing Figure 1 The functions of each step executed by the system deployment method can achieve its corresponding technical effects. For the sake of brevity, they will not be repeated here.

[0084] Figure 7 A schematic diagram of the hardware structure of the system deployment device provided in an embodiment of the present application is shown.

[0085] The system deployment device may include a processor 701 and a memory 702 storing computer program instructions.

[0086] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.

[0087] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In one example, the memory 702 may include a removable or non-removable (or fixed) medium, or the memory 702 is a non-volatile solid-state memory. The memory 702 may be inside or outside the integrated gateway disaster recovery device.

[0088] In one example, the memory 702 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, typically, the memory 702 includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present application.

[0089] The processor 701 reads and executes the computer program instructions stored in the memory 702 to implement Figure 1 The method / steps S110 to S130 in the embodiment shown in the figure are achieved Figure 1 The corresponding technical effects achieved by executing the methods / steps in the example shown are not repeated here for the sake of brevity.

[0090] In one example, the system deployment device may further include a communication interface 703 and a bus 710. Figure 7 As shown, the processor 701, the memory 702, and the communication interface 703 are connected via a bus 710 and communicate with each other.

[0091] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.

[0092] Bus 710 includes hardware, software or both, and the parts of system deployment equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (Accelerated Graphics Port, AGP) or other graphics bus, enhanced industry standard architecture (Extended Industry Standard Architecture, EISA) bus, front side bus (Front Side Bus, FSB), hypertransmission (Hyper Transport, HT) interconnection, industry standard architecture (IndustryStandard Architecture, ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 710 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the application considers any suitable bus or interconnection.

[0093] The system deployment device can execute the system deployment method in the embodiment of the present application based on the extended load balancing strategy, thereby realizing the combination of Figure 1 Describes the system deployment method.

[0094] In addition, in combination with the system deployment method in the above embodiments, the present application embodiment can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the system deployment methods in the above embodiments is implemented.

[0095] In addition, in combination with the system deployment method in the above embodiment, the embodiment of the present application can provide a computer program product. When the instructions in the computer program product are executed by the processor of the electronic device, the electronic device executes any one of the system deployment methods in the above embodiment.

[0096] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.

[0097] The functional blocks shown in the above block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), appropriate firmware, plug-in, function card, etc. When implemented in software, the elements of the present application are programs or code segments used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or communication link by a data signal carried in a carrier. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (Radio Frequency, RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.

[0098] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.

[0099] The above reference is according to the method of the embodiment of the present application, the flow chart of the device (system) and the computer program product and / or the block diagram described various aspects of the present application.It should be understood that each square box in the flow chart and / or the block diagram and the combination of each square box in the flow chart and / or the block diagram can be realized by computer program instructions.These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the realization of the function / action specified in one or more square boxes of the flow chart and / or the block diagram.Such a processor can be but is not limited to a general-purpose processor, a special-purpose processor, a special application processor or a field programmable logic circuit.It can also be understood that each square box in the block diagram and / or the flow chart and the combination of the square boxes in the block diagram and / or the flow chart can also be realized by the dedicated hardware that performs the specified function or action, or can be realized by the combination of dedicated hardware and computer instructions.

[0100] The above are only specific implementation methods of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.

Claims

1. A system deployment method, characterized in that: include: Set a blue-green version configuration item, wherein the blue-green version configuration item includes a first configuration item and a second configuration item; Determine based on the extended load balancing strategy that the service cluster node that deploys the first version corresponds to the first node of the registration center, and the service cluster node that does not deploy the first version corresponds to the second node of the registration center; Deploy the second version of the service to the cluster node corresponding to the second node of the registration center through the first configuration item; The deploying the second version of the service to the service cluster node corresponding to the second node of the registration center through the first configuration item also includes: When the traffic of the first version service is lower than a preset threshold, a first preset number of nodes of the first version service cluster node are taken offline through the second configuration item; Deploy the second version service to a first preset number of cluster nodes of the second node of the registration center through the first configuration item, where the first preset number of cluster nodes of the second node of the registration center is the first preset number of nodes of the first version service cluster; Taking offline a second preset number of nodes of the first version service cluster through a second configuration item; The second version of the service is deployed on a second preset number of cluster nodes of the second node of the registration center through the first configuration item; wherein the sum of the first preset number and the second preset number is the number of cluster nodes deploying the first version of the service, and the second version is higher than the first version.

2. The method according to claim 1, characterized in that All nodes of the first version of the service cluster corresponding to the first node of the registration center are taken offline through the second configuration item.

3. The method according to claim 1, characterized in that The method further comprises: Suspend the services of the first version of the service cluster nodes; Start the services of the second version of the service cluster node.

4. A system deployment device, characterized in that: The device comprises: A setting module, used to set a blue-green version configuration item, wherein the blue-green version configuration item includes a first configuration item and a second configuration item; A determination module, used to determine, based on the extended load balancing strategy, that the service cluster node that deploys the first version corresponds to the first node of the registration center, and that the service cluster node that does not deploy the first version corresponds to the second node of the registration center; A deployment module, used to deploy the second version of the service to the cluster node corresponding to the second node of the registration center through the first configuration item; The deployment module is used to deploy the second version of the service to the cluster node corresponding to the second node of the registration center through the first configuration item, including: An offline module, configured to offline a first preset number of nodes of the first version service cluster node through a second configuration item when the traffic of the first version service is lower than a preset threshold; The deployment module is used to deploy the second version service to a first preset number of cluster nodes of the second node of the registration center through the first configuration item, where the first preset number of cluster nodes of the second node of the registration center is the first preset number of nodes of the first version service cluster; The offline module is further used to offline a second preset number of nodes of the first version service cluster through a second configuration item; The deployment module is also used to deploy a second version of the service to a second preset number of cluster nodes of the second node of the registration center through the first configuration item; wherein the sum of the first preset number and the second preset number is the number of cluster nodes deploying the first version of the service, and the second version is higher than the first version.

5. The device according to claim 4, characterized in that The setting module is used to set a blue-green version configuration item, the blue-green version configuration item includes a first configuration item, and the blue-green version configuration item also includes a second configuration item; The offline module is used to offline all nodes of the first version of the service cluster corresponding to the first node of the registration center through the second configuration item.

6. The device according to claim 4, characterized in that The device also includes: A pause module, used to pause the service of the first version of the service cluster node; The startup module is used to start the service of the second version of the service cluster node.

7. A system deployment device, characterized in that: The system deployment device includes: a processor, and a memory storing computer program instructions; The processor reads and executes the computer program instructions to implement the system deployment method according to any one of claims 1 to 3.

8. A computer storage medium, characterized in that: The computer storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the system deployment method according to any one of claims 1 to 3 is implemented.

9. A computer program product, characterized in that When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device is enabled to execute the system deployment method as described in any one of claims 1 to 3.

Citation Information

Patent Citations

  • Server cluster hybrid deployment method, cluster management node and related system

    CN111858050A

  • Blue-green deployment system and method based on registration center component and storage medium

    CN112073240A

  • Load balancing method and device for distributed system and electronic equipment

    CN112506643A

  • Multimedia service system and method based on blue-green deployment

    CN113691583A

  • Deploying programs in a cluster node

    US20150188995A1