CN115665230A - Non-intrusive application gray scale release control method - Google Patents

Non-intrusive application gray scale release control method Download PDF

Info

Publication number
CN115665230A
CN115665230A CN202211267594.3A CN202211267594A CN115665230A CN 115665230 A CN115665230 A CN 115665230A CN 202211267594 A CN202211267594 A CN 202211267594A CN 115665230 A CN115665230 A CN 115665230A
Authority
CN
China
Prior art keywords
gray
flow
service
strategy
micro
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211267594.3A
Other languages
Chinese (zh)
Inventor
徐杰
魏明丽
磨柑竹
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202211267594.3A priority Critical patent/CN115665230A/en
Publication of CN115665230A publication Critical patent/CN115665230A/en
Pending legal-status Critical Current

Links

Images

Abstract

The invention relates to a non-intrusive application gray scale release control method, which comprises the following steps: the method comprises the steps that micro-services needing to be updated in the back end acquire a new version example, the new version example is started, after the new version example is started, all the micro-services send gray strategy request signals to a gray strategy management console, and after the gray strategy management console receives the request signals, gray strategies are acquired and sent to a java agent; registering a new version example, and carrying out gray marking on all examples in the microservice based on a gray strategy in a java agent of a registration center; and the service gateway forwards the flow based on the gray mark, and continues the next-hop service after the flow is forwarded until the last instance returns a response result, and the session is ended. Compared with the prior art, the invention has the advantages of non-invasion, realization of an interface function integrating receiving gray level strategy rules, gray level flow identification, gray level flow marking and marking gray level service and the like.

Description

Non-intrusive application gray scale release control method
Technical Field
The invention relates to application gray scale release, in particular to a non-intrusive application gray scale release control method.
Background
The software updating technology adopts a blue-green issuing mode in the application issuing of a service acceptance scene, namely, unilateral flow is shielded firstly, the cluster A is upgraded after shielding, and after unilateral upgrading is completed, service personnel test. And after the test is passed, switching the flow to repeat the operation on the other cluster B, and finally opening the whole body to the outside after the test is passed. In a development test scene, during the parallel development of multiple versions, one version development test joint call needs to monopolize environment resources, and when another version function joint call needs to wait for the end of the last test version and then is released to a test environment. The application of these scenarios has the problems that the resource utilization rate is low, the same cluster environment cannot support coexistence of multiple versions, when environmental resource conflicts exist in parallel development and testing for multiple versions, and service acceptance experience is poor, in the above mode, a test user needs to test one cluster version, and needs to test another cluster version again after switching the flow, that is, needs to test twice. In order to improve service acceptance experience and resource utilization rate, the existing software updating adopts a gray level issuing method, but the gray level issuing of a gray level agent adopted in the existing gray level issuing method does not realize non-invasive issuing, and the gray level agent does not realize the gray level flow marking and gray level marking service function and cannot record and replay flow.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a non-invasive application gray scale release control method which can realize the interface function integrating receiving gray scale strategy rules, gray scale flow identification, gray scale flow marking and marking gray scale service.
The purpose of the invention can be realized by the following technical scheme:
a non-intrusive application gray scale release control method comprises the following steps:
the method comprises the following steps that a micro service needing to be updated in a rear end acquires a new version example, a gray level strategy management console sends a resource application command to a k8s server, and the k8s server sends an example starting command to the micro service storing the new version example;
after receiving the instance starting instruction, the micro service with the new version instance starts the new version instance, after the start is completed, all the micro services send a gray strategy request signal to a gray strategy management console, wherein all the micro services comprise the micro service with the new version instance and the micro service without the new version instance, after the gray strategy management console receives the request signal, the gray strategy is obtained, the gray strategy is sent to java agents of all the micro services, java agents of a registration center and java agents of a service gateway, and the java agents of all the micro services are arranged in each instance of the micro service;
the method comprises the steps that the micro service with a new version example sends the new version example to a java agent of a registration center for registration, all examples in the micro service are set with gray scale identifiers based on a gray scale strategy in the java agent of the registration center and are identified as a gray scale example and a non-gray scale example, an example list is generated, all examples comprise the new version example and an original version example, and all micro services obtain the gray scale identifiers of the examples in the micro service by calling the example list of the registration center;
the service gateway at the back end receives the flow, judges whether the flow accords with the gray strategy based on the gray strategy in the java agent of the service gateway, and if the flow accords with the gray strategy, the java agent of the service gateway marks the gray of the user corresponding to the flow;
and after judging whether the flow accords with the gray strategy or not, forwarding the flow by the service gateway based on the gray mark, and after the flow is forwarded, continuing the next-hop service until the last instance returns a response result, and ending the session.
Furthermore, the java agent rewrites the corresponding component class by class loading time to complete receiving the gray level strategy, judging whether the flow accords with the gray level strategy and marking the gray level.
Further, forwarding the traffic based on the gray label specifically includes:
and if the java agent of the service gateway does not perform the gray marking on the user corresponding to the flow, forwarding the flow to the gray example of the required micro service, and if the java agent of the service gateway does not perform the gray marking on the user corresponding to the flow, forwarding the flow to the non-gray example of the required micro service.
Further, if the java agent of the service gateway performs gray marking on the user corresponding to the traffic and the needed micro service does not have a gray instance, the traffic is forwarded to the non-gray instance of the needed micro service.
Further, the continuing next hop service specifically includes:
the needed micro service receives the flow, whether a user corresponding to the flow has a gray mark is judged based on a gray strategy in the java agent of the needed micro service, if yes, the flow is forwarded to a gray example of the micro service needed by the next hop, and if not, the flow is forwarded to a non-gray example of the micro service needed by the next hop.
Further, if the user corresponding to the flow has a gray label and the micro-service required by the next hop does not have a gray example, the flow is forwarded to the non-gray example of the micro-service required by the next hop.
Further, the method further comprises: and the gray strategy management console sends the gray strategy and the new version example to the front-end agent, and the nginx is updated after the front-end agent receives the gray strategy and the new version example, so that the front-end gray strategy and the front-end new version example take effect.
Further, the nginx is deployed in the virtual machine and is responsible for static resource management and backend application load.
Further, the method further comprises: the front end accesses the back-end service to obtain the gray mark by carrying the token, and uses the corresponding static resource according to the mark.
Furthermore, the java agent comprises a flow recording module for realizing flow recording and playback.
Compared with the prior art, the invention has the following beneficial effects:
(1) The method has the advantages that the java agent technology is used in the micro-service, the registration center and the service gateway, non-invasive application service is realized, corresponding component classes are rewritten at class loading time, and meanwhile, flow control modes such as application gray strategy issuing, gray flow marking, setting and judgment gray identification are controlled, so that multiple functions are realized without depending on a frame.
(2) The application metadata information injected into the gray scale version is started through the k8s server application, and the gray scale rules are uniformly managed and issued through the gray scale strategy management console, so that the gray scale rules and the gray scale version can be updated conveniently.
(3) The java agent comprises a flow recording module, so that the inter-team communication times are effectively reduced, and repeated operation is avoided.
Drawings
FIG. 1 is a flow chart of the present invention;
FIG. 2 is a diagram of a back-end gray scale publishing system of the present invention;
FIG. 3 is a back end flow identification chart of the present invention;
fig. 4 is a diagram of a front-end gray scale distribution system according to the present invention.
Detailed Description
The invention is described in detail below with reference to the figures and specific embodiments. The present embodiment is implemented on the premise of the technical solution of the present invention, and a detailed implementation manner and a specific operation process are given, but the scope of the present invention is not limited to the following embodiments.
The invention provides a method for controlling gray scale release without intrusion application, wherein the flow chart of the method is shown in figure 1, and the method firstly releases a gray scale strategy at the back end. The rear end gray scale distribution system diagram is shown in fig. 2. The rear-end gray level release system comprises a gray level strategy management console, a k8s server, a service gateway, a registration center and a micro service, wherein a new version instance and an original version instance are stored in the micro service, and java agents are arranged in the service gateway, the registration center and the micro service. The service gateway, the registration center and the micro-service are supported by K8s cluster environment resources, the service gateway is responsible for applying a back-end service load, the java agent of the service gateway marks the gray level and judges whether the flow rate meets a gray level strategy, and the registration center is responsible for registering application instances and providing the instances for the micro-service.
The release of the gray strategy specifically comprises the following steps: the method comprises the following steps that a micro service needing to be updated in a rear end acquires a new version example, a gray level strategy management console sends a resource application command to a k8s server, and the k8s server sends an example starting command to the micro service storing the new version example; after receiving an instance starting instruction, the micro service stored with the new version instance starts the new version instance, after the start is completed, all the micro services send a gray strategy request signal to a gray strategy management console, all the micro services comprise the micro service stored with the new version instance and the micro service not stored with the new version instance, after the gray strategy management console receives the request signal, the gray strategy is obtained, the gray strategies are sent to java agents of all the micro services, java agents of a registration center and java agents of a service gateway, and the java agents of all the micro services are arranged in each instance of the micro service; the method comprises the steps that the micro service with the new version example sends the new version example to a java agent of a registration center for registration, all examples in the micro service are set with gray scale identifications based on a gray scale strategy in the java agent of the registration center and are identified as a gray scale example and a non-gray scale example, an example list is generated, all examples comprise the new version example and an original version example, and all micro services obtain the gray scale identifications of the examples in the micro service by calling the example list of the registration center.
Taking fig. 2 as an example, the V2 version in the micro service a and the micro service C is a new version example and conforms to the grayscale policy, the V2 version in the micro service a and the micro service C is a grayscale example, and the V1 version in the micro service a, the micro service B, and the micro service C is a non-grayscale example. And the micro service A and the micro service C receive an instance starting instruction sent by the k8s server, and start the V2 version in the micro service A and the micro service C. After the start is finished, the micro service A, the micro service B and the micro service C send gray strategy request signals to a gray strategy management console, and the gray strategy management console sends gray strategies to java agents of all instances of java agents of a registry, java agents of a service gateway, V1 versions and V2 versions of the micro service A, V1 versions of the micro service B and V1 versions and V2 versions of the micro service C. After the gray level strategy is sent, the micro service A and the micro service C register the V2 version in the micro service A and the micro service C to the registration center. The V2 versions in the micro service A and the micro service C conform to the gray level policy in the java agent of the registry, so the V2 versions in the micro service A and the micro service C are identified as gray level instances.
After the gray level strategy is issued, the gray level strategies are stored in java agents of all the micro services, java agents of the registration center and java agents of the service gateway, the gray level identifiers of gray level instances and non-gray level instances in the micro services are obtained by the micro services through calling an instance list of the registration center, and each instance in the micro services has a corresponding gray level identifier. And the java agent rewrites the corresponding component class through class loading time to complete receiving the gray level strategy, setting the gray level identification, judging whether the flow accords with the gray level strategy and setting and judging the gray level mark.
In some embodiments, the java agent comprises a flow recording module for realizing flow recording and playback, and in the development process, the flow recording and playback capability can effectively reduce the communication times among teams. For example, a test simulation completes a transaction, but if a BUG is found, the back end can play back the recorded flow, and repeated operation is avoided.
The non-intrusive application gray scale issuing control method provided by the invention identifies the rear-end flow after the issuing of the gray scale strategy is completed. An identification graph of the back-end traffic is shown in fig. 3.
The specific process of identifying the back-end flow is as follows: the method comprises the steps that a service gateway at the rear end receives flow, whether the flow accords with a gray strategy is judged based on the gray strategy in a java agent of the service gateway, if yes, the java agent of the service gateway marks the gray of a user corresponding to the flow, and namely the flow of the user is gray flow; and after judging whether the flow accords with the gray strategy or not, forwarding the flow by the service gateway based on the gray mark, continuing the next-hop service after the flow is forwarded, until the last instance returns a response result, and ending the session.
In the process that the service gateway forwards the flow based on the gray label, if the java agent of the service gateway carries out gray label on the user corresponding to the flow, the flow is forwarded to the gray example of the needed micro service, and if the java agent of the service gateway does not carry out gray label on the user corresponding to the flow, the flow is forwarded to the non-gray example of the needed micro service. And if the java agent of the service gateway marks the gray scale of the user corresponding to the flow and the needed micro service does not have a gray scale example, forwarding the flow to the non-gray scale example of the needed micro service.
In the process of the next hop of service, the required micro service receives flow, whether a user corresponding to the flow has a gray scale mark is judged based on a gray scale strategy in the java agent of the required micro service, if yes, the flow is forwarded to a gray scale example of the micro service required by the next hop, and if not, the flow is forwarded to a non-gray scale example of the micro service required by the next hop. And if the user corresponding to the flow has the gray label and the micro service required by the next hop does not have a gray example, forwarding the flow to the non-gray example of the micro service required by the next hop. There is a java agent in each instance of each microservice.
Taking fig. 3 as an example, in fig. 3, the V2 version in the micro service a and the micro service C is a grayscale example, and the V1 version in the micro service a, the micro service B and the micro service C is a non-grayscale example. And if the java agent of the service gateway judges that the flow accords with the gray level strategy, forwarding the flow to the gray level instance V2 version in the micro service A. If there is no grayscale instance in microservice B needed for the next hop, then the traffic is forwarded from microservice a to the non-grayscale instance V1 version of microservice B selected at the bottom. And judging that the flow has a gray scale mark by the java agent in the non-gray scale instance V1 version of the micro service B, and forwarding the flow from the micro service B to the gray scale instance V2 version in the selected micro service C if the gray scale instance V2 version exists in the micro service C required by the next hop. And if the micro service A for the service gateway to forward the traffic does not have a gray level example, selecting a non-gray level example V1 to forward the traffic. And if the gray level strategy in the java agent of the service gateway judges that the flow does not conform to the gray level strategy, the flow of the user is non-gray level flow, and the non-gray level example V1 is selected for both the flow forwarding of the service gateway and the flow forwarding of the following micro-service.
The non-intrusive application gray scale release control method further comprises the gray scale version release of the front end, and a gray scale version release system of the front end is shown in fig. 4. In fig. 4, agent is responsible for receiving the command issued by the gray policy management console. And the gray strategy management console sends the gray strategy and the new version example to the front-end agent, and the nginx is updated after the front-end agent receives the gray strategy and the new version example, so that the front-end gray strategy and the new version example take effect. nginx is deployed in the virtual machine and is responsible for static resource management and back-end application load.
The method for controlling the non-invasive application gray level release further comprises the steps of recognizing the gray level flow of the front end, accessing the back end service to obtain the gray level mark by the front end through carrying the token, and using the corresponding static resource according to the mark.
The foregoing detailed description of the preferred embodiments of the invention has been presented. It should be understood that numerous modifications and variations can be devised by those skilled in the art in light of the above teachings. Therefore, the technical solutions available to those skilled in the art through logic analysis, reasoning and limited experiments based on the prior art according to the concept of the present invention should be within the scope of protection defined by the claims.

Claims (10)

1. A non-intrusive application gray scale release control method is characterized by comprising the following steps:
the method comprises the following steps that a micro service needing to be updated in a rear end acquires a new version example, a gray level strategy management console sends a resource application command to a k8s server, and the k8s server sends an example starting command to the micro service storing the new version example;
after receiving the instance starting instruction, the micro service with the new version instance starts the new version instance, after the start is completed, all the micro services send a gray strategy request signal to a gray strategy management console, wherein all the micro services comprise the micro service with the new version instance and the micro service without the new version instance, after the gray strategy management console receives the request signal, the gray strategy is obtained, the gray strategy is sent to java agents of all the micro services, java agents of a registration center and java agents of a service gateway, and the java agents of all the micro services are arranged in each instance of the micro service;
the method comprises the steps that the micro service with a new version example sends the new version example to a java agent of a registration center for registration, all examples in the micro service are set with gray scale identifiers based on a gray scale strategy in the java agent of the registration center and are identified as a gray scale example and a non-gray scale example, an example list is generated, all examples comprise the new version example and an original version example, and all micro services obtain the gray scale identifiers of the examples in the micro service by calling the example list of the registration center;
the service gateway at the back end receives the flow, judges whether the flow accords with the gray strategy based on the gray strategy in the java agent of the service gateway, and if the flow accords with the gray strategy, the java agent of the service gateway marks the gray of the user corresponding to the flow;
and after judging whether the flow accords with the gray strategy or not, forwarding the flow by the service gateway based on the gray mark, continuing the next-hop service after the flow is forwarded, until the last instance returns a response result, and ending the session.
2. The method as claimed in claim 1, wherein the java agent rewrites the corresponding component class by class loading time to complete receiving the gray policy, determining whether the flow rate meets the gray policy, and performing gray marking.
3. The method for controlling non-intrusive application gray scale release according to claim 1, wherein the forwarding traffic based on gray scale marks specifically includes:
and if the java agent of the service gateway does not perform the gray marking on the user corresponding to the flow, forwarding the flow to the gray example of the required micro service, and if the java agent of the service gateway does not perform the gray marking on the user corresponding to the flow, forwarding the flow to the non-gray example of the required micro service.
4. The method as claimed in claim 3, wherein if the java agent of the service gateway marks the gray level of the user corresponding to the traffic and there is no gray level instance in the required micro service, the traffic is forwarded to the non-gray level instance of the required micro service.
5. A method for controlling non-intrusive application gray scale release as defined in claim 1, wherein the continuing next-hop service is specifically:
the needed micro service receives the flow, whether a user corresponding to the flow has a gray mark is judged based on a gray strategy in the java agent of the needed micro service, if yes, the flow is forwarded to a gray example of the micro service needed by the next hop, and if not, the flow is forwarded to a non-gray example of the micro service needed by the next hop.
6. The method according to claim 5, wherein if the user corresponding to the traffic has a gray label and there is no gray instance in the microservice required by the next hop, forwarding the traffic to the non-gray instance of the microservice required by the next hop.
7. The method for controlling gray scale distribution for non-intrusive application according to claim 1, further comprising: and the gray strategy management console sends the gray strategy and the new version example to the front-end agent, and the nginx is updated after the front-end agent receives the gray strategy and the new version example, so that the front-end gray strategy and the front-end new version example take effect.
8. A non-intrusive application gray scale release control method as defined in claim 7, wherein the nginx is deployed in a virtual machine and is responsible for static resource management and backend application load.
9. The method for controlling gray scale distribution for non-intrusive application according to claim 1, further comprising: the front end accesses the back end service to obtain the gray mark by carrying the token, and uses the corresponding static resource according to the mark.
10. The method as claimed in claim 1, wherein the java agent includes a traffic recording module for recording and playing back traffic.
CN202211267594.3A 2022-10-17 2022-10-17 Non-intrusive application gray scale release control method Pending CN115665230A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211267594.3A CN115665230A (en) 2022-10-17 2022-10-17 Non-intrusive application gray scale release control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211267594.3A CN115665230A (en) 2022-10-17 2022-10-17 Non-intrusive application gray scale release control method

Publications (1)

Publication Number Publication Date
CN115665230A true CN115665230A (en) 2023-01-31

Family

ID=84988327

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211267594.3A Pending CN115665230A (en) 2022-10-17 2022-10-17 Non-intrusive application gray scale release control method

Country Status (1)

Country Link
CN (1) CN115665230A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200065086A1 (en) * 2018-08-23 2020-02-27 Citrix Systems, Inc. Service Pool Architecture For Multitenant Services To Support Canary Release
WO2020140663A1 (en) * 2019-01-04 2020-07-09 深圳壹账通智能科技有限公司 Microservice grayscale publishing method, device, computer device and storage medium
CN112866333A (en) * 2020-12-28 2021-05-28 上海领健信息技术有限公司 Cloud-native-based micro-service scene optimization method, system, device and medium
CN113055492A (en) * 2021-03-25 2021-06-29 深圳云之家网络有限公司 Control method and device for service gray scale link, computer equipment and storage medium
WO2022037272A1 (en) * 2020-08-21 2022-02-24 烽火通信科技股份有限公司 Gray release method, apparatus and device, and readable storage medium
CN114237693A (en) * 2021-12-20 2022-03-25 中国平安财产保险股份有限公司 Gray scale publishing method, equipment and storage medium
CN114780512A (en) * 2022-03-22 2022-07-22 荣耀终端有限公司 Gray scale publishing method, system and server
CN114924751A (en) * 2022-05-05 2022-08-19 北京电解智科技有限公司 Method and device for distributing service access request flow

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20200065086A1 (en) * 2018-08-23 2020-02-27 Citrix Systems, Inc. Service Pool Architecture For Multitenant Services To Support Canary Release
WO2020140663A1 (en) * 2019-01-04 2020-07-09 深圳壹账通智能科技有限公司 Microservice grayscale publishing method, device, computer device and storage medium
WO2022037272A1 (en) * 2020-08-21 2022-02-24 烽火通信科技股份有限公司 Gray release method, apparatus and device, and readable storage medium
CN112866333A (en) * 2020-12-28 2021-05-28 上海领健信息技术有限公司 Cloud-native-based micro-service scene optimization method, system, device and medium
CN113055492A (en) * 2021-03-25 2021-06-29 深圳云之家网络有限公司 Control method and device for service gray scale link, computer equipment and storage medium
CN114237693A (en) * 2021-12-20 2022-03-25 中国平安财产保险股份有限公司 Gray scale publishing method, equipment and storage medium
CN114780512A (en) * 2022-03-22 2022-07-22 荣耀终端有限公司 Gray scale publishing method, system and server
CN114924751A (en) * 2022-05-05 2022-08-19 北京电解智科技有限公司 Method and device for distributing service access request flow

Similar Documents

Publication Publication Date Title
CN105763602B (en) A kind of method of data request processing, server and system
US9369938B2 (en) Subscriber identity module (SIM) for mobile stations
US8555271B2 (en) Method, software and apparatus for application upgrade during execution
CN107277153A (en) Method, device and server for providing voice service
CN111770511A (en) Measuring method, terminal equipment, network equipment and computer storage medium
CN110909373B (en) Access control method, equipment, system and storage medium
US20160132668A1 (en) Management apparatus, management method, and recording medium of management program
CN109995861B (en) Relay communication method and system for vehicle-mounted system application and vehicle-mounted peripheral device
CN114721719B (en) Method and system for containerized deployment of heterogeneous applications in cluster
EP4207707A1 (en) Data transmission system, data transmission method, smart vehicle and device
CN111897738B (en) Automatic testing method and device based on atomic service
CN112491948A (en) Non-invasive monomer application micro-service method and device and computer equipment
CN112667270B (en) Updating method of voice processing resource, computer equipment and storage device
CN115665230A (en) Non-intrusive application gray scale release control method
CN109451499A (en) A kind of method and apparatus connecting wireless access point
CN112752258B (en) eSIM card opening method, mobile phone terminal and service acceptance system
CN114006884B (en) Session control method, device and system in network address translation scene
CN114039930B (en) Data packet processing method and system
CN109522092A (en) A kind of cloud pipe platform receives pipe virtual machine method and apparatus
KR20230086561A (en) Application loaded with path change software, and method for changing audio stream output path of android audio system using the same
CN111698691B (en) 5G network capacity control method and device
CN114221883A (en) Message testing method, device, server and storage medium
US20060018331A1 (en) Inter-module communication apparatus
CN113973294A (en) Signaling processing method, network warehouse functional network element and communication system
CN105898828B (en) Network search method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination