Gray release method, device, equipment, storage medium and program product
By automatically identifying and forwarding request messages to the target grayscale node, the problem of the single grayscale release method in the existing technology is solved, and flexible multi-service node grayscale release is realized to meet diverse needs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2026-03-24
AI Technical Summary
Existing technologies offer limited flexibility in canary deployment methods, failing to meet the diverse needs of real-world scenarios.
By obtaining the target canary release rules sent by the configuration system, and based on whether the request message contains canary labels and traffic allocation rules, the system automatically identifies and forwards the request message to the target canary node, supporting flexible canary release to multiple service nodes.
It improves the flexibility of canary releases, meets the diverse needs of real-world scenarios, and ensures that the impact on business is minimized while verifying the performance of the new version in a real environment.
Smart Images

Figure CN119182662B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of application publishing technology, and in particular to a grayscale publishing method, apparatus, device, storage medium, and program product. Background Technology
[0002] With the continuous development of computer and internet technologies, digital online services are being used more and more widely in various fields. In actual use, due to changes in business needs and functional upgrades, online services need to be dynamically updated. Canary release is a technique for gradually introducing new versions of systems or components into the production environment, which can ensure that the impact on business is minimized while verifying the performance of the new version and software in a real environment.
[0003] In related technologies, upstream and downstream service nodes usually adopt unified release rules, and usually only perform canary releases for a specific service. This canary release method is relatively simple, not very flexible, and cannot meet the diverse needs of actual scenarios. Summary of the Invention
[0004] This application provides a grayscale release method, apparatus, device, storage medium, and program product, which can realize automatic judgment and forwarding of grayscale links, improve the flexibility of grayscale release, and meet the diverse needs of actual scenarios.
[0005] In a first aspect, embodiments of this application provide a grayscale release method, including:
[0006] Obtain the target grayscale rule sent by the configuration system and receive the request message. The target grayscale rule includes grayscale labels and traffic allocation rules corresponding to multiple service nodes.
[0007] If the request message includes the grayscale label, the request message is sent to the target grayscale node according to the traffic allocation rule;
[0008] If the grayscale label is not included in the request message and the configuration system has enabled grayscale deployment configuration, the grayscale label is inserted into the request message, and the request message including the grayscale label is sent to the target grayscale node according to the traffic allocation rules.
[0009] In one possible implementation, sending the request message to the target grayscale node according to the traffic allocation rule includes:
[0010] Determine the target traffic allocation rules for the service nodes;
[0011] Based on the target traffic allocation rules and the grayscale labels, the target grayscale nodes are obtained by filtering among the downstream service nodes.
[0012] In one possible implementation, the method further includes:
[0013] If the request message forwarding fails or the configuration system does not enable canary release configuration, the request message will be sent to the non-canary node.
[0014] In one possible implementation, the method further includes:
[0015] Log data is sent to the configuration system so that the configuration system can display the path information corresponding to the request message through the display module.
[0016] In one possible implementation, the method further includes:
[0017] In response to a configuration operation on the configuration system, the canary release configuration corresponding to the configuration operation and the target canary release rule are obtained; the canary release configuration corresponds to at least one service node.
[0018] In one possible implementation, different service nodes correspond to different target grayscale rules.
[0019] Secondly, embodiments of this application provide a grayscale publishing device, comprising:
[0020] The acquisition module is used to acquire the target grayscale rule sent by the configuration system and receive the request message. The target grayscale rule includes grayscale labels and traffic allocation rules corresponding to multiple service nodes respectively.
[0021] The first sending module is configured to send the request message to the target grayscale node according to the traffic allocation rule when the grayscale label is included in the request message;
[0022] The second sending module is used to insert the grayscale label into the request message when the grayscale label is not included in the request message, but the configuration system has enabled grayscale release configuration, and to send the request message including the grayscale label to the target grayscale node according to the traffic allocation rules.
[0023] In one possible implementation, the first transmitting module is specifically used for:
[0024] Determine the target traffic allocation rules for the service nodes;
[0025] Based on the target traffic allocation rules and the grayscale labels, the target grayscale nodes are obtained by filtering among the downstream service nodes.
[0026] In one possible implementation, the device is further used for:
[0027] If the request message forwarding fails or the configuration system does not enable canary release configuration, the request message will be sent to the non-canary node.
[0028] In one possible implementation, the device is further used for:
[0029] Log data is sent to the configuration system so that the configuration system can display the path information corresponding to the request message through the display module.
[0030] In one possible implementation, the device is further used for:
[0031] In response to a configuration operation on the configuration system, the canary release configuration corresponding to the configuration operation and the target canary release rule are obtained; the canary release configuration corresponds to at least one service node.
[0032] In one possible implementation, different service nodes correspond to different target grayscale rules.
[0033] Thirdly, embodiments of this application provide a grayscale publishing device, including: a processor and a memory;
[0034] The memory stores computer-executed instructions;
[0035] The processor executes computer execution instructions stored in the memory to implement the grayscale release method as described in any of the first aspects.
[0036] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer-executable instructions, which, when executed, are used to implement the grayscale release method described in any of the first aspects.
[0037] Fifthly, embodiments of this application provide a computer program product, including a computer program that, when executed, implements the grayscale release method described in any of the first aspects.
[0038] The canary deployment method, apparatus, device, storage medium, and program product provided in this application embodiment obtain a target canary rule sent by a configuration system and receive a request message. The target canary rule includes canary tags corresponding to multiple service nodes and traffic allocation rules. When the request message includes a canary tag, the request message is sent to the target canary node according to the traffic allocation rules. When the request message does not include a canary tag, but the configuration system has enabled canary deployment configuration, a canary tag is inserted into the request message, and the request message including the canary tag is sent to the target canary node according to the traffic allocation rules. In this application, the service node obtains the target canary rule sent by the configuration system and receives the request message. The service node can perform the corresponding forwarding process according to whether there is a canary tag in the request message and the traffic allocation rules in the target canary rule, forwarding the request message to the target canary node. This enables automatic identification and forwarding of request messages in the canary deployment link, improves the flexibility of canary deployment, and can meet the diverse needs of actual scenarios. Attached Figure Description
[0039] Figure 1 This is a schematic diagram illustrating an application scenario provided in the embodiments of this application;
[0040] Figure 2 A flowchart illustrating a grayscale release method provided in an embodiment of this application;
[0041] Figure 3 A flowchart illustrating another grayscale release method provided in this application embodiment;
[0042] Figure 4 A logical diagram illustrating the distribution of target grayscale rules provided in an embodiment of this application;
[0043] Figure 5 A logical diagram illustrating how a service node forwards a request message, as provided in an embodiment of this application;
[0044] Figure 6 A schematic diagram of a grayscale publishing device provided in an embodiment of this application;
[0045] Figure 7 This is a schematic diagram of a grayscale publishing device provided in an embodiment of this application. Detailed Implementation
[0046] To enable those skilled in the art to better understand the technical solutions of this application, the application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments and drawings described herein are merely for explaining this application and are not intended to limit this application. It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of related data must comply with relevant laws, regulations and standards, and corresponding operation entry points are provided for users to choose to authorize or refuse.
[0047] The collection, storage, use, processing, transmission, provision, and disclosure of financial data or user data involved in the technical solution of this application all comply with the provisions of relevant laws and regulations and do not violate public order and good morals. It should be noted that certain software, components, models, and other existing solutions in the industry may be mentioned in the embodiments of this application. These should be considered as exemplary, and their purpose is only to illustrate the feasibility of implementing the technical solution of this application, but does not mean that the applicant has used or necessarily used such solutions.
[0048] Canary release is a technique for gradually introducing a new version of a system or component to a production environment. It effectively mitigates release risks and can verify the performance of the new version and software in a real-world environment while minimizing business impact. However, related technologies typically target only a single service, implementing multiple versions of canary releases for a single service, and cannot achieve chain-level canary releases. Furthermore, upstream and downstream service nodes often use the same canary rules. Therefore, canary release methods in related technologies are relatively simplistic, lack flexibility, and cannot meet the diverse needs of real-world scenarios.
[0049] To address the aforementioned issues, this application provides a canary deployment method, apparatus, device, storage medium, and program product. A service node obtains a target canary rule sent by a configuration system and receives a request message. This target canary rule includes canary tags corresponding to multiple service nodes and traffic allocation rules. If the request message includes a canary tag, the request message is sent to the target canary node according to the traffic allocation rules. If the request message does not include a canary tag, but the configuration system has canary deployment configured, a canary tag is inserted into the request message, and the request message including the canary tag is sent to the target canary node according to the traffic allocation rules. In this way, the service node can automatically identify and forward request messages in the canary deployment chain, improving the flexibility of canary deployment and meeting the diverse needs of real-world scenarios.
[0050] Figure 1This is a schematic diagram illustrating an application scenario provided in an embodiment of this application. For example... Figure 1 As shown, in related technologies, canary releases are typically performed on a single service, with upstream and downstream nodes using uniform canary release rules. This type of canary release lacks flexibility and cannot meet the diverse needs of real-world scenarios.
[0051] In this embodiment, the service node obtains the target grayscale rule sent by the configuration system and receives the request message. The target grayscale rule includes grayscale labels and traffic allocation rules corresponding to multiple service nodes. Then, according to the grayscale labels and traffic allocation rules, the request message is forwarded to the target grayscale node, realizing request message forwarding based on automatic judgment, which improves the flexibility of grayscale release.
[0052] The following detailed description of the solution presented in this application is provided through specific embodiments. It should be noted that the following embodiments may exist independently or in combination with each other; identical or similar content will not be repeated in different embodiments.
[0053] Figure 2 This is a flowchart illustrating a grayscale release method provided in an embodiment of this application. Please refer to... Figure 2 The canary release method may include:
[0054] S201. Obtain the target grayscale rule sent by the configuration system and receive the request message. The target grayscale rule includes grayscale labels and traffic allocation rules corresponding to multiple service nodes.
[0055] The execution subject in this application embodiment can be an electronic device (such as a server), specifically a gray-scale release system within the electronic device. This gray-scale release system may include a configuration system and service nodes, or it may be a gray-scale release device installed within the electronic device. The gray-scale release device can be implemented through software or a combination of software and hardware. For ease of understanding, the following description will use a service node within the gray-scale release system as the execution subject.
[0056] In this embodiment, the configuration system can refer to the configuration platform in an electronic device canary release system, which can be used for canary link configuration, canary rule configuration, and distribution. The target canary rule can refer to the configuration rules such as canary tags and traffic flow during the canary release process. This target canary rule can include multiple canary tags and traffic allocation rules corresponding to multiple service nodes. The canary tag can refer to keywords used for canary judgment, also known as a canary marker, and can specifically refer to parameters such as blacklists, whitelists, user identifiers (or user names), and geographical locations. Of course, it can also refer to other parameters. This embodiment does not limit the specific content of the canary tag. The traffic allocation rule can refer to the specific traffic flow method of the request packet in the canary link. For example, an application processing a certain type of service requires three service nodes: A, B, and C. During the canary release process, canary versions can be configured in B and C. Thus, service node A can include the official version A1, service node B can include both the official version B1 and the canary version B2, and service node C can include both the official version C1 and the canary version C2. The traffic allocation rules in the target canary release rules can be A1-B2-C2, A1-B1-C2, A1-B2-C1, etc. It should be noted that the canary release labels and traffic allocation rules in the target canary release rules can correspond to multiple service nodes. The target canary release rules for each service node can be the same or different, which makes canary releases no longer limited to a single service, and increases the flexibility of canary release configuration.
[0057] Request messages can refer to messages corresponding to various service requests from users. Specifically, in this step, during canary release, the configuration system in the electronic device canary release system can respond to the configuration operations of technical personnel and determine the target canary rules configured by the technical personnel. These target canary rules may include canary labels and traffic allocation rules. The configuration system can then distribute these target canary rules to each service node. Specifically, the distribution method can be to distribute the global target canary rules to each service node, or to distribute the target canary rules relevant to the current service node to each service node. Service nodes can receive these target canary rules and can receive user request messages, subsequently forwarding the request messages based on the target canary rules.
[0058] S202. If the request message includes a grayscale label, the request message is sent to the target grayscale node according to the traffic allocation rules.
[0059] In this embodiment, the target grayscale node can refer to the grayscale node to which the request message needs to be forwarded. After receiving a request message, the service node in the grayscale deployment system can determine whether the request message includes a grayscale tag. For example, it can use character recognition matching to determine whether the request message includes keywords included in the grayscale tag. If it does, the request message is determined to contain a grayscale tag; otherwise, it is determined that the request message does not contain a grayscale tag. If the request message includes a grayscale tag, the service node can filter downstream grayscale nodes according to traffic allocation rules and the grayscale tag to determine the target grayscale node and forward the request message to the target grayscale node, thus achieving automatic identification and forwarding of the request message in the grayscale link.
[0060] S203. If the request message does not include a grayscale label and the grayscale release configuration is enabled in the system, insert a grayscale label into the request message and send the request message including the grayscale label to the target grayscale node according to the traffic allocation rules.
[0061] In this embodiment, the configuration system may include an identifier field for canary release configuration. The identifier value in this field can be used to characterize the on / off state of the canary release configuration. For example, when the identifier value in this field is 1, the canary release configuration in the configuration system is on (ON), and the service node can enable both the normal version and the canary version; when the identifier value in this field is 0, the canary release configuration in the configuration system is off (OFF), and the service node can only enable the normal version.
[0062] In this step, if the request message does not contain a grayscale label, the service node can further determine the status of the grayscale release configuration in the configuration system. If the grayscale release configuration in the configuration system is enabled, the service node can insert a grayscale label into the request message and forward the request message with the inserted grayscale label to the target grayscale node according to the traffic allocation rules, thereby realizing the automatic identification and forwarding of request messages within the grayscale link. If the grayscale release configuration in the configuration system is disabled, the service node does not need to perform the grayscale label insertion operation and can forward the request message according to the normal link to ensure the normal implementation of user services.
[0063] The canary deployment method provided in this application obtains the target canary rules sent by the configuration system and receives request messages. The target canary rules include canary tags corresponding to multiple service nodes and traffic allocation rules. If the request message includes a canary tag, the request message is sent to the target canary node according to the traffic allocation rules. If the request message does not include a canary tag, but the configuration system has enabled canary deployment configuration, a canary tag is inserted into the request message, and the request message including the canary tag is sent to the target canary node according to the traffic allocation rules. In this application, the service node obtains the target canary rules sent by the configuration system and receives request messages. The service node can perform the corresponding forwarding process according to whether there is a canary tag in the request message and the traffic allocation rules in the target canary rules, forwarding the request message to the target canary node. This enables automatic identification and forwarding of request messages in the canary deployment chain, improves the flexibility of canary deployment, and can meet the diverse needs of actual scenarios.
[0064] Based on the above embodiments, Figure 3 This is a flowchart illustrating another grayscale release method provided in an embodiment of this application. Please refer to... Figure 3 The canary release method may include:
[0065] S301. In response to a configuration operation on the configuration system, obtain the gray-scale release configuration and target gray-scale rules corresponding to the configuration operation; the gray-scale release configuration corresponds to at least one service node.
[0066] In this embodiment of the application, the configuration operation can refer to the interactive operation in the configuration system when the technician needs to perform gray-scale release. The configuration operation can specifically refer to the click operation, swipe operation, text input operation, voice input operation, etc. This embodiment of the application does not limit the specific type of configuration operation.
[0067] In this step, when technicians need to perform canary releases of application services, they can execute canary release configuration operations in the configuration platform (i.e., the configuration system) of the electronic device canary release system. For example, they can set canary release configurations, as well as canary tags and traffic allocation rules. This canary release configuration may refer to the on / off state of canary release and the service nodes that have started the canary version. Responding to the technicians' configuration operations, the electronic device can determine the corresponding canary release configuration and target canary rules. This canary release configuration can correspond to one, two, three, or more service nodes, and is not limited to canary releases targeting only a single service node, thus improving the flexibility of canary releases.
[0068] In one possible implementation, different service nodes correspond to different target grayscale rules.
[0069] In this embodiment, when configuring target grayscale rules in the configuration system, technicians can configure different target grayscale rules for different service nodes. For example, different grayscale labels or different traffic allocation rules can be used. This way, the grayscale release process is not limited to a single grayscale rule, enabling flexible settings of multiple target grayscale rules. Appropriate target grayscale rules can be configured independently for each service node without needing to maintain consistency with upstream service nodes. This further improves the flexibility of grayscale releases and can meet the actual needs of different scenarios and application services.
[0070] S302. Obtain the target grayscale rule sent by the configuration system and receive the request message. The target grayscale rule includes grayscale labels and traffic allocation rules corresponding to multiple service nodes.
[0071] In this embodiment, after determining the target grayscale rule, the configuration system can distribute the target grayscale rule to each service node. Correspondingly, the service nodes can receive the target grayscale rule and request messages, and subsequently forward the request messages based on the target grayscale rule.
[0072] For example, Figure 4 This is a logical diagram illustrating the distribution of target grayscale rules, provided as an embodiment of this application. Figure 4 As shown, the canary release system includes a configuration system 401 and service nodes 402. In response to configuration operations performed by technical personnel, the configuration system 401 determines the corresponding canary release configuration and target canary rules, such as which keywords will be used as canary tags. Then, based on the canary release configuration, the configuration system 401 determines the on / off status of canary release and the enabled status of canary versions on each service node, and distributes the target canary rules to each service node.
[0073] Each service node is bound to an agent service. Through this agent service, the service node can receive the target canary release rules, determine the canary release labels and traffic allocation rules, and so on. This allows each service node's agent service to determine the target canary release rules for itself and its downstream service nodes. Subsequently, request packets can be forwarded based on these target canary release rules, improving the accuracy and flexibility of canary releases. Figure 4As shown, the traffic allocation rules in the target canary release rules can include service node A-service node B2-service node C2-service node D, service node A-service node B1-service node C1-service node D, and service node A-service node B1-service node C3-service node D. In this way, the target canary release rules can include multiple traffic allocation rules, and the target canary release rules corresponding to different service nodes can also be different, which can improve the flexibility and scenario adaptability of canary release.
[0074] S303. If the request message includes a grayscale label, determine the target traffic allocation rule corresponding to the service node; based on the target traffic allocation rule and the grayscale label, filter among the downstream service nodes to obtain the target grayscale node.
[0075] In this embodiment, the target traffic allocation rule can refer to the traffic allocation rule corresponding to the service node. If the request message includes a grayscale label, the service node can determine its own target traffic allocation rule, and then perform filtering processing in downstream nodes according to the grayscale label in the request message, and finally forward the request message to the corresponding target grayscale node.
[0076] S304. If the request message does not include a grayscale label and the configuration system has enabled grayscale deployment, insert a grayscale label into the request message and send the request message including the grayscale label to the target grayscale node according to the traffic allocation rules.
[0077] In this embodiment, if the request message does not include a grayscale label and the grayscale release configuration in the configuration system is enabled, the service node can insert a grayscale label into the request message. Specifically, the insertion method could be to insert an identifier corresponding to the grayscale label's keyword into the request header of the request message; this embodiment does not limit this method. Then, the service node can send the request message with the inserted grayscale label to the target grayscale node corresponding to the grayscale label according to the traffic allocation rules. In this way, the service node in the electronic device grayscale release system can perform grayscale label injection operations on devices that do not currently have grayscale labels, improving the flexibility of traffic allocation in grayscale release.
[0078] It should be noted that, during the canary release process, to ensure business stability, the canary release system typically processes a subset of user request messages through the newly released canary version. Therefore, in this step, assuming the canary release configuration is enabled, when performing canary tag insertion operations on request messages without canary tags, the service node can select a subset of request messages for canary tag insertion. For example, it can select a preset proportion of request messages without canary tags within a preset period, or it can filter based on user information such as user identifier and geographical location, selecting request messages without canary tags corresponding to preset user identifiers and preset geographical locations for canary tag insertion. Of course, the service node can also use other methods to select request messages for canary tag insertion, which is not limited in this embodiment.
[0079] S305. If the request message forwarding fails or the configuration system does not enable canary release configuration, the request message will be sent to the non-canary node.
[0080] In this embodiment, a non-grayscale node can refer to a normal version of the service node or a normal link node. Since canary releases typically involve some uncertainty, there may be instances where request packet forwarding fails during the canary release process. In such cases, the service node can forward the request packet to the non-grayscale node according to the original normal link, ensuring the normal processing and response of user request packets and avoiding negative impacts on the user experience. Furthermore, if canary release configuration is not enabled in the system, the service node can also directly forward request packets to the non-grayscale node and process the request packets according to the original application service's normal link.
[0081] In related technologies, the canary release process typically does not support service degradation and retries, leading to certain request failures during the canary release process and failing to meet user needs. However, in this embodiment, when a service node fails to forward a request message, it can re-forward the request message to a non-canary node, processing the request message according to the original normal link of the application service. This ensures timely processing and response to request messages, guaranteeing normal user access to the application service.
[0082] S306. Send log data to the configuration system so that the configuration system can display the path information corresponding to the request message through the display module.
[0083] In this embodiment, log data can refer to the transaction logs of the service node's specific processing of the request message. The display module can refer to the data display module in the canary release system. Path information can refer to the actual path traversed by the request message. Specifically, each service node can report its own log data to the configuration system. After receiving the log data from each service node, the configuration system can parse the log data and display the path information corresponding to the request message through the display module. In this way, by reporting log data, the service node can ultimately display the actual path of the request message in the display module, facilitating technical personnel to trace and query the source.
[0084] For example, Figure 5 This is a logical diagram illustrating how a service node forwards a request message, as provided in an embodiment of this application. Figure 5 As shown, after receiving the target grayscale rule, the service node can receive user request messages. If the request message includes a grayscale label from the target grayscale rule, the service node can determine its own target traffic allocation rule, and then filter downstream nodes according to the grayscale label and the target traffic allocation rule to determine the target grayscale node corresponding to the grayscale label, and forward the message request to the target grayscale node.
[0085] If the request message does not contain the grayscale label from the target grayscale rule, and the grayscale deployment configuration is not enabled in the system at this time, the service node can forward the request message according to the original normal link, sending the request message to the non-grayscale node. If the request message does not contain the grayscale label from the target grayscale rule, and the grayscale deployment configuration is enabled in the system at this time, the service node can insert a grayscale label into the request message, and then forward the request message with the inserted grayscale label to the target grayscale node corresponding to the grayscale label according to the grayscale label and the target traffic allocation rule corresponding to the service node.
[0086] In this embodiment, the configuration system of the electronic device canary release system adopts a target canary rule distribution method, and each service node can clearly perceive the target canary rule. Simultaneously, the canary release configuration process is not limited to a single service; it supports canary releases for several services and also supports canary releases across the entire chain. The target canary rule can specifically include various types, not limited to a single target canary rule, and each service node can independently configure suitable canary rules without needing to maintain consistency with the upstream, thus increasing the flexibility of canary release. During the canary release process, the canary release of each service node can be operated independently, decoupled from upstream and downstream service nodes, resulting in greater flexibility. Furthermore, the canary label is more flexible, allowing for the use of multiple parameters. When a request message fails at a canary node, the service node can forward the request message to a non-canary node in the normal chain, ensuring successful processing of the request message.
[0087] Figure 6 This is a schematic diagram of a grayscale publishing device provided in an embodiment of this application. Please refer to... Figure 6 The grayscale publishing device 60 may include:
[0088] The acquisition module 61 is used to acquire the target grayscale rule sent by the configuration system and receive the request message. The target grayscale rule includes grayscale labels and traffic allocation rules corresponding to multiple service nodes.
[0089] The first sending module 62 is used to send the request message to the target grayscale node according to the traffic allocation rules when the request message includes a grayscale label.
[0090] The second sending module 63 is used to insert a grayscale label into the request message when the request message does not include a grayscale label and the configuration system has enabled grayscale release, and to send the request message including the grayscale label to the target grayscale node according to the traffic allocation rules.
[0091] In one possible implementation, the first transmitting module 62 is specifically used for:
[0092] Determine the target traffic allocation rules for the service nodes;
[0093] Based on the target traffic allocation rules and grayscale labels, the target grayscale nodes are obtained by filtering among the downstream service nodes.
[0094] In one possible implementation, the device 60 is further configured to:
[0095] If the request message forwarding fails or the canary release configuration is not enabled in the configuration system, the request message will be sent to the non-canary node.
[0096] In one possible implementation, the device 60 is further used for:
[0097] Log data is sent to the configuration system so that the configuration system can display the path information corresponding to the request message through the display module.
[0098] In one possible implementation, the device 60 is further configured to:
[0099] In response to configuration operations on the configuration system, obtain the canary release configuration and target canary rules corresponding to the configuration operation; the canary release configuration corresponds to at least one service node.
[0100] In one possible implementation, different service nodes correspond to different target grayscale rules.
[0101] The grayscale publishing device 60 provided in this application embodiment can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0102] Figure 7 This is a schematic diagram of a grayscale publishing device provided in an embodiment of this application. Please refer to [link / reference]. Figure 7 The grayscale publishing device 70 may include a memory 71 and a processor 72. Exemplarily, the memory 71 and the processor 72 are interconnected via a bus 73.
[0103] Memory 71 is used to store program instructions;
[0104] The processor 72 is used to execute the program instructions stored in the memory to implement the grayscale release method shown in the above embodiment.
[0105] Figure 7 The grayscale publishing device 70 shown can execute the technical solution shown in the above method embodiment. Its implementation principle and beneficial effects are similar, and will not be described again here.
[0106] This application provides a computer-readable storage medium storing computer-executable instructions, which, when executed by a processor, are used to implement the above-described grayscale release method.
[0107] This application embodiment may also provide a computer program product, including a computer program that, when executed by a processor, can implement the above-described grayscale release method.
[0108] It should be noted that the processor mentioned in the embodiments of this application can be a central processing unit (CPU), or it can be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.
[0109] It should be understood that the memory mentioned in the embodiments of this application can be volatile memory or non-volatile memory, or may include both volatile and non-volatile memory. The non-volatile memory can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. The volatile memory can be random access memory (RAM), which is used as an external cache. By way of example, but not limitation, many forms of RAM are available, such as Static Random Access Memory (SRAM), Dynamic Random Access Memory (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDR SDRAM), Enhanced Synchronous DRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), and Direct RAM Bus RAM (DR RAM). It should be noted that when the processor is a general-purpose processor, DSP, ASIC, FPGA, or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, the memory (storage module) is integrated into the processor. It should be noted that the memory described herein is intended to include, but is not limited to, these and any other suitable types of memory.
[0110] It should be understood that in the various embodiments of this application, the order of the above-mentioned processes does not imply 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 embodiments of this application.
[0111] This application describes embodiments with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processing unit of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processing unit of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0112] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0113] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0114] Regarding the modules / units included in the various devices and products described in the above embodiments, they can be software modules / units, hardware modules / units, or a combination of both. Each device and product can be applied to or integrated into a chip, chip module, or terminal device. For example, for devices and products applied to or integrated into a chip, each included module / chip can be implemented entirely using hardware methods such as circuits, or at least some modules / units can be implemented using software programs running on a processor integrated within the chip, while the remaining modules / units can be implemented using hardware methods such as circuits.
[0115] In this application, the term "comprising" and its variations can refer to non-limiting inclusion; the term "or" and its variations can refer to "and / or". The terms "first", "second", etc., in this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. In this application, "multiple" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0116] The above are only some embodiments of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principles of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A grayscale release method, characterized in that, include: The system obtains the target grayscale rule sent by the configuration system and receives the request message. The target grayscale rule includes grayscale labels and traffic allocation rules corresponding to multiple service nodes. The traffic allocation rule refers to the specific traffic flow method of the request message in the grayscale link. If the request message includes the grayscale label, the request message is sent to the target grayscale node according to the traffic allocation rule; If the grayscale label is not included in the request message, but the configuration system has enabled grayscale deployment configuration, the grayscale label is inserted into the request message, and the request message including the grayscale label is sent to the target grayscale node according to the traffic allocation rules. Sending the request message to the target grayscale node according to the traffic allocation rule includes: Determine the target traffic allocation rules for the service nodes; Based on the target traffic allocation rules and the grayscale labels, the target grayscale nodes are obtained by filtering among the downstream service nodes.
2. The method according to claim 1, characterized in that, The method further includes: If the request message forwarding fails or the configuration system does not enable canary release configuration, the request message will be sent to the non-canary node.
3. The method according to claim 1, characterized in that, The method further includes: Log data is sent to the configuration system so that the configuration system can display the path information corresponding to the request message through the display module.
4. The method according to any one of claims 1 to 3, characterized in that, The method further includes: In response to a configuration operation on the configuration system, the canary release configuration corresponding to the configuration operation and the target canary release rule are obtained; the canary release configuration corresponds to at least one service node.
5. The method according to any one of claims 1 to 3, characterized in that, Different service nodes correspond to different target grayscale rules.
6. A grayscale publishing device, characterized in that, include: The acquisition module is used to acquire the target grayscale rule sent by the configuration system and receive the request message. The target grayscale rule includes grayscale labels corresponding to multiple service nodes and traffic allocation rules. The traffic allocation rules refer to the specific traffic flow method of the request message in the grayscale link. The first sending module is configured to send the request message to the target grayscale node according to the traffic allocation rule when the grayscale label is included in the request message; The second sending module is used to insert the grayscale label into the request message when the grayscale label is not included in the request message, but the configuration system has enabled grayscale release configuration, and to send the request message including the grayscale label to the target grayscale node according to the traffic allocation rules. Specifically, the first sending module is used to determine the target traffic allocation rule corresponding to the service node; and to filter downstream service nodes according to the target traffic allocation rule and the grayscale label to obtain the target grayscale node.
7. A grayscale publishing device, characterized in that, include: Processor, memory; The memory stores computer-executed instructions; The processor executes the computer execution instructions stored in the memory to implement the grayscale release method as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions, which, when executed, are used to implement the grayscale release method according to any one of claims 1 to 5.
9. A computer program product, characterized in that, Includes a computer program that, when executed, implements the grayscale release method as described in any one of claims 1 to 5.
Citation Information
Patent Citations
Gray release method and system, electronic equipment and storage medium
CN110489133A
Gray scale verification method and system realized based on client
CN115334006A
Service request processing method and device, storage medium and electronic equipment
CN116737383A