A method and apparatus for grayscale publishing of an application

By selecting node databases in different centers based on the execution status of business requests during the canary release process of a distributed database, the shortcomings of existing technologies in failing to detect data access problems in a timely manner are solved, achieving the effect of quickly discovering and reducing release risks.

CN122087003APending Publication Date: 2026-05-26NETSUNION CLEARING CORP
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
NETSUNION CLEARING CORP
Filing Date
2024-11-15
Publication Date
2026-05-26

AI Technical Summary

Technical Problem

In existing technologies, the canary release method for distributed databases cannot detect problems in data calls between databases in a timely manner, resulting in a high release risk.

Method used

When performing canary releases on each central node database of the distributed database, the execution status of business requests is obtained, and if the preset requirements are met, the next node database, which is located in a different central location than the node database that has completed the canary release, is selected to continue the canary release process.

Benefits of technology

By quickly verifying the execution of business requests between databases on different central nodes, data access problems can be identified in a timely manner, greatly reducing the risk of release.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122087003A_ABST
    Figure CN122087003A_ABST
Patent Text Reader

Abstract

A method and apparatus for canary deployment of an application includes: sequentially performing canary deployment of the target application on node databases in each center of a distributed database; each time a canary deployment is completed on a node database, obtaining the execution status of a first business request; if the execution meets the corresponding preset requirements, selecting the next node database in a different center from the currently deployed node database, and continuing the canary deployment process; wherein, the first business request is a business request routed to the previously deployed node database and requiring data access from the currently deployed node database. The canary deployment method provided in this application embodiment can quickly verify the execution status of business requests between node databases in different centers, thereby promptly identifying problems in data access between databases for the deployed application, greatly reducing deployment risks.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This article relates to canary deployment technology, and more particularly to a method and apparatus for canary deployment in an application. Background Technology

[0002] Distributed databases can provide various types of business request services to business requesters. In the process of using distributed databases, application update and release of node databases is an essential part.

[0003] In related technologies, canary release is often used to deploy applications to the node databases of various centers in a distributed database. That is, canary release is first performed on the node databases of one center. After the canary release is completed for all node databases in that center, canary release is then performed on the node databases of another center, and so on, until the canary release is completed for all node databases in all centers.

[0004] However, this approach cannot promptly detect problems in the data retrieval between databases by the deployed application, resulting in a significant deployment risk. Summary of the Invention

[0005] This application provides a method and apparatus for canary deployment of an application, which can promptly detect problems in data calls between databases of the deployed application, thereby reducing deployment risks.

[0006] On the one hand, this application provides a method for canary release of an application, including: The target application is then deployed in a canary manner to the node databases of each central part of the distributed database. During the canary release process of the target application, whenever a canary release is completed for a node database, the execution status of the first business request is obtained. If the execution status of the first business request meets the corresponding preset requirements, the next node database, which is located in a different center than the node database that has completed the canary release, is selected, and the canary release process continues. The first business request is a business that is routed to the previous node database that has completed the canary release and needs to call data from the node database that has completed the canary release. The node database that has completed the canary release is located in a different center than the node database that has completed the canary release.

[0007] On the other hand, this application provides a grayscale publishing device for an application, including: a memory and a processor, wherein the memory is used to store an executable program; The processor is used to read and execute the executable program to implement the above-described canary release method for the application.

[0008] Compared with related technologies, this application includes a method for canary deployment of a target application in the node databases of each center of a distributed database. Whenever a canary deployment is completed for a node database, the execution status of business requests routed to the previous canary deployment node database and requiring data calls from the currently canary deployment node database is obtained. If the execution status of the first business request meets the corresponding preset requirements, the next node database in a different center from the currently canary deployment node database is selected, and the canary deployment process continues. Therefore, the execution status of business requests can be quickly verified between node databases in different centers, thereby promptly identifying problems in data calls between databases for the deployed application and greatly reducing deployment risks.

[0009] Other features and advantages of this application will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the application. Other advantages of this application can be realized and obtained by means of the solutions described in the description and the accompanying drawings. Attached Figure Description

[0010] The accompanying drawings are used to provide an understanding of the technical solutions of this application and constitute a part of the specification. They are used together with the embodiments of this application to explain the technical solutions of this application and do not constitute a limitation on the technical solutions of this application.

[0011] Figure 1 A flowchart illustrating a canary release method for an application provided in this application embodiment; Figure 2 This is a schematic diagram of the structure of a distributed database provided in related technologies. Detailed Implementation

[0012] This application describes several embodiments, but these descriptions are exemplary and not restrictive, and it will be apparent to those skilled in the art that many more embodiments and implementations are possible within the scope of the embodiments described herein. Although many possible combinations of features are shown in the drawings and discussed in the detailed description, many other combinations of the disclosed features are also possible. Unless specifically limited, any feature or element of any embodiment may be used in combination with, or may replace, any feature or element of any other embodiment.

[0013] This application includes and contemplates combinations of features and elements known to those skilled in the art. The embodiments, features, and elements disclosed in this application may also be combined with any conventional features or elements to form a unique inventive scheme as defined by the claims. Any feature or element of any embodiment may also be combined with features or elements from other inventive schemes to form another unique inventive scheme as defined by the claims. Therefore, it should be understood that any feature shown and / or discussed in this application may be implemented individually or in any suitable combination. Therefore, the embodiments are not limited except by the limitations imposed by the appended claims and their equivalents. Furthermore, various modifications and changes may be made within the scope of the appended claims.

[0014] Furthermore, in describing representative embodiments, the specification may have presented methods and / or processes as a specific sequence of steps. However, the method or process should not be limited to the specific order of steps described herein, to the extent that it does not depend on such a specific order. As will be understood by those skilled in the art, other sequences of steps are also possible. Therefore, the specific order of steps set forth in the specification should not be construed as a limitation of the claims. Moreover, the claims concerning the method and / or process should not be limited to the steps performed in the written order, and those skilled in the art will readily understand that these orders can be varied and still remain within the spirit and scope of the embodiments of this application.

[0015] This application provides a method for canary release of an application, such as... Figure 1 As shown, it includes: Step 101: Perform canary deployment of the target application to the node databases of each center of the distributed database in sequence; Step 102: During the canary release process of the target application, whenever a canary release is completed for a node database, the execution status of the first business request is obtained. When the execution status of the first business request meets the corresponding preset requirements, the next node database, which is located in a different center than the node database that has completed the canary release, is selected, and the canary release process continues. The first business request is a business request that is routed to the previous node database that has completed the canary release and needs to call data from the node database that has completed the canary release. The node database that has completed the canary release is located in a different center than the node database that has completed the canary release.

[0016] For example, the preset requirements here refer to the requirements that need to be met in advance for the execution of the first service.

[0017] In related technologies, such as Figure 2As shown, multiple requesters exist outside the business system. During the application deployment process, these requesters continuously send requests to the business system. First, business requests from data center A are routed to data center B via business router A to avoid impacting related business requests and requesters during the canary deployment process, until the canary deployment of data center A is completed. Then, business requests from data center B are routed back to data center A via business router B, again avoiding impacting related business requests and requesters during the canary deployment process, until the canary deployment of data center B is completed. This deployment method makes it impossible to verify whether the new application will have issues similar to those encountered after a full deployment before the deployment is complete.

[0018] The canary deployment method provided in this application embodiment, during the canary deployment of the target application in the node databases of each center of the distributed database, whenever a canary deployment is completed for a node database, obtains the execution status of business requests that are routed to the previous canary deployment node database and need to call data from the currently canary deployment node database. When the execution status of the first business request meets the corresponding preset requirements, the next node database in a different center than the currently canary deployment node database is selected, and the canary deployment process continues. Therefore, it can quickly verify the execution status of business requests between node databases in different centers, thereby promptly discovering problems in the data call between databases of the deployed application and greatly reducing the deployment risk.

[0019] In one exemplary instance, continuing the canary release process includes: Continue executing the canary release process until the canary release is completed for all node databases in all centers, or for one node database in each center, or the execution of the target service does not meet the corresponding preset requirements.

[0020] For example, a canary release can be completed for all node databases in all centers by selecting the next node database that is different from the one currently being released; or a canary release can be completed for one node database in each center by selecting the next node database that is different from the one currently being released, then a canary release can be completed for all remaining node databases in one center, then a canary release can be completed for all remaining node databases in the next center, and so on, until a canary release can be completed for all node databases in all centers.

[0021] In one exemplary instance, whenever a canary release is performed on a node database, all business requests are routed to node databases in centers other than the center where that node database is located.

[0022] In one exemplary instance, the method further includes: First, obtain the relationship between the volume of business requests among the various business requesters in the distributed database; Secondly, based on the obtained size relationship from small to large, the target application is gradually rolled out in a canary manner at the business request level.

[0023] In one exemplary instance, the canary release of the target application on the business requester dimension based on the obtained size relationship from smallest to largest includes: Whenever a node database completes a canary release, based on the obtained size relationship, starting from the business requester with the smallest business request volume and proceeding in ascending order, each business requester is designated as the current business requester, and the following operations are performed: First, business requests from the current business requester are routed to the database of the node that has completed the canary release, and business requests from other business requesters are routed to other node databases. Secondly, obtain the execution status of the second business request routed to the database of the node that has completed the canary release; Finally, if the execution status of the second business request meets the corresponding preset requirements, the business requester with a larger business request volume than the current business requester will be taken as the new business requester, and the above operation will continue to be performed until the business requester with the largest business request volume is obtained, or if the execution status of the second business request does not meet the corresponding preset requirements.

[0024] For example, the preset requirements here refer to the requirements that need to be met in advance for the execution of the second service.

[0025] If there are problems during the application release process, it will affect all business requesters. The gray release method for applications provided in this application embodiment starts with the business requester with the smallest number of business requests and sequentially performs gray release on all business requesters, which can control the impact of problems in the application release process to the business requests from a single requester.

[0026] In one exemplary instance, the method further includes: First, obtain the types of all business requests, and generate the order of business types on which the canary release is based based on the obtained types; Secondly, the target application is released in a canary manner according to the order of the business types, from front to back, based on the request type dimension.

[0027] In one exemplary instance, the canary release of the target application in terms of request type, proceeding sequentially according to the business type, includes: Whenever a node database completes a canary release, each business type is sequentially designated as the current business type according to the order of the business types, and the following operations are performed: First, business requests of the current business type from any business requester are routed to the node database that has completed the canary release, and business requests of other business types from any business requester are routed to other node databases; Secondly, obtain the execution status of the third business request routed to the database of the node that has completed the canary release; Finally, if the execution status of the third business condition meets the corresponding preset requirements, the next business type is taken as the new business type, and the above operation continues to be performed until the last business type is obtained, or if the execution status of the third business request does not meet the corresponding preset requirements.

[0028] For example, the corresponding preset requirements here refer to the requirements that need to be met in advance for the execution of the third service.

[0029] If there are problems during the application release process, it will affect all types of business requests. The gray release method for applications provided in this application embodiment starts with one type of business request and then performs gray release on all types of business requests in sequence, which can control the impact of problems in the application release process to a single type of business request.

[0030] In one exemplary instance, the business type of the business request is distinguished by the request parameters in the business request.

[0031] In one exemplary instance, the execution status meets the corresponding preset requirements, including: The success rate of execution within the preset time period reaches the corresponding preset threshold.

[0032] This application also provides a method for canary release of an application, including: Step 1: The service router can identify the requester and the specific service being requested by the request parameters. Step 2: By default, all requests will be routed to the same data center for business processing; Step 3: When a canary release is required in data center A, configure the routing policy: all requesters and all business requests are routed to data center B; Step 4: The service router periodically pulls routing policy information. When a new configuration policy is read, the traffic is routed to data center B. Step 5: Complete the deployment of the business system in data center A; Step 6: Configure routing policy: Specify the requester, and route business requests to data center A, and route the rest to data center B; Step 7: Verify whether the gray-scale requester and business processing meet expectations; Step 8: Verification of different business functions can be completed sequentially according to requirements; Step 9: Based on the request volume, complete the gray-scale verification of the requester dimension in the order of small-volume requesters, medium-volume requesters, and large-volume requesters. Step 10: Finally, complete the canary release verification for all requesters and services.

[0033] The canary release method for applications provided in this application embodiment formulates a canary release strategy adapted to the content of the release based on three dimensions, thereby reducing system release risks. Canary release based on the requester dimension ensures that the impact is limited to the specified requester and does not spread to other requesters. Canary release based on the data center dimension allows verification of issues in an independent environment after a single data center release. Canary release based on the business dimension allows verification to be completed one by one according to the business, narrowing the scope of impact of change failures. Compared with existing business system canary release strategies, the canary release method for applications provided in this application embodiment adopts a canary release strategy from different dimensions—requester, business, and data center—to reduce release risks and ensure that if release risks occur, they are controlled within a manageable range, minimizing the impact of failures.

[0034] This application embodiment also provides a grayscale publishing device for an application, including: a memory and a processor, wherein the memory is used to store an executable program; The processor is used to read and execute the executable program to implement the canary release of the application described in any of the above embodiments.

[0035] The canary deployment device provided in this application embodiment, during the canary deployment of a target application in the node databases of each center of the distributed database, whenever a canary deployment of a node database is completed, obtains the execution status of business requests that are routed to the previous node database that has completed canary deployment and need to call data from the currently completed node database. When the execution status of the first business request meets the corresponding preset requirements, the next node database, which is located in a different center than the currently completed node database, is selected, and the canary deployment process continues. Therefore, it can quickly verify the execution status of business requests between node databases in different centers, thereby promptly discovering problems in the data calling between databases of the deployed application and greatly reducing the deployment risk.

[0036] It will be understood by those skilled in the art that all or some of the steps, systems, or apparatuses disclosed above, and their functional modules / units, can be implemented as software, firmware, hardware, or suitable combinations thereof. In hardware implementations, the division between functional modules / units mentioned above does not necessarily correspond to the division of physical components; for example, a physical component may have multiple functions, or a function or step may be performed collaboratively by several physical components. Some or all components may be implemented as software executed by a processor, such as a digital signal processor or microprocessor, or as hardware, or as an integrated circuit, such as an application-specific integrated circuit (ASIC). Such software may be distributed on a computer-readable medium, which may include computer storage media (or non-transitory media) and communication media (or transient media). As is known to those skilled in the art, the term computer storage media includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information (such as computer-readable instructions, data structures, program modules, or other data). Computer storage media include, but are not limited to, RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disc (DVD) or other optical disc storage, magnetic cartridges, magnetic tape, disk storage or other magnetic storage devices, or any other medium that can be used to store desired information and can be accessed by a computer. Furthermore, it is well known to those skilled in the art that communication media typically contain computer-readable instructions, data structures, program modules, or other data in modulated data signals such as carrier waves or other transmission mechanisms, and may include any information delivery medium.

Claims

1. A method for canary deployment of an application, characterized in that, include: The target application is then deployed in a canary manner to the node databases of each central part of the distributed database. During the canary release process of the target application, whenever a canary release is completed for a node database, the execution status of the first business request is obtained. If the execution status of the first business request meets the corresponding preset requirements, the next node database, which is located in a different center than the node database that has completed the canary release, is selected, and the canary release process continues. The first business request is a business request that is routed to the previous node database that has completed the canary release and needs to call data from the node database that has completed the canary release. The node database that has completed the canary release is located in a different center than the node database that has completed the canary release.

2. The method according to claim 1, characterized in that, The continued execution of the canary release process includes: Continue executing the canary release process until the canary release is completed for all node databases in all centers, or for one node database in each center, or the execution of the target service does not meet the corresponding preset requirements.

3. The method according to claim 1, characterized in that, Whenever a canary release is performed on a node database, all business requests are routed to node databases in centers other than the center where that node database is located.

4. The method according to claim 1, characterized in that, The method further includes: Obtain the relationship between the volume of business requests among the various business requesters in the distributed database; Based on the obtained size relationship, the target application is gradually rolled out in a canary manner at the business request level, from smallest to largest.

5. The method according to claim 4, characterized in that, The process of canary deployment of the target application at the business requester level based on the obtained size relationship from smallest to largest includes: Whenever a node database completes a canary release, based on the obtained size relationship, starting from the business requester with the smallest business request volume and proceeding in ascending order, each business requester is designated as the current business requester, and the following operations are performed: The business requests from the current business requester are routed to the database of the node that has completed the canary release, and the business requests from other business requesters are routed to other node databases. Obtain the execution status of the second business request routed to the database of the node that has completed the canary release; If the execution status of the second business request meets the corresponding preset requirements, the business requester with a larger business request volume than the current business requester will be taken as the new business requester, and the above operation will continue to be performed until the business requester with the largest business request volume is obtained, or if the execution status of the second business request does not meet the corresponding preset requirements.

6. The method according to claim 1, characterized in that, The method further includes: Obtain the types of all business requests, and generate the order of business types on which the canary release is based based on the obtained types; The target application will be released in a canary manner according to the order of the business types, from front to back, based on the request type dimension.

7. The method according to claim 6, characterized in that, The step of performing canary releases of the target application in terms of request type, in order of the business type from front to back, includes: Whenever a node database completes a canary release, each business type is sequentially designated as the current business type according to the order of the business types, and the following operations are performed: Route business requests of the current business type from any business requester to the node database that has completed the canary release, and route business requests of other business types from any business requester to other node databases; Obtain the execution status of the third service request routed to the database of the node that has completed the canary release; If the execution status of the third business condition meets the corresponding preset requirements, the next business type will be taken as the new business type, and the above operation will continue to be performed until the last business type is obtained, or if the execution status of the third business request does not meet the corresponding preset requirements.

8. The method according to claim 7, characterized in that, The business type of the business request is distinguished by the request parameters in the business request.

9. The method according to any one of claims 1 to 7, characterized in that, The execution status meets the corresponding preset requirements, including: The success rate of execution within the preset time period reaches the corresponding preset threshold.

10. A grayscale publishing device for an application, characterized in that, A memory and a processor, wherein the memory is used to store an executable program; The processor is used to read and execute the executable program to implement the canary release method of the application as described in any one of claims 1-9.