A grayscale release processing method, device, equipment and medium
By responding to grayscale release request instructions in the microservice architecture, finding and passing grayscale instance tags are made to route the microservice architecture, solving the problems of high cost and difficulty of full-link grayscale in the existing technology, and achieving efficient grayscale release.
Patent Information
- Application Number
- CN202210863121.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-20
- Publication Date
- 2025-03-11
- Estimated Expiration
- 2042-07-20
AI Technical Summary
When implementing full-link grayscale grayscale, the existing grayscale release platforms on the market require corresponding access and transformation of the microservice architecture, resulting in high costs and high difficulty.
Provides a method of handling grayscale publishing. By responding to the grayscale publishing request instructions of the microservice architecture, it finds the corresponding grayscale instance tag, and passes the tags to other microservice architectures, so that they can route and enable grayscale instances until all microservice architectures are routed.
The grayscale release process is simplified, the efficiency of grayscale release is improved, and there is no need to transform the microservice architecture.
Smart Images

Figure CN115208869B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of cloud deployment technology, and in particular to a method, device, equipment and medium for processing grayscale release. Background Art
[0002] Most of the current Internet e-commerce platforms use microservice architecture, and there are many microservice architectures. The structure of a single microservice architecture is simple, but the overall system structure is complex. When the system releases some applications, it is necessary to consider the compatibility of the upstream and downstream microservice architectures. The use of grayscale release allows us to know in advance whether there are compatibility issues when the application is released. If the grayscale release platform on the existing market needs to achieve full-link grayscale, the microservice architecture needs to be connected and transformed accordingly, which leads to high costs and high difficulty. Summary of the invention
[0003] In view of the above-mentioned shortcomings of the prior art, an object of the present invention is to provide a method, device, equipment and medium for processing grayscale release, which can improve the problem that grayscale release is relatively complicated.
[0004] In a first aspect, a method for processing grayscale release is provided, which is applied to a server, wherein the server includes multiple microservice architectures, and the processing method includes:
[0005] In response to a grayscale release request instruction of a certain microservice architecture, a label of a corresponding grayscale instance is found, wherein the microservice architecture is represented as an initial grayscale microservice architecture;
[0006] The initial grayscale microservice architecture calls the other microservice architectures, and transparently transmits the label to the other microservice architectures, so that the other microservice architectures perform routing selection and enable the corresponding grayscale instance, wherein the microservice architecture that has performed routing selection is represented as the final microservice architecture;
[0007] The multiple final microservice architectures respectively call other microservice architectures and pass the labels to the corresponding microservice architectures so that other microservice architectures can perform routing selection and enable the corresponding grayscale instances until all the microservice architectures perform routing selection.
[0008] In a second aspect, a device for processing grayscale release is provided, including:
[0009] A label search module, used for finding a label of a corresponding grayscale instance in response to a grayscale release request instruction of a certain microservice architecture, wherein the microservice architecture is represented as an initial grayscale microservice architecture;
[0010] A preliminary calling module, used to call other microservice architectures through the initial grayscale microservice architecture, and transparently transmit the label to other microservice architectures, so that other microservice architectures perform routing selection and enable the corresponding grayscale instance, wherein the microservice architecture that has performed routing selection is represented as the final microservice architecture; and
[0011] The termination calling module is used to call other microservice architectures through the initial grayscale microservice architecture and multiple final microservice architectures, and pass the label to the corresponding microservice architecture to enable other microservice architectures to perform routing selection and enable the corresponding grayscale instance until all the microservice architectures perform routing selection.
[0012] In a third aspect, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned grayscale release processing method when executing the computer program.
[0013] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned grayscale release processing method are implemented.
[0014] As described above, the present invention provides a grayscale publishing processing method, device, equipment and medium, which can determine the corresponding grayscale instance according to the grayscale publishing request instruction for the grayscale publishing process, first pass the label to a certain microservice architecture to enable the grayscale instance, and then the microservice architecture can call the remaining microservice architectures multiple times, and pass the label to the remaining microservice architectures, so that the remaining microservice architectures can perform routing selection. When grayscale publishing, there is no need to modify the microservice architecture, which can simplify the grayscale publishing process and improve the efficiency of grayscale publishing. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for describing the embodiments are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0016] Figure 1 Shown is a schematic diagram of an application environment of a method for processing grayscale release in an embodiment of the present invention.
[0017] Figure 2 It is a flowchart of a method for processing grayscale release in one embodiment of the present invention.
[0018] Figure 3 yes Figure 2 A schematic flow chart of a specific implementation of step S30 in FIG.
[0019] Figure 4 yes Figure 2 A schematic flow chart of a specific implementation of step S40 in FIG.
[0020] Figure 5 It is a structural diagram of a processing device for grayscale publishing in one embodiment of the present invention.
[0021] Figure 6 yes Figure 4 A structural diagram of the initial call module.
[0022] Figure 7 yes Figure 4 A structural diagram of the termination call module.
[0023] Figure 8 is a schematic diagram of a structure of a computer device in one embodiment of the present invention;
[0024] Fig. 9 It is another structural schematic diagram of a computer device in one embodiment of the present invention.
[0025] Component number description:
[0026] 10. Tag search module; 20. Grayscale environment judgment module; 30. Preliminary call module; 31. Initial call module; 32. Initial grayscale judgment module; 40. Termination call module; 41. Termination call module; 42. Termination grayscale judgment module; 50. Monitoring module. DETAILED DESCRIPTION
[0027] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0028] A grayscale publishing processing method provided by an embodiment of the present invention can be applied in the following aspects: Figure 1In an application environment, the client can communicate with the server through a network. There are multiple microservice architectures in the server, and each microservice architecture can become a client. The server can receive a grayscale release request instruction through the client, and the server matches the corresponding grayscale rule according to the grayscale release request instruction, and performs grayscale release processing on multiple microservice architectures in the server. Since there may be multiple instances in the microservice architecture, such as ordinary instances, grayscale instances, and other service instances, the server can release the grayscale release request instruction of the microservice architecture of the grayscale instance as needed, and the label of the grayscale instance corresponding to the grayscale release request instruction can be transparently transmitted to other microservice architectures, so that other microservice architectures can select the corresponding grayscale instance. Each microservice architecture with a label will transparently transmit the label to other microservice architectures until all microservice architectures have labels, at which time all microservice architectures have selected grayscale instances or ordinary instances. Among them, the client can be but is not limited to various personal computers, laptops, smart phones, tablet computers, and portable wearable devices. The server can be implemented with an independent server or a server cluster consisting of multiple servers. The present invention is described in detail below through specific embodiments.
[0029] See also Figure 2 As shown, Figure 2 A flowchart of a method for processing a grayscale release provided by an embodiment of the present invention is provided. The method may include the following steps:
[0030] S10. In response to a grayscale release request instruction of a microservice architecture, find the label of the corresponding grayscale instance, wherein the microservice architecture is represented as the initial grayscale microservice architecture. The grayscale release request instruction includes the grayscale instance name, current IP address, current version information, interface name, header parameters and body parameters. The server includes multiple microservice architectures, and the interface of the server includes a client request entry and an open source distributed service framework (Dubbo) interface.
[0031] In one embodiment of the present invention, specifically, when executing step S10, the grayscale publishing request instruction can be responded to first, the interface name, header parameter and body parameter in the grayscale publishing request instruction can be extracted, and the grayscale instance can be found through the interface name, the header parameter and the body parameter, and the grayscale instance has a unique label. When grayscale publishing is required in the server, a certain microservice architecture can issue a grayscale publishing request instruction to the server, and the grayscale publishing request instruction can include the grayscale instance name, the current IP address, the current version, the interface name, the header parameter and the body parameter. The interface name, the header parameter and the body parameter correspond to the grayscale instance, and the unique grayscale instance is found through the interface name, the header parameter and the body parameter, and the grayscale instance has a unique label. The grayscale instance name can refer to the name of the grayscale instance to be published. The current IP address can refer to the IP address (Internet Protocol Address) of the server. The current version information can refer to the current version information of the grayscale instance. Since the grayscale instance may have different version information, it is necessary to determine the specific version information of the grayscale instance to be published to prevent deviations when searching for the grayscale instance. The interface name can be the interface for external requests of MAPI (Messaging Application Programming Interface) or the interface for internal service requests of Dubbo (distributed service framework). The header parameter can be the request header parameter. In the http protocol, a request is sent to the server, and the data is divided into three parts. The first is to put the data in the url (uniform resource locator), the second is to put the data in the body (i.e. body parameter) (in the post request), and the third is to put the data in the head (i.e. header parameter). After a microservice architecture sends a grayscale release request instruction to the server, the server receives the grayscale release request instruction of a microservice architecture through its interface, and starts to process multiple microservice architectures in the server, so that the microservice architecture can select the corresponding grayscale instance. The interface can be the request entry of a microservice architecture or the interface of the open source distributed service framework (Dubbo).
[0032] S20. Determine whether the grayscale instance corresponding to the grayscale release request instruction is in the grayscale environment of the microservice architecture. If it is in the grayscale environment, set the label of the grayscale instance in the configuration center of the server. If it is not in the grayscale environment, cancel this grayscale release. The grayscale rules of the grayscale environment include the entry protocol type, service and version, service name, label, grayscale name, rule information, rule version and rule type. Each grayscale instance has a corresponding label, and the label corresponds to the grayscale instance.
[0033] In one embodiment of the present invention, since different instances may exist in multiple microservice architectures on the server side, for example, there may be common instances, grayscale instances, and other service instances in a certain microservice architecture. Among them, common instances may refer to instances currently used by multiple microservice architectures on the server side, grayscale instances may refer to instances that need to be newly enabled in multiple microservice architectures on the server side, and other service instances may refer to the remaining instances to be enabled in the microservice architecture. Common instances, grayscale instances, and other service instances may have different versions, so it is necessary to determine whether the grayscale instance corresponding to the grayscale release request instruction is in the grayscale environment of the server side.
[0034] In one embodiment of the present invention, when judging whether the grayscale instance corresponding to the grayscale release request instruction is in the grayscale environment of the server, it is necessary to extract the corresponding information in the grayscale release request instruction, and judge whether the corresponding information in the grayscale release request instruction conforms to the grayscale rules of the grayscale environment. The grayscale instance name, current IP address, current version information, interface name, header parameter and body parameter in the grayscale release request instruction can be judged respectively with the corresponding information in the grayscale rule to determine the corresponding grayscale instance. If the corresponding grayscale instance is in the grayscale environment, the label of the grayscale instance is set in the configuration center of the server. The grayscale rules of the grayscale environment may include the entry protocol type, service and version, service name, label, grayscale name, rule information, rule version and rule type. Among them, the entry protocol type may be an interface for external requests of MAPI (Messaging Application Programming Interface), or an interface for internal service requests of Dubbo (distributed service framework). The service and version may be the service provided by the microservice architecture and the corresponding service version. The service name may be the name of the service provided by the microservice architecture, and the service name is enabled when the entry protocol type is the interface for internal service requests of Dubbo (distributed service framework). The label may be the label of the grayscale rule. The grayscale name may be the name of the instance included in the microservice architecture. The rule information may be when the entry protocol type may be MAPI, the corresponding information in the grayscale release request instruction is judged according to the header parameter, body parameter and cookie. The rule version may be the version information of the grayscale rule. The rule type may be the type of the grayscale rule, and the SCRIPT script type may generally be adopted.
[0035] S30. The initial grayscale microservice architecture calls other microservice architectures and transmits the labels to other microservice architectures, so that other microservice architectures can perform routing selection and enable corresponding grayscale instances. The microservice architecture that has performed routing selection is represented as the final microservice architecture.
[0036] See also Figure 3As shown, in one embodiment of the present invention, when step S30 is executed, the initial grayscale microservice architecture calls other microservice architectures, and transparently transmits the labels to other microservice architectures, so that other microservice architectures perform routing selection and enable corresponding grayscale instances, wherein the microservice architecture that has performed routing selection is represented as the final microservice architecture. Specifically, the sub-steps of step S30 may include:
[0037] S31. The initial grayscale microservice architecture calls other microservice architectures and transmits the labels to other microservice architectures.
[0038] S32. Determine whether other microservice architectures include a grayscale instance corresponding to the label.
[0039] S33. If a microservice architecture includes a grayscale instance corresponding to the label, the microservice architecture enables the grayscale instance, and the microservice architecture is represented as the final microservice architecture.
[0040] S34. If a microservice architecture does not include a grayscale instance corresponding to a label, the microservice architecture enables a common instance, and the microservice architecture is represented as the final microservice architecture.
[0041] In one embodiment of the present invention, when the grayscale instance in the initial grayscale microservice frame is enabled, the initial grayscale microservice frame will call other microservice architectures and pass the label to other microservice architectures. When other microservice architectures receive the label, the microservice architecture can perform routing selection according to the label. Since the microservice architecture may or may not have a corresponding grayscale instance, it is necessary to judge it. When a microservice architecture includes a grayscale instance corresponding to the label, the microservice architecture can deactivate the ordinary instance and start to enable the grayscale instance, or it can also enable the ordinary instance and the grayscale instance at the same time. When a microservice architecture does not include a grayscale instance corresponding to the label, the microservice architecture can only enable the ordinary instance. Among them, the microservice architecture that has been routed is represented as the final microservice architecture.
[0042] S40, the initial grayscale microservice architecture and multiple final microservice architectures call other microservice architectures respectively, and pass the labels to the corresponding microservice architectures, so that other microservice architectures can perform routing selection and enable corresponding grayscale instances until all microservice architectures have performed routing selection.
[0043] See also Figure 4As shown, in one embodiment of the present invention, when executing step S40, the initial grayscale microservice architecture and multiple final microservice architectures respectively call other microservice architectures, and pass the labels to the corresponding microservice architectures, so that other microservice architectures can perform routing selection and enable corresponding grayscale instances until all microservice architectures perform routing selection. Specifically, the sub-steps of step S40 may include:
[0044] S41, the initial grayscale microservice architecture and multiple final microservice architectures call other microservice architectures respectively, and pass the labels to other microservice architectures.
[0045] S42. Determine whether other microservice architectures include a grayscale instance corresponding to the label.
[0046] S43. If a microservice architecture includes a grayscale instance corresponding to the label, the microservice architecture enables the grayscale instance.
[0047] S44. If a microservice architecture does not include a grayscale instance corresponding to a label, the microservice architecture enables a normal instance.
[0048] S45. When all microservice architectures have completed routing selection, the grayscale release is completed.
[0049] In one embodiment of the present invention, after multiple routing selections, multiple microservice architectures with labels will be generated. At this time, these microservice architectures with labels can respectively call other microservice architectures without labels, and pass the labels to the corresponding microservice architectures so that other microservice architectures can perform routing selection until all microservice architectures have labels. Specifically, when microservice architecture A calls microservice architecture B, microservice architecture A can pass the labels to microservice architecture B so that microservice architecture B can perform routing selection. Because there may be grayscale instances in microservice architecture B, there may or may not be grayscale instances. When there are grayscale instances in microservice architecture B, microservice architecture B can disable ordinary instances and enable grayscale instances, or ordinary instances and grayscale instances can be enabled at the same time. When there are no grayscale instances in microservice architecture B, microservice architecture B can only enable ordinary instances. At this time, both microservice architecture A and microservice architecture B have labels. After this call is completed, microservice architecture A can call microservice architecture C, and microservice architecture B can call microservice architecture D, so that microservice architecture C and microservice architecture D can perform routing selection. After each microservice architecture calls a microservice architecture, it can also call other microservice architectures until all microservice architectures have labels. At this time, all microservice architectures have performed routing selection.
[0050] S50. During the grayscale release process, monitor the grayscale environment load and link call status to determine whether the grayscale release is normal. If normal, gradually enable the grayscale instances in the microservice architecture. If abnormal, stop the grayscale release.
[0051] In one embodiment of the present invention, during the grayscale release process, it is necessary to monitor multiple microservice architectures in the server in real time to prevent problems from occurring in the microservice architecture after the grayscale instance is enabled, which results in the inability to provide services externally. During the monitoring of the microservice architecture, the grayscale environment load and link call status can be monitored to determine whether the grayscale release is normal. If normal, the grayscale instances in the microservice architecture are gradually enabled. If not, the grayscale release is stopped.
[0052] It can be seen that in the above scheme, for the grayscale release process, the corresponding grayscale instance is determined according to the grayscale release request instruction, and the label can be first transmitted to a certain microservice architecture to enable the grayscale instance. After that, the microservice architecture can call the remaining microservice architectures multiple times and transmit the label to the remaining microservice architectures, so that the remaining microservice architectures can perform routing selection. When grayscale release is performed, there is no need to modify the microservice architecture, which can simplify the grayscale release process and improve the efficiency of grayscale release.
[0053] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0054] See also Figure 5 As shown, the present invention also provides a grayscale publishing processing device, which corresponds to the grayscale publishing processing method in the above embodiment. The processing device may include a tag search module 10, a grayscale environment judgment module 20, a preliminary call module 30, a termination call module 40 and a monitoring module 50.
[0055] In one embodiment of the present invention, the label search module 10 can be used to respond to the grayscale release request instruction of a certain microservice architecture to find the label of the corresponding grayscale instance, wherein the microservice architecture is represented as the initial grayscale microservice architecture. Specifically, when grayscale release is required in the server, a certain microservice architecture can issue a grayscale release request instruction to the server. The grayscale release request instruction may include the grayscale instance name, current IP address, current version, interface name, header parameter and body parameter. The interface name, header parameter and body parameter correspond to the grayscale instance. The unique grayscale instance is found through the interface name, header parameter and body parameter. The grayscale instance has a unique label. The grayscale instance name may refer to the name of the grayscale instance to be released. The current IP address may refer to the IP address (Internet Protocol Address) of the server. The current version information may refer to the current version information of the grayscale instance. Since the grayscale instance may have different version information, it is necessary to determine the specific version information of the released grayscale instance to prevent deviations when searching for the grayscale instance. The interface name can be an interface for external requests of MAPI (Messaging Application Programming Interface) or an interface for internal service requests of Dubbo (distributed service framework).
[0056] In one embodiment of the present invention, the grayscale environment judgment module 20 can be used to determine whether the grayscale instance corresponding to the grayscale release request instruction is in the grayscale environment of the microservice architecture. If it is in the grayscale environment, the label of the grayscale instance is set in the configuration center of the server. If it is not in the grayscale environment, the grayscale release is canceled. Among them, the grayscale rules of the grayscale environment include the entry protocol type, service and version, service name, label, grayscale name, rule information, rule version and rule type. Each grayscale instance has a corresponding label, and the label corresponds to the grayscale instance. Specifically, since different instances may exist in multiple microservice architectures on the server, for example, there are ordinary instances, grayscale instances and other service instances in a certain microservice architecture. Among them, ordinary instances can refer to instances currently used by multiple microservice architectures in the server, grayscale instances can refer to instances that need to be newly enabled in multiple microservice architectures in the server, and other service instances can refer to the remaining instances to be enabled in the microservice architecture. Ordinary instances, grayscale instances, and other service instances can have different versions, so it is necessary to determine whether the grayscale instance corresponding to the grayscale release request instruction is in the grayscale environment of the server.
[0057] See also Figure 6As shown, in one embodiment of the present invention, the preliminary calling module 30 can be used to call other microservice architectures according to the initial grayscale microservice architecture, and pass the label to other microservice architectures, so that other microservice architectures can perform routing selection and enable the corresponding grayscale instance, wherein the microservice architecture that has performed routing selection is represented as the final microservice architecture. The preliminary calling module 30 may include an initial calling module 31 and an initial grayscale judgment module 32. Among them, the initial calling module 31 can be used to call other microservice architectures through the initial grayscale microservice architecture, and pass the label to other microservice architectures. The initial grayscale judgment module 32 can be used to determine whether other microservice architectures include grayscale instances corresponding to the label. If a microservice architecture includes a grayscale instance corresponding to the label, the microservice architecture enables the grayscale instance, and the microservice architecture is represented as the final microservice architecture. If a microservice architecture does not include a grayscale instance corresponding to the label, the microservice architecture enables a common instance, and the microservice architecture is represented as the final microservice architecture.
[0058] See also Figure 7As shown, in one embodiment of the present invention, the termination call module 40 can be used to call other microservice architectures according to the initial grayscale microservice architecture and multiple final microservice architectures, and pass the label to the corresponding microservice architecture, so that other microservice architectures can perform routing selection and enable the corresponding grayscale instance until all microservice architectures perform routing selection. The termination call module 40 may include a termination call module 41 and a termination grayscale judgment module 42. Among them, the termination call module 41 can be used for the initial grayscale microservice architecture and multiple final microservice architectures to call other microservice architectures respectively, and pass the label to other microservice architectures. The termination grayscale judgment module 42 can be used to determine whether other microservice architectures include grayscale instances corresponding to the label. If a microservice architecture includes a grayscale instance corresponding to the label, the microservice architecture enables the grayscale instance. If a microservice architecture does not include a grayscale instance corresponding to the label, the microservice architecture enables a normal instance. When all microservice architectures perform routing selection, the grayscale release ends. Specifically, when microservice architecture A calls microservice architecture B, microservice architecture A can pass the label to microservice architecture B so that microservice architecture B can perform routing selection. Since there may be grayscale instances in microservice architecture B, there may be no grayscale instances. When there is a grayscale instance in microservice architecture B, microservice architecture B can disable the common instance and enable the grayscale instance, or enable the common instance and the grayscale instance at the same time. When there is no grayscale instance in microservice architecture B, microservice architecture B can only enable the common instance. At this time, both microservice architecture A and microservice architecture B have labels. After this call is completed, microservice architecture A can call microservice architecture C, and microservice architecture B can call microservice architecture D, so that microservice architecture C and microservice architecture D can perform routing selection. After each microservice architecture calls a microservice architecture, the microservice architecture can also call other microservice architectures until all microservice architectures have labels, and all microservice architectures have performed routing selection.
[0059] In one embodiment of the present invention, the monitoring module 50 can be used to monitor the grayscale environment load and link call status during the grayscale release process to determine whether the grayscale release is normal. If it is normal, the grayscale instances in the microservice architecture are gradually enabled. If it is abnormal, the grayscale release is stopped. Specifically, during the grayscale release process, it is necessary to monitor multiple microservice architectures in the server in real time to prevent problems from occurring in the microservice architecture after the grayscale instance is enabled, resulting in the inability to provide services to the outside. In the process of monitoring the microservice architecture, the grayscale environment load and link call status can be monitored to determine whether the grayscale release is normal. If it is normal, the grayscale instances in the microservice architecture are gradually enabled. If it is abnormal, the grayscale release is stopped.
[0060] The present invention provides a grayscale publishing processing device, which can determine the corresponding grayscale instance according to the grayscale publishing request instruction for the grayscale publishing process, and can first transparently transmit the label to a certain microservice architecture to enable the grayscale instance. After that, the microservice architecture can call the remaining microservice architectures multiple times, and transparently transmit the label to the remaining microservice architectures, so that the remaining microservice architectures can perform routing selection. When grayscale publishing, there is no need to modify the microservice architecture, which can simplify the grayscale publishing process and improve the efficiency of grayscale publishing.
[0061] For the specific definition of the grayscale release processing device, please refer to the definition of the grayscale release processing method above, which will not be repeated here. Each module in the above-mentioned grayscale release processing device can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0062] See also Figure 8 As shown, the present invention also provides a computer device, which can be a server. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile and / or volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external client through a network connection. When the computer program is executed by the processor, it realizes the functions or steps on the server side of a grayscale publishing processing method.
[0063] See also Fig. 9 As shown, the present invention also provides another computer device, which can be a client. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected via a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external server via a network connection. When the computer program is executed by the processor, it implements the functions or steps on the client side of a grayscale publishing processing method.
[0064] In one embodiment of the present invention, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0065] In response to a grayscale release request instruction of a certain microservice architecture, a label of a corresponding grayscale instance is found, wherein the microservice architecture is represented as an initial grayscale microservice architecture;
[0066] Determine whether the grayscale instance corresponding to the grayscale release request instruction is in the grayscale environment of the microservice architecture. If it is in the grayscale environment, set the label of the grayscale instance in the configuration center of the server;
[0067] The initial grayscale microservice architecture calls other microservice architectures and transparently transmits the labels to other microservice architectures, so that other microservice architectures can perform routing selection and enable the corresponding grayscale instances. The microservice architecture that has performed routing selection is represented as the final microservice architecture.
[0068] The initial grayscale microservice architecture and multiple final microservice architectures call other microservice architectures respectively, and pass the labels to the corresponding microservice architectures, so that other microservice architectures can perform routing selection and enable the corresponding grayscale instances until all microservice architectures perform routing selection;
[0069] During the grayscale release process, monitor the grayscale environment load and link call status to determine whether the grayscale release is normal. If normal, gradually enable the grayscale instances in the microservice architecture. If abnormal, stop the grayscale release.
[0070] In one embodiment of the present invention, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:
[0071] In response to a grayscale release request instruction of a certain microservice architecture, a label of a corresponding grayscale instance is found, wherein the microservice architecture is represented as an initial grayscale microservice architecture;
[0072] Determine whether the grayscale instance corresponding to the grayscale release request instruction is in the grayscale environment of the microservice architecture. If it is in the grayscale environment, set the label of the grayscale instance in the configuration center of the server;
[0073] The initial grayscale microservice architecture calls other microservice architectures and transparently transmits the labels to other microservice architectures, so that other microservice architectures can perform routing selection and enable the corresponding grayscale instances. The microservice architecture that has performed routing selection is represented as the final microservice architecture.
[0074] The initial grayscale microservice architecture and multiple final microservice architectures call other microservice architectures respectively, and pass the labels to the corresponding microservice architectures, so that other microservice architectures can perform routing selection and enable the corresponding grayscale instances until all microservice architectures perform routing selection;
[0075] During the grayscale release process, monitor the grayscale environment load and link call status to determine whether the grayscale release is normal. If normal, gradually enable the grayscale instances in the microservice architecture. If abnormal, stop the grayscale release.
[0076] It should be noted that the above functions or steps that can be implemented by the computer-readable storage medium or computer device can refer to the relevant descriptions on the server side and the client side in the aforementioned method embodiment. To avoid repetition, they will not be described one by one here.
[0077] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in the present application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0078] In the description of this specification, the description with reference to the terms "this embodiment", "example", "specific example", etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representation of the above terms does not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner.
[0079] The embodiments of the present invention disclosed above are only used to help illustrate the present invention. The embodiments do not describe all the details in detail, nor do they limit the invention to the specific embodiments described. Obviously, many modifications and changes can be made according to the content of this specification. This specification selects and specifically describes these embodiments in order to better explain the principles and practical applications of the present invention, so that those skilled in the art can understand and use the present invention well. The present invention is limited only by the claims and their full scope and equivalents.
Claims
1. A method for processing grayscale release, characterized in that: Applied to a server, the server includes multiple microservice architectures, and the processing method includes: In response to a grayscale release request instruction of a certain microservice architecture, a label of a corresponding grayscale instance is found, wherein the microservice architecture is represented as an initial grayscale microservice architecture; The initial grayscale microservice architecture calls other microservice architectures and transparently transmits the labels to other microservice architectures; Determine whether other microservice architectures include the grayscale instance corresponding to the label; If a certain microservice architecture includes the grayscale instance corresponding to the label, the microservice architecture enables the grayscale instance; If a microservice architecture does not include the grayscale instance corresponding to the label, the microservice architecture enables a common instance; wherein the microservice architecture that has undergone routing selection is represented as the final microservice architecture; The multiple final microservice architectures call other microservice architectures respectively, and transparently transmit the labels to the corresponding microservice architectures, so that the other microservice architectures perform routing selection and enable the corresponding grayscale instances until all microservice architectures perform routing selection; Monitor the load of the grayscale environment to determine whether the grayscale release is normal. If normal, gradually enable the grayscale instances in the microservice architecture. If abnormal, stop the grayscale release. Monitor the link call status of the grayscale environment to determine whether the grayscale release is normal. If normal, gradually enable the grayscale instances in the microservice architecture. If abnormal, stop the grayscale release.
2. The grayscale release processing method according to claim 1, characterized in that: In the step of responding to a grayscale release request instruction of a certain microservice architecture, finding a label of a corresponding grayscale instance includes: Responding to the grayscale release request instruction; Extracting the interface name, header parameters and body parameters in the grayscale publishing request instruction; A grayscale instance is searched through the interface name, the header parameter and the body parameter, wherein the grayscale instance has a unique label.
3. The grayscale release processing method according to claim 1, characterized in that: The step of finding the label of the corresponding grayscale instance in response to the grayscale release request instruction of a certain microservice architecture includes: determining whether the grayscale instance corresponding to the grayscale release request instruction is in the grayscale environment of the microservice architecture; if so, setting the label of the grayscale instance in the configuration center of the server; if not, canceling the grayscale release.
4. The grayscale release processing method according to claim 1, characterized in that: The steps of the multiple final microservice architectures respectively calling other microservice architectures and transparently transmitting the labels to the corresponding microservice architectures so that the other microservice architectures perform routing selection and enable the corresponding grayscale instances until all microservice architectures perform routing selection include: The multiple final microservice architectures respectively call other microservice architectures, and transparently transmit the labels to the other microservice architectures; Determine whether other microservice architectures include the grayscale instance corresponding to the label; If a certain microservice architecture includes the grayscale instance corresponding to the label, the microservice architecture enables the grayscale instance; If a microservice architecture does not include the grayscale instance corresponding to the label, the microservice architecture enables a common instance; When all microservice architectures have completed routing selection, the grayscale release is completed.
5. A grayscale release processing device, characterized in that: include: A label search module is used to find the label of the corresponding grayscale instance in response to a grayscale release request instruction of a certain microservice architecture, wherein the microservice architecture is represented as an initial grayscale microservice architecture; A preliminary calling module is used to call other microservice architectures and pass the label to other microservice architectures; determine whether other microservice architectures include the grayscale instance corresponding to the label; if a microservice architecture includes the grayscale instance corresponding to the label, the microservice architecture enables the grayscale instance; if a microservice architecture does not include the grayscale instance corresponding to the label, the microservice architecture enables the common instance, wherein the microservice architecture that has undergone routing selection is represented as the final microservice architecture; A termination calling module is used to call other microservice architectures respectively through the multiple final microservice architectures, and transparently transmit the label to the corresponding microservice architecture, so that the other microservice architectures can perform routing selection and enable the corresponding grayscale instance until all microservice architectures perform routing selection; and The monitoring module is used to monitor the load of the grayscale environment to determine whether the grayscale release is normal. If it is normal, the grayscale instances in the microservice architecture are gradually enabled; if it is abnormal, the grayscale release is stopped; and is also used to monitor the link call status of the grayscale environment to determine whether the grayscale release is normal. If it is normal, the grayscale instances in the microservice architecture are gradually enabled; if it is abnormal, the grayscale release is stopped.
6. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the grayscale release processing method according to any one of claims 1 to 4 are implemented.
7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the grayscale release processing method according to any one of claims 1 to 4 are implemented.
Citation Information
Patent Citations
Method and device for processing micro-service grayscale publishing based on calling chain
CN108848092A
Multi-tenant service gray release method and device, computer equipment and storage medium
CN112118565A