Gray release method for configuration items

By defining the grayscale strategy in the configuration center and using the grayscale driver, the configuration items are gradually pushed, which solves the rigid and cumbersome problems of grayscale release in the existing technology, realizes grayscale release with simple process and easy operation, and reduces the cost of grayscale release. risk and improve efficiency.

CN118567685APending Publication Date: 2024-08-30HANGZHOU YIKE INFORMATION TECH CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202410734752.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-07
Publication Date
2024-08-30

AI Technical Summary

Technical Problem

The existing grayscale release solution in the configuration center has shortcomings such as rigidity, rigidity, cumbersomeness, and manual switching, making it difficult to effectively control the risk and efficiency of configuration parameters.

Method used

By defining grayscale policies in the configuration center, you can gradually push configuration items, use grayscale drivers and timers to achieve gradual take effect and rollback, support configuration by cluster and alias, and automate the grayscale release and rollback process.

Benefits of technology

It realizes grayscale release with simple process and easy operation, reduces risks, improves the security and efficiency of configuration items, and supports efficient grayscale release of large systems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118567685A
    Figure CN118567685A
Patent Text Reader

Abstract

The invention discloses a gray release method for configuration items, which comprises a console, a configuration center and a client host, and is characterized in that the console is arranged in the configuration center and is communicated with the configuration center; the client host is communicated with the configuration center; the console controls and edits parameter information of the corresponding application system needing to be configured in the configuration center; a large amount of configuration item information required by the application system is stored in the configuration center; if one configuration item needs to be subjected to gray release, a matched gray strategy needs to be defined; the client host receives a configuration change instruction of the configuration center; the gray release method for the configuration item is simple in process, convenient to operate and capable of achieving step-by-step control release.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of server side, and more specifically, to a grayscale publishing method for configuration items. Background Art

[0002] The configuration center is one of the infrastructures of modern Internet application systems based on microservice architecture, which is used to centrally manage all application system configuration items. In modern Internet application systems based on microservice architecture, each application system has a large number of parameters that need to be configured in order to control and change the running behavior of the software. Each application system uses a cluster to deploy multiple client hosts that need to configure parameters. Therefore, the entire parameter configuration work is complex and error-prone, requiring governance and control, and the repetitive workload is also large. The configuration center came into being. It separates the configuration items inside the application system from each application and forms a self-contained entity. All configuration items are managed separately and controllably, improving configuration security and efficiency. However, this also brings another risk. When a parameter modification in the configuration center is issued, all client hosts that receive the parameter will take effect immediately and centrally. If the configuration parameters are incorrect, it is likely to cause large-scale online failures and cause irreparable losses.

[0003] At present, the mainstream configuration centers in the industry include Nacos, Apollo, etc., which all have some preliminary configuration item grayscale release mechanisms, that is, by setting a number of IP addresses to specify the client host range covered by this configuration item release. After the grayscale release is completed, manually canceling the grayscale configuration and then officially releasing it to the entire network again also plays a certain role in risk control. The grayscale release solution used by the existing configuration center server has the following obvious shortcomings: 1. The existing solution can only achieve rigid grayscale release, that is, first specify a number of target client hosts, and then release them once and for all. For these client hosts, there is still a scenario where risks break out after the configuration is issued.

[0004] 2. In large-scale Internet application systems, thousands of client hosts are deployed. The existing solution needs to specify the client host according to the fixed IP address during the grayscale release. Since the IP address is changeable and the specific physical client host may not be online, this configuration method based on the specified IP address is very rigid and difficult to reuse.

[0005] 3. When the grayscale range is relatively large, the existing solution is too cumbersome to configure the grayscale range by specifying multiple single client hosts.

[0006] 4. After the grayscale release of the existing solution is completed, it is necessary to manually switch to the formal release process. Summary of the invention

[0007] The present invention overcomes the shortcomings of the prior art and provides a grayscale release method for configuration items with a simple process, convenient operation, and the ability to achieve step-by-step controlled release.

[0008] The technical solution of the present invention is as follows: A grayscale release method for configuration items includes a console, a configuration center, and a client host, wherein the console is arranged in the configuration center and is connected to the configuration center; the client host is connected to the configuration center; The console controls the parameter information of the corresponding application system that needs to be configured in the editing configuration center; The configuration center stores a large amount of configuration item information required by the application system. If a configuration item needs to be released in grayscale, a matching grayscale strategy needs to be defined. The client host receives the configuration change instruction from the configuration center; The specific steps for configuring the grayscale strategy are as follows: 1) Configuration writing step: The console edits the configuration parameters that need to be updated into the configuration center to form a new configuration item; according to the content of the new configuration item, it is confirmed whether to set it as the main configuration item or the grayscale configuration item; if it is a main configuration item, it is not controlled by the grayscale policy and the update release step will be executed immediately; if it is a grayscale configuration item, it is controlled by the grayscale policy and the grayscale preprocessing step will be executed; 2) Grayscale preprocessing step: Among the client hosts within the grayscale release range, find a client host as an additional grayscale driver and promote the grayscale state according to the grayscale strategy; After the grayscale driver updates the configuration according to the configuration items, it publishes the progress update results back to the configuration center; 3) Grayscale release step: Based on the feedback from step 2), the configuration center will gradually push the new configuration item information within the grayscale release range again; if the grayscale policy ends, the grayscale policy status will be updated and the update release step will be executed; 4) Update and release steps: After updating the grayscale policy status in step 3), a push is triggered; after receiving the changed configuration item information, other client hosts check whether it hits the grayscale range. If it hits, the local configuration item is updated, otherwise it is ignored and continues to wait; 5) Repeat the above steps until all client host update configuration items are implemented.

[0009] Furthermore, a normal configuration item of the application system and the corresponding grayscale policy configuration item are distinguished by naming convention.

[0010] Furthermore, a timer is set inside the grayscale driver to drive and record the grayscale process of this grayscale strategy, and the current progress of the strategy will be modified at each time node.

[0011] Furthermore, the data structure of the grayscale strategy includes grayscale task information and configuration information; Grayscale task information records the execution status of tasks; configuration information records configuration item policies and status information.

[0012] Furthermore, the specific grayscale task information includes the following: progressRate is the current execution progress 0~100; startTime is the actual start time of the grayscale process; finishTime is the actual end time of the grayscale process; stepLastStartTime is the most recent start time of the current step; progressFlag indicates the progress status, 0-pause, 1-progress.

[0013] Furthermore, the specific configuration information includes the following: Key is the unique identifier of the grayscale configuration item; grayClusters is the required grayscale cluster; grayServerIds is the required grayscale client host; grayPeriod is the duration of the grayscale process, in hours; stepRatios is the grayscale progressive ratio; flag is the task status, 0-new, 1-ready, 2-in progress, 3-finished, 9-terminated and rolled back, -1-deleted or in draft status; Among them, 0-New means that the main configuration is not ready yet, and grayscale cannot be started. At this time, even if the main configuration is modified and sent in time, it will not be accepted; 1-Ready means that the main configuration is ready and grayscale is allowed.

[0014] Furthermore, the flag in the configuration information can only be set to 0, 1, 9 or -1, and other states are set by the grayscale driver itself.

[0015] Furthermore, when flag=0, the configuration item will be sent after saving, and the grayscale mechanism will not take effect temporarily; at this time, after the "main configuration item" is changed, all client hosts will discard it after receiving it or reading it when restarting; this state can be used when the main configuration item is not yet ready, and it is safe to modify the information in the main configuration item at will; When flag=1, the configuration item will be sent after saving, and the grayscale driver will immediately start the grayscale process and set the flag to 2, that is, in grayscale, the grayscale mechanism will take effect; at this time, after the "main configuration item" is changed, only the client host in the grayscale hit will receive and take effect; When flag=9, the configuration items will be sent after saving. The grayscale driver will terminate the grayscale process and automatically call the configuration center interface to roll back the main configuration items of the previous version. At this time, all client hosts will receive and take effect after the main configuration items are changed; When flag=-1, it is equivalent to deleting the grayscale mechanism or temporarily saving the grayscale policy as a draft. After saving, the configuration items will be issued, but no grayscale process will be started. At this time, the "main configuration items" are not subject to any control, and all client hosts will receive or read them to take effect. When the grayscale process is completed, the flag will automatically change to 3 and remain in this state.

[0016] Furthermore, when a configuration error is found during the grayscale process and an emergency stop is required, the manual operation console sets the flag to 9.

[0017] Furthermore, when the grayscale process is completed, the grayscale driver will first send a group message to notify the remaining client hosts to actively pull the latest configuration item information from the configuration center and update it locally; In extreme cases, if some client hosts suddenly crash during the pull process, the latest configuration item information will not be read after restart; If the flag is set to -1, it is equivalent to deleting the grayscale policy, and the latest configuration items will be successfully sent or read to the client host; if the "main configuration item" is modified again, for safety reasons, the new configuration item information will be discarded when it is actively sent, and the host will still use the most recently effective configuration item information locally; but if the host is restarted and read again, the latest configuration item information will be pulled.

[0018] Compared with the prior art, the present invention has the following advantages: The present invention provides a grayscale release strategy for configuration items. After the configuration item is submitted for release by the configuration center, the configuration item can be gradually received and made effective for a pre-specified application system cluster or client host group in a certain progressive ratio, and whether the target client host meets expectations after the configuration item takes effect can be observed. Once a problem is found, the release process can be stopped immediately or the release can be rolled back; after the grayscale release is completed and confirmed to be correct, it can be released to the entire network, thereby effectively controlling or reducing risks.

[0019] The present invention gradually increases the effective range according to a certain ratio, such as starting from 1 unit, then expanding to 3 units, 11 units, etc., to achieve a progressive coverage process of progressive increase.

[0020] The present invention sets an alias for each client host, supports setting the grayscale range according to the alias that is friendly to the operation and maintenance personnel, and avoids the rigidity of configuration due to the release method by IP address, the volatility of IP, or the specific physical client host is not online, which makes it difficult to truly and efficiently release and use it comprehensively. Therefore, the present invention can support organizing these client hosts into physical clusters of different sizes, the number of clusters can reach dozens, and the cluster name is relatively fixed, so it is more convenient and practical to perform grayscale release by specifying the cluster name.

[0021] The present invention can automatically publish the remaining client hosts after the grayscale process is completed. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 It is a schematic diagram of the framework of the present invention; Figure 2 It is a client host processing flow chart of the present invention; Figure 3 This is a flag state flow diagram in the grayscale strategy of the present invention. DETAILED DESCRIPTION

[0023] The embodiments of the present invention are described in detail below, wherein the same or similar reference numerals throughout represent the same or similar elements or elements with similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present invention and cannot be used as a limitation of the present invention.

[0024] It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical terms and scientific terms) used herein have the same meaning as generally understood by those skilled in the art in the field to which the present invention belongs. It should also be understood that terms such as those defined in common dictionaries should be understood to have meanings consistent with the meanings in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless defined as herein.

[0025] The numbers of the steps mentioned in each embodiment are only for the convenience of description and have no substantial sequence relationship. Different steps in each specific embodiment can be combined in different sequences to achieve the purpose of the invention.

[0026] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.

[0027] like Figures 1 to 3 As shown, a grayscale release method for configuration items includes a console, a configuration center and a client host; the console is set in the configuration center and is connected to the configuration center; the client host is connected to the configuration center.

[0028] The console controls the parameter information of the corresponding application system that needs to be configured in the editing configuration center.

[0029] The configuration center stores a large amount of configuration item information required by the application system. If a configuration item needs to be released in grayscale, a matching grayscale policy needs to be defined. The grayscale policy itself can also be stored as a configuration item in the configuration center. In the grayscale policy, you can configure which clusters or client hosts participate in the grayscale process. After the configuration item information is changed, it can be quickly distributed with the help of the configuration center's own mechanism.

[0030] The client host receives the configuration change instructions from the configuration center.

[0031] The specific steps for configuring the grayscale strategy are as follows: 1) Configuration writing step: The console edits the configuration parameters that need to be updated into the configuration center to form a new configuration item. According to the content of the new configuration item, confirm whether to set it as a main configuration item or a grayscale configuration item. If it is a main configuration item, it is not controlled by the grayscale policy and the update release step will be executed immediately. If it is a grayscale configuration item, it is controlled by the grayscale policy and the grayscale preprocessing step will be executed.

[0032] Among them, a normal configuration item of the application system and the corresponding grayscale policy configuration item can be distinguished by naming convention. For example, the name of the grayscale policy configuration item can be distinguished by adding a fixed suffix "_gray" after the normal configuration item name. Therefore, taking this as an example, the former is called the "main configuration item" and the latter is called the "grayscale configuration item". There is no clear requirement on which of the two configuration items is created first, but when there is no grayscale configuration item, the main configuration item is definitely not controlled by grayscale and will be immediately sent down or read by the client host immediately.

[0033] 2) Grayscale preprocessing step: Among the client hosts within the grayscale release range, find a client host as an additional grayscale driver to advance the grayscale state according to the grayscale strategy. A timer is set inside the grayscale driver to drive and record the grayscale process of this grayscale strategy. The current progress of the strategy will be modified at each time node. That is, the grayscale strategy itself is also a task, and the task contains progress information.

[0034] After the grayscale driver updates the configuration according to the configuration items, it publishes the progress update results back to the configuration center.

[0035] 3) Grayscale release step: Based on the feedback from step 2), the configuration center will gradually push the new configuration item information within the grayscale release range. If the grayscale policy ends, the grayscale policy status will be updated and the update release step will be executed.

[0036] 4) Update and release steps: After updating the grayscale policy status in step 3), a push is triggered. After receiving the changed configuration item information, other client hosts check whether it hits the grayscale range. If it hits, the local configuration item is updated, otherwise it is ignored and continues to wait.

[0037] 5) Repeat the above steps until all client host update configuration items are implemented.

[0038] That is, after the grayscale policy process is completed, the remaining client hosts can be automatically released. This overcomes the existing solution that requires manual switching to the formal release process after the grayscale release is completed. There is no need to add additional components to achieve this. It can be achieved by using existing devices and client hosts and adjusting local process strategies.

[0039] Specifically, the data structure of the grayscale policy includes grayscale task information and configuration information. That is, in this data structure, the configuration information of the grayscale policy and the grayscale task information are combined together. Among them, a grayscale policy can only have one grayscale task in progress at a time. The grayscale task information records the execution status of the task. The configuration information records the configuration item strategy and status information.

[0040] The specific configuration information includes the following: Key is the unique identifier of the grayscale configuration item.

[0041] grayClusters is the gray cluster required. Gray cluster refers to the cluster to which the client host that needs to update the configuration item belongs. You can select several gray clusters from all clusters as needed; each client host will set a corresponding identifier to declare which cluster it belongs to, and a host belongs to only one cluster.

[0042] grayServerIds is the required grayscale client host. The corresponding client host can be given an alias according to the operation and maintenance personnel's own habits for easy identification.

[0043] grayPeriod is the duration of the grayscale process in hours.

[0044] stepRatios is the grayscale progressive ratio.

[0045] flag is the task status, 0-new, 1-ready, 2-in grayscale, 3-finished, 9-terminated and rolled back, -1-deleted or draft status.

[0046] Among them, 0-New means that the main configuration is not ready yet, and the grayscale cannot be started. At this time, the main configuration will not be accepted even if it is modified and sent out in time. 1-Ready means that the main configuration is ready and grayscale is allowed.

[0047] Specific grayscale task information includes the following: progressRate is the current execution progress 0~100.

[0048] startTime is the actual start time of the grayscale process.

[0049] finishTime is the actual end time of the grayscale process.

[0050] stepLastStartTime is the most recent start time of the current step.

[0051] progressFlag is the progress status and is used in reserve. The specific definition is 0-pause and 1-progress.

[0052] Take the configuration items in Nacos as an example: { "key":"nacos: / / myenv_gray / fdn", "grayClusters":"fdnLocal,fdnDev", which is the corresponding grayscale cluster name.

[0053] "grayServerIds":"fdnLocalWeb1", which is the corresponding grayscale client host name.

[0054] "grayPeriod":8, "stepRatios":"1,2,5,15,50,100", is the grayscale progressive ratio. This design is divided into 6 steps, and the object ratio of each grayscale step; among them, the execution time of each step is the same.

[0055] "flag":0, "task":{ "progressRate":0, "progressFlag":0, "stepLastStartTime":null, "startTime":"yyyy-MM-dd HH:mm:ss", "finishTime":"yyyy-MM-dd HH:mm:ss" } } Therefore, this solution gradually increases the scope of effectiveness through the stepRatios grayscale progressive ratio. For example, the case starts with 1 machine, then expands to 2 machines, 5 machines, 15 machines, and so on, to achieve a progressively increasing coverage process and complete the configuration update of hundreds of client hosts within the grayscale release range.

[0056] The flag in the specific configuration information can only be set to 0, 1, 9 or -1, and other states are set by the grayscale driver itself.

[0057] When flag=0, the configuration item will be sent after saving, and the grayscale mechanism will not take effect temporarily. At this time, after the "main configuration item" is changed, all client hosts will discard it after receiving it or reading it when restarting. This state can be used when the main configuration item is not ready yet, and it is safe to modify the information in the main configuration item at will.

[0058] When flag=1, the configuration item will be sent after saving, and the grayscale driver will immediately start the grayscale process and set the flag to 2, that is, in grayscale, the grayscale mechanism will take effect. At this time, after the "main configuration item" is changed, only the client host in the grayscale hit will receive and take effect.

[0059] When flag=9, the configuration item will be sent after saving, the grayscale driver will abort the grayscale process, and automatically call the configuration center interface to roll back the main configuration item of the previous version. At this time, all client hosts will receive and take effect after the main configuration item is changed. It is generally used when a configuration error is found during the grayscale policy process and an emergency stop is required. At this time, manually set the flag to 9 in the configuration center console. Configuration rollback can also be done manually in the console.

[0060] When flag=-1, it is equivalent to deleting the grayscale mechanism or temporarily saving the grayscale policy as a draft. After saving, the configuration items will be issued, but no grayscale process will be started. At this time, the "main configuration item" is not subject to any control, and all client hosts will receive or read it to take effect.

[0061] When the grayscale process is completed, the flag will automatically change to 3 and remain in this state. Specifically, when the grayscale process is completed, the grayscale driver will first send a group message to notify the remaining client hosts to actively pull the latest configuration item information from the configuration center and update it locally.

[0062] In extreme cases, if some client hosts suddenly crash during the pull process, the latest configuration item information will not be read after restart.

[0063] If the flag is set to -1, it is equivalent to deleting the grayscale policy, and the latest configuration items will be successfully sent or read to the client host.

[0064] If the "main configuration item" is modified again, the new configuration item information will be discarded for safety reasons, and the client host will still use the most recent effective configuration item information. However, if the client host is restarted and re-read, the latest configuration item information will be pulled.

[0065] like Figure 2As shown, from the perspective of the client host, the configuration item change information of the configuration center is received, including the change information of the main configuration items and the grayscale configuration items, and then corresponding processing is performed respectively, thereby completing the closed loop of grayscale control.

[0066] The specific client host monitors whether there is any change item information in the configuration center. After receiving the configuration item change information, it determines whether it is the main configuration item change information. If it is the main configuration item change information, it detects whether it is a gray configuration item. If it is a gray configuration item, it detects whether it is hit by the gray configuration item. If it is hit by the gray configuration item, it reads the latest main configuration item from the configuration center. If not, it is not a gray configuration item and ignores this change. If it is not a gray configuration item, refresh the local main configuration item and read the latest main configuration item information from the configuration center.

[0067] If it is not a main configuration item change, check whether it is hit by the gray configuration item. If it is hit, read the latest main configuration item from the configuration center; if it is not hit, ignore the change.

[0068] In the above process, performance needs to be considered when judging whether "a grayscale policy exists". The grayscale policy configuration item name can be derived from the main configuration item name, and then the configuration center interface is called according to the name to query the policy content and cache it locally on the client host. If the grayscale policy has not been configured, the client host should also cache a placeholder policy with flag=-1 locally to avoid having to read it from the configuration center every time.

[0069] As a preferred embodiment, the above process also has an auxiliary process, namely, how to determine whether the current client host can become a grayscale driver. Whenever the client host receives grayscale policy change information, if it finds that the client host is the first grayscale target, it will become a grayscale driver; if the client host was originally a grayscale driver but is no longer a grayscale driver, it will cancel the grayscale driver, that is, stop the internal driver timer operation.

[0070] Specifically, there will be multiple client hosts in a cluster (the name of the client host can be changed). For each client host, the operation and maintenance personnel will configure a client host alias (that is, serverid, such as SlhCluster10Web1) and the cluster name to which the client host belongs (such as SlhCluster).

[0071] If the grayscale method is used, the grayscale policy configures which cluster names participate in the grayscale process. This method stipulates that if a host finds that the cluster name it belongs to is the first cluster in the grayscale range and its serverid ends with Web1, it can serve as a grayscale driver. When the grayscale policy is sent to all client hosts, each client host can naturally know whether it hits the rule by checking its cluster name and host alias, and automatically set itself as a grayscale driver.

[0072] If the grayscale method is implemented by client host, the serverid (i.e. host alias) of the client hosts configured in the grayscale policy will participate in the grayscale process. This method stipulates that if a host finds that its serverid is the first serverid in the policy, it can serve as a grayscale driver. When the grayscale policy is issued to all client hosts, each client host can naturally know whether it hits the rule by checking its own serverid, and automatically set itself as a grayscale driver.

[0073] As a preference, during the grayscale release phase, when a client host is restarted and initialized, it must actively read the main configuration item information of the configuration center, and judgment is also required at this time. If the grayscale range is hit, the latest main configuration item information can be read and enabled, otherwise only the last configuration item information can be read and used. Various configuration centers generally provide an interface for reading the latest version of a configuration item.

[0074] In summary, after the grayscale strategy is successfully completed or rolled back, the main configuration items have been tested and passed. It is recommended to manually change the flag of the grayscale task to -1 in the configuration center console to close the grayscale strategy so that the main configuration items will always take effect. Before modifying the main configuration item next time, change the flag to 0 and repeat the grayscale process above to ensure that all client hosts have updated the parameters.

[0075] Therefore, this solution can realize the progressive increase of the effective scope in a certain proportion within a specified time span, and can slowly, controllably and gradually expand the scope for verifying the status of the target main client machine, so as to gradually expose potential risks and stop and correct them in time, thereby minimizing possible risks or losses.

[0076] By effectively configuring the grayscale range by server alias, the impact of IP changes can be shielded, which is more friendly to operation and maintenance personnel. By configuring the grayscale range by cluster name, grayscale can be implemented by cluster in large systems, which is more convenient and practical.

[0077] After the grayscale range of this plan is completed, it can be automatically promoted to the whole network for release, reducing manual intervention and improving efficiency.

[0078] The above is only a preferred embodiment of the present invention. It should be pointed out that ordinary technicians in this technical field can make several improvements and modifications without departing from the concept of the present invention. These improvements and modifications should also be regarded as within the scope of protection of the present invention.

Claims

1. A grayscale release method for a configuration item, characterized in that: It includes a console, a configuration center and a client host. The console is set in the configuration center and is connected to the configuration center; the client host is connected to the configuration center; The console controls the parameter information of the corresponding application system that needs to be configured in the editing configuration center; The configuration center stores a large amount of configuration item information required by the application system. If a configuration item needs to be released in grayscale, a matching grayscale strategy needs to be defined. The client host receives the configuration change instruction from the configuration center; The specific steps for configuring the grayscale strategy are as follows: 1) Configuration writing step: The console edits the configuration parameters that need to be updated into the configuration center to form a new configuration item; according to the content of the new configuration item, it is confirmed whether to set it as the main configuration item or the grayscale configuration item; if it is a main configuration item, it is not controlled by the grayscale policy and the update release step will be executed immediately; if it is a grayscale configuration item, it is controlled by the grayscale policy and the grayscale preprocessing step will be executed; 2) Grayscale preprocessing step: Among the client hosts within the grayscale release range, find a client host as an additional grayscale driver and promote the grayscale state according to the grayscale strategy; After the grayscale driver updates the configuration according to the configuration items, it publishes the progress update results back to the configuration center; 3) Grayscale release step: Based on the feedback from step 2), the configuration center will gradually push the new configuration item information within the grayscale release range again; if the grayscale policy ends, the grayscale policy status will be updated and the update release step will be executed; 4) Update and release steps: After updating the grayscale policy status in step 3), a push is triggered; after receiving the changed configuration item information, other client hosts check whether it hits the grayscale range. If it hits, the local configuration item is updated, otherwise it is ignored and continues to wait; 5) Repeat the above steps until all client host update configuration items are implemented.

2. A method for grayscale release of configuration items according to claim 1, characterized in that: A normal configuration item of the application system and the corresponding grayscale policy configuration item are distinguished by naming convention.

3. A method for grayscale release of configuration items according to claim 1, characterized in that: A timer is set inside the grayscale driver to drive and record the grayscale process of this grayscale strategy. The current progress of the strategy will be modified at each time node.

4. A method for grayscale release of configuration items according to claim 1, characterized in that: The data structure of the grayscale strategy includes grayscale task information and configuration information; Grayscale task information records the execution status of tasks; configuration information records configuration item policies and status information.

5. A method for grayscale release of configuration items according to claim 4, characterized in that: Specific grayscale task information includes the following: progressRate is the current execution progress 0~100; startTime is the actual start time of the grayscale process; finishTime is the actual end time of the grayscale process; stepLastStartTime is the most recent start time of the current step; progressFlag indicates the progress status, 0-pause, 1-progress.

6. A method for grayscale release of configuration items according to claim 4, characterized in that: The specific configuration information includes the following: Key is the unique identifier of the grayscale configuration item; grayClusters is the required grayscale cluster; grayServerIds is the required grayscale client host; grayPeriod is the duration of the grayscale process, in hours; stepRatios is the grayscale progressive ratio; flag is the task status, 0-new, 1-ready, 2-in progress, 3-finished, 9-terminated and rolled back, -1-deleted or in draft status; Among them, 0-New means that the main configuration is not ready yet, and grayscale cannot be started. At this time, even if the main configuration is modified and sent in time, it will not be accepted; 1-Ready means that the main configuration is ready and grayscale is allowed.

7. A method for grayscale release of configuration items according to claim 6, characterized in that: The flag in the configuration information can only be set to 0, 1, 9 or -1, and other states are set by the grayscale driver itself.

8. A method for grayscale release of configuration items according to claim 6, characterized in that: When flag=0, the configuration item will be sent after saving, and the grayscale mechanism will not take effect temporarily; at this time, after the "main configuration item" is changed, all client hosts will discard it after receiving it or reading it when it is restarted; this state can be used when the main configuration item is not yet ready, and it is safe to modify the information in the main configuration item at will; When flag=1, the configuration item will be sent after saving, and the grayscale driver will immediately start the grayscale process and set the flag to 2, that is, in grayscale, the grayscale mechanism takes effect; At this time, after the "main configuration item" is changed, only the client host in the grayscale hit will receive the effect; When flag=9, the configuration items will be sent after saving. The grayscale driver will terminate the grayscale process and automatically call the configuration center interface to roll back the main configuration items of the previous version. At this time, all client hosts will receive and take effect after the main configuration items are changed; When flag=-1, it is equivalent to deleting the grayscale mechanism or temporarily saving the grayscale policy as a draft. After saving, the configuration items will be issued, but no grayscale process will be started. At this time, the "main configuration items" are not subject to any control, and all client hosts will receive or read them to take effect. When the grayscale process is completed, the flag will automatically change to 3 and remain in this state.

9. A method for grayscale release of configuration items according to claim 8, characterized in that: If a configuration error is found during the grayscale process and an emergency stop is required, the manual operation console will set the flag to 9.

10. A method for grayscale release of configuration items according to claim 8, characterized in that: When the grayscale process is completed, the grayscale driver will first send a group message to notify the remaining client hosts to actively pull the latest configuration item information from the configuration center and update it locally; In extreme cases, if some client hosts suddenly crash during the pull process, the latest configuration item information will not be read after restart; If the flag is set to -1, it is equivalent to deleting the grayscale policy, and the latest configuration items will be successfully sent or read to the client host; If the "main configuration item" is modified again, the new configuration item information that is actively sent will be discarded for safety reasons, and the host will still use the most recently effective configuration item information locally; but if the host is restarted and re-read, the latest configuration item information will be pulled.

Citation Information

Cited By

  • Apparatus, method and recording medium storing instructions for releasing a mobile application

    TWI929775B