CN117008951A - Node debugging method, device and storage medium - Google Patents

Node debugging method, device and storage medium Download PDF

Info

Publication number
CN117008951A
CN117008951A CN202310404755.7A CN202310404755A CN117008951A CN 117008951 A CN117008951 A CN 117008951A CN 202310404755 A CN202310404755 A CN 202310404755A CN 117008951 A CN117008951 A CN 117008951A
Authority
CN
China
Prior art keywords
node
target gray
target
service
gray
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
CN202310404755.7A
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.)
Foshan Viomi Electrical Technology Co Ltd
Original Assignee
Foshan Viomi Electrical Technology 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 Foshan Viomi Electrical Technology Co Ltd filed Critical Foshan Viomi Electrical Technology Co Ltd
Priority to CN202310404755.7A priority Critical patent/CN117008951A/en
Publication of CN117008951A publication Critical patent/CN117008951A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The application provides a node debugging method, a node debugging device and a storage medium. In the technical scheme of the application, before the new version service node of the micro service is in online operation, the electronic equipment issues a target gray node, and the target gray node is matched with the new version service node; then loading the normal flow of the electronic equipment into a target gray node for operation, wherein the normal flow is the flow of a user; finally, under the condition that the running result of the target normal flow in the target gray node is abnormal, the target gray node is debugged on line; the target gray level node is located in a gray level environment which is created in advance according to the current online production environment of the electronic equipment. In the method provided by the application, the target gray node is firstly released, and the target gray node with abnormality is debugged on line in the on-line production environment, so that the nodes are tested in the production environment, and the stability of the whole system after the new version service node is released is improved.

Description

Node debugging method, device and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a node debugging method, device and storage medium.
Background
With the development of computer technology, the use of micro services is becoming more and more widespread. Micro services are fine-grained, independent services that may include multiple nodes. In general, a micro service often needs to update a new version in the use process to better realize its function and meet the needs of users.
At present, when a service version is updated, a new version of node is released first, and the new version of node is put into use after updating. In the version updating process of the micro service, the node of the new version is usually released in a rolling release mode, however, the node test can only be carried out in a test environment under the normal condition of the rolling release mode, and the node test can not be carried out in a production environment; and after testing the node once based on the test flow, the node is identified as a node with a release new version, so that the test effect of the node is poor.
Therefore, how to test nodes in a production environment and improve the stability of the whole system after the release of new-version service nodes is a problem to be solved in the process of releasing the micro-service nodes.
Disclosure of Invention
The application provides a node debugging method, a node debugging device and a storage medium, which can realize the test of nodes in a production environment and improve the stability of an overall system after a new version service node is released.
In a first aspect, the present application provides a node debugging method, applied to an electronic device, the method comprising:
before a new version service node of the micro service is online operated, a target gray node is released, and the target gray node is matched with the new version service node;
loading the normal flow of the electronic equipment into the target gray node for operation, wherein the normal flow is the flow of a user;
under the condition that the operation result of the target normal flow in the target gray node is abnormal, the target gray node is debugged on line;
the target gray level node is located in a gray level environment, and the gray level environment is created in advance according to the current online production environment of the electronic equipment.
In the embodiment of the application, before the new version service node of the micro service is in online operation, the new version service node is released to match with the target gray node; then loading the normal flow of the electronic equipment into a target gray node for operation, wherein the normal flow is the flow of a user; and finally, under the condition that the running result of the target normal flow in the target gray node is abnormal, the target gray node is debugged on line. In the method, before the new version service node formally operates on line, the server firstly issues the target gray node, and then uses the flow of the user to test whether the target gray node is abnormal or not, so that on-line debugging is carried out on the abnormal target gray node in the on-line production environment under the condition that the target gray node is abnormal, and therefore the node can be tested in the production environment, and the stability of the whole system after the new version service node is issued can be improved.
In some embodiments, before the online commissioning of the target gray node, the method further comprises:
and cutting off other normal traffic loaded to the target gray node.
By implementing the embodiment, the interference of other flows to the node debugging process can be eliminated, and the debugging accuracy is improved.
In some embodiments, the micro service further includes an old version service node, and the cutting off other normal traffic loaded to the target gray node includes:
and switching the other normal traffic to the old version service node for operation.
By implementing the embodiment, the user in the switching process can be ensured to have no perception, and the user experience is improved.
In some embodiments, before the online commissioning of the target gray node, the method further comprises:
and maintaining the operation data of the target normal flow in the target gray node unchanged.
By implementing the embodiment, the function of reserving the operation site is realized by keeping the operation data of the target normal flow unchanged, so that the debugging can be performed based on the abnormal operation data during the later debugging, and the debugging accuracy is ensured.
In some embodiments, the online debugging the target gray node includes:
Loading a preset test flow to the target gray node;
and debugging the target gray node through the preset test flow.
By implementing the embodiment, the target gray node is debugged through the test flow, and the debugging process is more reliable in view of stability and knowledge of the test flow.
In some embodiments, the debugging the target gray node through the preset test flow includes:
debugging the target gray node according to the running data of the preset test flow in the target gray node; or alternatively, the first and second heat exchangers may be,
acquiring operation data of all service nodes corresponding to the micro-service call chain of the preset test flow, and debugging the target gray level node according to the operation data of all the service nodes, wherein all the service nodes comprise the target gray level node.
By implementing the embodiment, different online debugging methods are provided, the use scene is widened, and the debugging accuracy can be improved.
In some embodiments, the request information corresponding to the preset test flow includes a target gray tracking field, and the acquiring operation data of all service nodes corresponding to the micro service call chain of the preset test flow includes:
And acquiring target operation data comprising the target gray tracking field, wherein the target operation data is the operation data of all service nodes corresponding to the micro-service call chain of the preset test flow.
By implementing the embodiment, the method for searching the operation data can simply and rapidly acquire the operation data, so that subsequent debugging is convenient, and the debugging efficiency is improved.
In some embodiments, the electronic device further includes a gray node list, where the gray node list includes identifiers of all gray nodes included in the micro service and status information, and before the online debugging of the target gray node, the method further includes:
and updating the state information of the target gray node into an unavailable state in the gray node list.
By implementing the embodiment, the abnormal target gray node is updated to be unavailable, so that other normal traffic can be prevented from being loaded on the unavailable target gray node, and the running stability of the new version service node is improved.
In a second aspect, the present application provides a node debugging device, the device comprising:
the release module is used for releasing the target gray node before the new version service node of the micro service is in online operation, and the target gray node is matched with the new version service node;
The loading module is used for loading the normal flow of the electronic equipment into the target gray node for operation, wherein the normal flow is the flow of a user;
the debugging module is used for carrying out online debugging on the target gray node under the condition that the operation result of the target normal flow in the target gray node is abnormal;
the target gray level node is located in a gray level environment, and the gray level environment is created in advance according to the current online production environment of the electronic equipment.
In some embodiments, the apparatus further comprises a processing module for shutting off other normal traffic loaded to the target gray node.
In some embodiments, the micro service further includes an old version service node, and the processing module is specifically configured to switch the other normal traffic to the old version service node for running.
In some embodiments, the processing module is further configured to keep the operating data of the target normal traffic in the target gray node unchanged.
In some embodiments, the debugging module is specifically configured to load a preset test flow to the target gray node; and debugging the target gray node through the preset test flow.
In some embodiments, the device further includes an obtaining module, and the debugging module is specifically further configured to debug the target gray node according to the running data of the preset test flow at the target gray node; or the acquisition module is used for acquiring the operation data of all the service nodes corresponding to the micro-service call chains of the preset test flow; the debugging module is specifically further configured to debug the target gray node according to the operation data of all the service nodes, where all the service nodes include the target gray node.
In some embodiments, the request information corresponding to the preset test flow includes a target gray tracking field, and the obtaining module is specifically configured to obtain target operation data including the target gray tracking field, where the target operation data is operation data of all service nodes corresponding to a micro service call chain of the preset test flow.
In some embodiments, the electronic device further includes a gray node list including identifiers of all gray nodes included in the micro service and status information, and the apparatus further includes an updating module configured to update the status information of the target gray node to an unavailable state in the gray node list.
In a third aspect, the present application provides an electronic device comprising a processor and a memory for storing code instructions; the processor is configured to execute the code instructions to implement the method in the first aspect.
Optionally, the processor is one or more and the memory is one or more.
Alternatively, the memory may be integrated with the processor or the memory may be separate from the processor.
In a specific implementation process, the memory may be a non-transient (non-transitory) memory, for example, a Read Only Memory (ROM), which may be integrated on the same chip as the processor, or may be separately disposed on different chips.
In a fourth aspect, the present application provides a computer readable storage medium storing a computer program (which may also be referred to as code, or instructions) which, when run on a computer, causes the computer to perform the method of the first aspect described above.
In a fifth aspect, the present application provides a computer program product comprising: a computer program (which may also be referred to as code, or instructions) which, when executed, causes a computer to perform the method of the first aspect described above.
Drawings
FIG. 1 is a schematic diagram of an application scenario provided in one embodiment of the present application;
fig. 2 is a schematic diagram of another application scenario provided in an embodiment of the present application;
FIG. 3 is a flowchart of a method for node debugging according to an embodiment of the present application;
FIG. 4 is a flowchart of another node debugging method according to an embodiment of the present application;
FIG. 5 is a flowchart for debugging gray nodes according to an embodiment of the present application;
FIG. 6 is a flowchart of a node publishing method according to an embodiment of the present application;
FIG. 7 is a schematic diagram of a node debugging device according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a node debugging device according to another embodiment of the present application.
Detailed Description
The technical scheme of the application will be described below with reference to the accompanying drawings.
In order to clearly describe the technical solution of the embodiments of the present application, in the embodiments of the present application, the words "first", "second", etc. are used to distinguish the same item or similar items having substantially the same function and effect. For example, the first instruction and the second instruction are for distinguishing different user instructions, and the sequence of the instructions is not limited. It will be appreciated by those of skill in the art that the words "first," "second," and the like do not limit the amount and order of execution, and that the words "first," "second," and the like do not necessarily differ.
In the present application, the words "exemplary" or "such as" are used to mean serving as an example, instance, or illustration. Any embodiment or design described herein as "exemplary" or "for example" should not be construed as preferred or advantageous over other embodiments or designs. Rather, the use of words such as "exemplary" or "such as" is intended to present related concepts in a concrete fashion.
Furthermore, "at least one" means one or more, and "a plurality" means two or more. "and/or", describes an association relationship of an association object, and indicates that there may be three relationships, for example, a and/or B, and may indicate: a alone, a and B together, and B alone, wherein a, B may be singular or plural. The character "/" generally indicates that the context-dependent object is an "or" relationship. "at least one of" or the like means any combination of these items, including any combination of single item(s) or plural items(s). For example, at least one (one) of a, b, and c may represent: a, b, or c, or a and b, or a and c, or b and c, or a, b and c, wherein a, b and c can be single or multiple.
With the development of computer technology, the use of micro services is becoming more and more widespread. Micro services are an architectural style, i.e. an application should be a set of small services, each server is only responsible for one service, services can be interworked by means of hypertext transfer protocol (hyper text transfer protocol, HTTP), and each functional element is finally an independently replaceable and independently upgradeable software unit. In general, users today use various micro services on the internet, such as a micro-trusted information sharing service, a member user information query service of video software, etc., which generally need to be continuously updated to better implement functions and meet user requirements.
The micro service version update procedure in the related art will be described below. Taking the update of the micro service version on the server as an example, when the server obtains a request for releasing a new version service of one micro service, the server will obtain all the nodes included in the micro service, then take all the nodes included in the micro service off line, and then release the new version node to realize the update of the version of the micro service.
In the current version updating process of the micro service, the node of the new version is usually released in a rolling release mode, however, the node test can only be carried out in a test environment under the normal condition of the rolling release mode, and the node test can not be carried out in a production environment; and after testing the node once based on the test flow, the node is determined to be a node with a release new version, so that the test effect of the node is poor.
Therefore, how to implement testing in a production environment and improve the stability of the whole system after the release of the new version service node in the node release process of the micro service is a problem to be solved.
In view of the above, the embodiments of the present application provide a node debugging method, device and storage medium. In the embodiment of the application, before the new version service node of the micro service is in online operation, the new version service node is released to match with the target gray node; then loading the normal flow of the electronic equipment into a target gray node for operation, wherein the normal flow is the flow of a user; and finally, under the condition that the running result of the target normal flow in the target gray node is abnormal, the target gray node is debugged on line. In the method, a server firstly issues a target gray node before a new version service node formally runs online, and then uses the flow of a user to test whether the target gray node is abnormal or not, so that the abnormal target gray node is debugged online in an online production environment under the condition that the target gray node is abnormal, and the stability of the whole system after the new version service node is issued is ensured.
In order to make the purpose and technical scheme of the present application clearer and more intuitive, the method, the device and the storage medium provided by the embodiments of the present application will be described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are for purposes of illustration only and are not intended to limit the scope of the application.
Please refer to fig. 1, which is a schematic diagram illustrating an example of an application scenario provided in an embodiment of the present application. As shown in fig. 1, the application scenario 100 may include a terminal device 101 and a server 102, where the terminal device 101 and the server 102 may communicate over a network to implement version updating in the server 102.
Please refer to fig. 2, which is a schematic diagram illustrating another example of an application scenario provided in an embodiment of the present application. As shown in fig. 2, the application scenario 110 may include a terminal device 111, a platform server 112, and a back-end server 113, where the terminal device 111 communicates with the back-end server 113 through the platform server 112.
Here, the terminal device 101 or the terminal device 111 may be a mobile phone (mobile phone), a tablet computer, a notebook computer, a palm computer, a wearable device, a mobile internet device (mobile internet device, MID), a Virtual Reality (VR) device, a smart screen, an augmented reality (augmented reality, AR) device, an artificial intelligence (artificial intelligence, AI) sound, headphones, a terminal in industrial control (industrial control), a terminal in unmanned (self driving), a terminal in teleoperation (remote medical surgery), a terminal in smart grid (smart grid), a terminal in transportation security (transportation safety), a terminal in smart city (smart city), a terminal in smart home (smart home), a personal digital assistant (personal digital assistant, PDA), or the like, to which the embodiment of the present application is not limited.
The server 102 and the back-end server 113 may be implemented by a stand-alone server or a server cluster formed by a plurality of servers, which is not limited in the present application. The server 102 and the backend server 113 may be a centralized server or a distributed server, and are not limited thereto.
The node debugging method provided by the embodiment of the application is described in detail below in combination with an application scenario. Referring to fig. 3, a flowchart of an example of a node debugging method according to an embodiment of the present application is shown. The method may be applied to the server 102 shown in fig. 1, and may also be applied to the back-end server 113 shown in fig. 2, and for convenience of explanation, the following description will be given by taking the example that the method is applied to the server 102 shown in fig. 1, and the steps in the method shown in fig. 3 are as follows:
s301, before a new version service node of the micro service is online operated, a target gray node is released, and the target gray node is matched with the new version service node.
It should be understood that after receiving a new version service node online request of a micro service sent by a terminal device or other devices, a server may issue a target gray node before the new version service node is online, where the target gray node is matched with a new version service node to be issued, and may implement a related function of the new version service node.
The target gray node is matched with the service node of the new version to be released, and the target gray node which is available after each test can be determined to be the service node of the new version to be put into use; and the new version service node can be re-created based on the target gray nodes available after each test, and at least has all the functions of the target gray nodes.
In the embodiment of the present application, the specific number of the target gray scale nodes is not limited, for example, the target gray scale nodes may be one or more.
S302, loading the normal flow of the electronic equipment into a target gray node for operation, wherein the normal flow is the flow of a user.
In one possible embodiment, the server issues the target gray node before the new version service node of the micro service is run online, and tests the traffic carrying capacity of the target gray node based on the test traffic.
Further, in another possible embodiment, after determining that the traffic carrying capacity of the target gray node meets the condition, in order to further determine whether the target gray node can carry the traffic of the user, a real use environment is simulated, and the availability of the target gray node is determined using the normal traffic.
It should be appreciated that when testing whether traffic can run normally in the target gray node, it is based on normal traffic, i.e. using the traffic of the user.
It should be further understood that in the process of loading the normal traffic to the target gray node, whether the number of the target gray nodes is adjusted can be considered based on the number of the normal traffic, so as to better meet the test requirement.
S303, performing online debugging on the target gray node under the condition that the operation result of the target normal flow in the target gray node is abnormal.
It should be understood that when it is determined that the operation result of the target normal flow in the target gray node is abnormal, it may be determined that the target gray node cannot carry the normal use of the target normal flow, that is, the target gray node is not available, and at this time, online debugging is required for the target gray node.
It should be noted that, the target gray node is located in a gray environment, and the gray environment is created in advance according to the current online production environment of the electronic device. Based on this, in the embodiment of the present application, the target gray node is debugged in an on-line production environment. That is, there is no need to debug the target gray node additionally in the test environment, but on-line debugging can be realized.
In the embodiment, before the new version service node formally runs online, the server firstly issues the target gray node, and then uses the flow of the user to test whether the target gray node is abnormal or not, so that the abnormal target gray node is debugged online in an online production environment under the condition that the target gray node is abnormal, and the node can be tested in the production environment, and the stability of the whole system after the new version service node is issued can be improved.
Based on the above embodiments, fig. 4 is a flowchart of a node debugging method according to another embodiment of the present application, and a description of each step in the method shown in fig. 4 is as follows:
s401, before the new version service node of the micro service is online operated, a target gray node is released, and the target gray node is matched with the new version service node.
This step is similar to step S301 in the embodiment shown in fig. 3, and will not be described here again.
S402, loading the normal flow of the electronic equipment into the target gray node for operation, wherein the normal flow is the flow of the user.
This step is similar to step S302 in the embodiment shown in fig. 3, and will not be described here again.
S403, cutting off other normal flow loaded to the target gray node when the operation result of the target normal flow in the target gray node is abnormal.
It should be appreciated that when it is determined that the result of the operation of the target normal traffic in the target gray node is abnormal, it may be determined that the target gray node is not capable of carrying the normal use of the target normal flow, and thus other normal traffic loaded to the target gray node may be cut off. Therefore, on one hand, the interference of other flows to the node debugging process can be eliminated, and the debugging accuracy is improved; on the other hand, the normal use of other normal flow can be ensured.
It should be noted that, when the other normal traffic loaded to the target gray node is cut off, the other normal traffic that is already loaded to the target gray node but not yet running may be cut off, or the other normal traffic that is about to be loaded to the target gray node may be cut off.
In the embodiment of the present application, a specific manner of cutting off other normal traffic loaded to the target gray node is not limited. As in a possible embodiment, the other normal traffic loaded to the target gray node may be directly discarded to achieve the cut-off of the other normal traffic.
In another possible embodiment, the micro service further includes an old version service node, and the cutting off other normal traffic loaded to the target gray node may be performed by switching the other normal traffic to the old version service node.
By implementing the embodiment, the user in the switching process can be ensured to have no perception, and the user experience is improved.
S404, maintaining the operation data of the target normal flow in the target gray node unchanged.
It should be understood that, the operation data of the target normal flow in the target gray node is kept unchanged, that is, when the target normal flow operates in the target gray node, parameters such as the operation data and the abnormal result of operation are kept unchanged.
By implementing the embodiment, the function of reserving the operation site is realized by keeping the operation data of the target normal flow unchanged, so that the debugging can be performed based on the abnormal operation data during the later debugging, and the debugging accuracy is ensured.
S405, updating the state information of the target gray node to an unavailable state in the gray node list.
It should be appreciated that the electronic device also includes a gray node list that includes identification of all gray nodes included in the micro-service, as well as status information.
When the operation result of the target normal flow in the target gray node is abnormal, the state information of the target gray node in the gray node list can be updated to be in an unavailable state, so that the subsequent server can not continuously call other normal flows to the unavailable target gray node.
By implementing the embodiment, the abnormal target gray node is updated to be unavailable, so that other normal traffic can be prevented from being loaded on the unavailable target gray node, and the running stability of the new version service node is improved.
S406, loading a preset test flow to the target gray node, and debugging the target gray node through the preset test flow.
It should be appreciated that when debugging the target gray node, the target gray node may be debugged using a preset test flow. In view of the controllability and the known property of the test flow, the debugging result can be more stable and reliable, and the control can be realized.
In the embodiment of the application, a specific way for debugging the target gray node through the preset test flow is not limited.
In one possible implementation manner, the target gray node is debugged by using a preset test flow, which may be the running data of the target gray node by using the preset test flow.
It should be appreciated that in this embodiment, the target gray node is commissioned based only on the operational data of the preset test traffic on the target gray node.
In another possible implementation manner, the target gray node is debugged through a preset test flow, and the steps shown in fig. 5 may be performed:
s501, operation data of all service nodes corresponding to a micro-service call chain of a preset test flow are obtained.
It should be understood that in this embodiment, the target gray node is debugged based on the operation data of the preset test traffic on all the service nodes corresponding to the preset test traffic.
Therefore, how to obtain all service nodes corresponding to the preset test flow is a problem to be solved.
Based on this, in one possible implementation, the request information corresponding to the preset test flow includes the target gray tracking field. Based on this, step S501 may be implemented to obtain target operation data including a target gray tracking field, where the target operation data is operation data of all service nodes corresponding to a micro service call chain of a preset test flow.
Thus, by acquiring the target operation data including the target gray tracking field, it can be determined that the operation data of all the service nodes corresponding to the preset test flow has been acquired.
For ease of understanding, the following explanation is made. Since the micro service needs to issue the target gray node, the corresponding micro service needs to access the gray component and configure link tracking information, which is used for tracking gray information, for example, the link tracking information can be a tracking field.
Based on the difference of the tracking fields corresponding to different test flows, the operation data carrying the target gray tracking field corresponding to the preset test flow can be found out from all the operation data, and the operation data is used as target operation data.
Illustratively, in a micro-service architecture, the invocation of the interface is typically the service consumer selecting a service instance (i.e. a service node) according to some load balancing policy, but this cannot meet some routing logic more specialized on-line, such as routing the information in the request header carried by a request onto a certain service instance, thus creating a grey component architecture "Spring Cloud Gray" and configuring corresponding link tracking information in the grey component.
Several roles are defined in "Spring Cloud Gray", including gray-client (gray-client), gray-admin, and registry. Wherein the registry is responsible for registration and discovery of services; the gray client refers to a service relying on a gray routing policy (spring-closed-gray-client), and generally refers to a service consumer; the gray level control end is responsible for maintenance work such as management and persistence of gray level information.
Correspondingly, the relationship among the registration center, the gray client and the gray control end is shown in fig. 6, the gray client comprises a gray routing strategy, the gray client pulls a list of gray information from the gray control end, and maintains the gray list information in the memory, wherein the list comprises services, service examples, gray strategies, gray tracking fields and the like. The gray level control terminal can maintain the gray level state of the instance and the gray level strategy of the instance, and can send updated gray level information to the gray level client terminal, and the gray level client terminal can actively acquire the service-dependent gray level information from the gray level control terminal. The registry includes a service discovery component and a service registration component for performing discovery and registration of services, for example, the gray client registers services with the registry, and the gray management and control terminal registers services with the registry and obtains instance information of all services.
When the request reaches the gateway, the gateway records the information to be transmitted thoroughly according to the configured link tracking information in the gray tracking of the gray client, and transmits the information to the forwarded service instance, and the following interface call also transmits the tracking information thoroughly according to the same logic, so that the gray routing of all the requests in the micro-service call chain is ensured.
Note that one target gray node corresponds to one example.
By implementing the embodiment, the method for searching the operation data can simply and rapidly acquire the operation data, so that subsequent debugging is convenient, and the debugging efficiency is improved.
S502, debugging is carried out on the target gray level nodes according to the operation data of all the service nodes, wherein all the service nodes comprise the target gray level nodes.
It should be understood that all the service nodes may be all the nodes including each gray node and each old version service node, or may be all the nodes including only each gray node, which is not limited by the embodiment of the present application.
By implementing the embodiment, the target gray level node can be debugged together by integrating the operation data on all the service nodes corresponding to the preset test flow, so that the debugging accuracy can be improved.
By implementing the embodiment, different online debugging methods can be provided, the use scene is widened, and the debugging accuracy can be improved.
In the embodiment, before the new version service node is formally operated on line, the server firstly issues the target gray node, and then uses normal flow to test whether the target gray node is abnormal or not, so that on-line debugging is timely carried out on the abnormal target gray node in an on-line production environment under the condition that the target gray node is abnormal, the nodes can be tested in the production environment in time before the new version service node is issued, and the stability of the whole system after the new version service node is issued is improved.
It should also be understood that the foregoing embodiments may be coupled to one another, and the application is not limited in this regard. The sequence numbers of the above processes do not mean the sequence of the execution sequence, and the execution sequence of each process should be determined according to the functions and the internal logic, and should not limit the implementation process of the embodiment of the present application.
The node debugging method according to the embodiment of the present application is described in detail above with reference to fig. 1 to 6, and the device according to the embodiment of the present application will be described in detail below with reference to fig. 7 and 8.
Fig. 7 is a schematic structural diagram of a node debugging device 700 according to an embodiment of the present application, where the device 700 includes: a publishing module 701, a loading module 802 and a debugging module 703.
The release module 701 is configured to release a target gray node before a new version service node of the micro service is online run, where the target gray node is matched with the new version service node; a loading module 802, configured to load a normal flow of the electronic device into the target gray node for running, where the normal flow is a flow of a user; a debugging module 703, configured to debug the target gray node online in case that an operation result of the target normal traffic in the target gray node is abnormal; the target gray level node is located in a gray level environment, and the gray level environment is created in advance according to the current online production environment of the electronic equipment.
In some embodiments, the apparatus further comprises a processing module for shutting off other normal traffic loaded to the target gray node.
In some embodiments, the micro service further includes an old version service node, and the processing module is specifically configured to switch the other normal traffic to the old version service node for running.
In some embodiments, the processing module is further configured to keep the operating data of the target normal traffic in the target gray node unchanged.
In some embodiments, the debugging module is specifically configured to load a preset test flow to the target gray node; and debugging the target gray node through the preset test flow.
In some embodiments, the device further includes an obtaining module, and the debugging module is specifically further configured to debug the target gray node according to the running data of the preset test flow at the target gray node; or the acquisition module is used for acquiring the operation data of all the service nodes corresponding to the micro-service call chains of the preset test flow; the debugging module is specifically further configured to debug the target gray node according to the operation data of all the service nodes, where all the service nodes include the target gray node.
In some embodiments, the request information corresponding to the preset test flow includes a target gray tracking field, and the obtaining module is specifically configured to obtain target operation data including the target gray tracking field, where the target operation data is operation data of all service nodes corresponding to a micro service call chain of the preset test flow.
In some embodiments, the electronic device further includes a gray node list including identifiers of all gray nodes included in the micro service and status information, and the apparatus further includes an updating module configured to update the status information of the target gray node to an unavailable state in the gray node list.
It should be appreciated that the apparatus 700 herein is embodied in the form of functional modules. The term module herein may refer to an application specific integrated circuit (application specific integrated circuit, ASIC), an electronic circuit, a processor (e.g., a shared, dedicated, or group processor, etc.) and memory that execute one or more software or firmware programs, a combinational logic circuit, and/or other suitable components that support the described functionality. In an alternative example, it will be understood by those skilled in the art that the apparatus 700 may be specifically an electronic device in the foregoing embodiment, or the functions of the electronic device in the foregoing embodiment may be integrated in the apparatus 700, and the apparatus 700 may be used to execute each flow and/or step corresponding to the electronic device in the foregoing method embodiment, which is not repeated herein.
The apparatus 700 has functions of implementing corresponding steps executed by the electronic device in the method; the above functions may be implemented by hardware, or may be implemented by hardware executing corresponding software. The hardware or software includes one or more modules corresponding to the functions described above.
Fig. 8 is a schematic structural diagram of a node debugging device according to another embodiment of the present application. The node commissioning apparatus shown in fig. 7 may be used to perform the method of any of the previous embodiments.
As shown in fig. 8, the apparatus 800 of the present embodiment includes: a memory 801, a processor 802, a communication interface 803, and a bus 804. Wherein the memory 801, the processor 802, and the communication interface 803 are communicatively connected to each other through a bus 804.
Wherein the processor 802 is configured to: before a new version service node of the micro service is online operated, a target gray node is released, and the target gray node is matched with the new version service node; loading the normal flow of the electronic equipment into the target gray node for operation, wherein the normal flow is the flow of a user; under the condition that the operation result of the target normal flow in the target gray node is abnormal, the target gray node is debugged on line; the target gray level node is located in a gray level environment, and the gray level environment is created in advance according to the current online production environment of the electronic equipment.
In some embodiments, the processor 802 is to: and cutting off other normal traffic loaded to the target gray node.
In some embodiments, the processor 802 is to: and switching the other normal traffic to the old version service node for operation.
In some embodiments, the processor 802 is to: and maintaining the operation data of the target normal flow in the target gray node unchanged.
In some embodiments, the processor 802 is to: loading a preset test flow to the target gray node; and debugging the target gray node through the preset test flow.
In some embodiments, the processor 802 is to: debugging the target gray node according to the running data of the preset test flow in the target gray node; or acquiring operation data of all service nodes corresponding to the micro service call chain of the preset test flow, and debugging the target gray level node according to the operation data of all the service nodes, wherein all the service nodes comprise the target gray level node.
In some embodiments, the processor 802 is to: and acquiring target operation data comprising a target gray tracking field, wherein the target operation data is the operation data of all service nodes corresponding to the micro-service call chain of the preset test flow.
In some embodiments, the processor 802 is to: and updating the state information of the target gray node into an unavailable state in a gray node list.
The memory 801 may be a Read Only Memory (ROM), a static storage device, a dynamic storage device, or a random access memory (random access memory, RAM). The memory 801 may store a program, and when the program stored in the memory 801 is executed by the processor 802, the processor 802 is configured to perform the steps of the method shown in the above-described embodiment.
The processor 802 may employ a general-purpose central processing unit (central processing unit, CPU), microprocessor, application specific integrated circuit (application specific integrated circuit, ASIC), or one or more integrated circuits for executing associated programs to perform the various methods illustrated in embodiments of the application.
The processor 802 may also be an integrated circuit chip with signal processing capabilities. In implementation, various steps of methods of embodiments of the present application may be performed by integrated logic circuitry in hardware or by instructions in software in processor 802.
The processor 802 may also be a general purpose processor, a digital signal processor (digital signal processing, DSP), an ASIC, an off-the-shelf programmable gate array (field programmable gate array, FPGA) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The methods, steps and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The steps of the method disclosed in connection with the embodiments of the present application may be embodied directly in the execution of a hardware decoding processor, or in the execution of a combination of hardware and software modules in a decoding processor. The software modules may be located in a random access memory, flash memory, read only memory, programmable read only memory, or electrically erasable programmable memory, registers, etc. as well known in the art. The storage medium is located in the memory 801 and the processor 802 reads the information in the memory 801 and in combination with its hardware performs the functions that the unit comprised by the device of the application needs to perform.
Communication interface 803 may enable communication between apparatus 800 and other devices or communication networks using, but is not limited to, a transceiver-like transceiver.
Bus 804 may include a path for transferring information between components of apparatus 800 (e.g., memory 801, processor 802, communication interface 803).
It should be understood that the apparatus 800 shown in the embodiment of the present application may be an electronic device, or may be a chip configured in an electronic device.
It should be understood that, in various embodiments of the present application, the sequence numbers of the foregoing processes do not mean the order of execution, and the order of execution of the processes should be determined by the functions and internal logic thereof, and should not constitute any limitation on the implementation process of the embodiments of the present application.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described systems, apparatuses and units may refer to corresponding procedures in the foregoing method embodiments, and are not repeated herein.
In the several embodiments provided by the present application, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. For example, the apparatus embodiments described above are merely illustrative, e.g., the division of the units is merely a logical function division, and there may be additional divisions when actually implemented, e.g., multiple units or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, which may be in electrical, mechanical or other form.
The units described as separate units may or may not be physically separate, and units shown as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application may be embodied essentially or in a part contributing to the prior art or in a part of the technical solution, in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a server, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a read-only memory (ROM), a random access memory (random access memory, RAM), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing is merely illustrative of the present application, and the present application is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims (11)

1. A node commissioning method, applied to an electronic device, the method comprising:
before a new version service node of the micro service is online operated, a target gray node is released, and the target gray node is matched with the new version service node;
loading the normal flow of the electronic equipment into the target gray node for operation, wherein the normal flow is the flow of a user;
under the condition that the operation result of the target normal flow in the target gray node is abnormal, the target gray node is debugged on line;
the target gray level node is located in a gray level environment, and the gray level environment is created in advance according to the current online production environment of the electronic equipment.
2. The method of claim 1, wherein prior to said online commissioning of said target gray node, said method further comprises:
And cutting off other normal traffic loaded to the target gray node.
3. The method of claim 2, wherein the micro-service further comprises an old version service node, and wherein the cutting off other normal traffic loaded to the target gray node comprises:
and switching the other normal traffic to the old version service node for operation.
4. The method of claim 1, wherein prior to said online commissioning of said target gray node, said method further comprises:
and maintaining the operation data of the target normal flow in the target gray node unchanged.
5. The method according to any one of claims 1-4, wherein the online commissioning of the target gray node comprises:
loading a preset test flow to the target gray node;
and debugging the target gray node through the preset test flow.
6. The method of claim 5, wherein the debugging the target gray node through the preset test traffic comprises:
debugging the target gray node according to the running data of the preset test flow in the target gray node; or alternatively, the first and second heat exchangers may be,
Acquiring operation data of all service nodes corresponding to the micro-service call chain of the preset test flow, and debugging the target gray level node according to the operation data of all the service nodes, wherein all the service nodes comprise the target gray level node.
7. The method according to claim 6, wherein the request information corresponding to the preset test flow includes a target gray tracking field, and the acquiring operation data of all service nodes corresponding to the micro service call chain of the preset test flow includes:
and acquiring target operation data comprising the target gray tracking field, wherein the target operation data is the operation data of all service nodes corresponding to the micro-service call chain of the preset test flow.
8. The method of claim 1, wherein the electronic device further comprises a gray node list, the gray node list including identification and status information of all gray nodes included in the micro service, and wherein prior to the online commissioning of the target gray node, the method further comprises:
and updating the state information of the target gray node into an unavailable state in the gray node list.
9. A node debugging apparatus, the apparatus comprising:
the release module is used for releasing the target gray node before the new version service node of the micro service is in online operation, and the target gray node is matched with the new version service node;
the loading module is used for loading the normal flow of the electronic equipment into the target gray node for operation, wherein the normal flow is the flow of a user;
the debugging module is used for carrying out online debugging on the target gray node under the condition that the operation result of the target normal flow in the target gray node is abnormal;
the target gray level node is located in a gray level environment, and the gray level environment is created in advance according to the current online production environment of the electronic equipment.
10. A computer device comprising a processor and a memory for storing code instructions; the processor is configured to execute the code instructions to perform the method of any one of claims 1 to 8.
11. A computer readable storage medium storing a computer program comprising instructions for implementing the method of any one of claims 1 to 8.
CN202310404755.7A 2023-04-14 2023-04-14 Node debugging method, device and storage medium Pending CN117008951A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310404755.7A CN117008951A (en) 2023-04-14 2023-04-14 Node debugging method, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310404755.7A CN117008951A (en) 2023-04-14 2023-04-14 Node debugging method, device and storage medium

Publications (1)

Publication Number Publication Date
CN117008951A true CN117008951A (en) 2023-11-07

Family

ID=88566205

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310404755.7A Pending CN117008951A (en) 2023-04-14 2023-04-14 Node debugging method, device and storage medium

Country Status (1)

Country Link
CN (1) CN117008951A (en)

Similar Documents

Publication Publication Date Title
EP3353952B1 (en) Managing groups of servers
GB2407887A (en) Automatically modifying fail-over configuration of back-up devices
CN106911648B (en) Environment isolation method and equipment
CN108696581A (en) Caching method, device, computer equipment and the storage medium of distributed information
CN106605213B (en) System for supporting with intermittent connectivity, corresponding local device and corresponding cloud computing platform
CN112685287B (en) Product data testing method and device, storage medium and electronic device
CN111683139A (en) Method and apparatus for balancing load
CN104283780A (en) Method and device for establishing data transmission route
CN112671914B (en) IOT (Internet of things) equipment communication method and system based on actor model
US8520503B2 (en) Supporting application effectiveness in a network environment
CN105049463A (en) Distributed database, method of sharing data, and apparatus for a distributed database
US11595471B1 (en) Method and system for electing a master in a cloud based distributed system using a serverless framework
CN117008951A (en) Node debugging method, device and storage medium
CN114615320B (en) Service management method, device, electronic equipment and computer readable storage medium
CN104426704A (en) Integration network device and service integration method thereof
EP3719646B1 (en) Method for communicating in a network-distributed process control system and network-distributed process control system
KR20150088462A (en) Method for linking network device in cloud environment and apparatus therefor
CN114938396A (en) Routing method of service call request, method and device for creating service
US20170286181A1 (en) Deployment and execution of sensing and computational tasks in a network of computing devices
CN107743079A (en) Line sniffing method, equipment and computer-readable recording medium
CN107743152B (en) High-availability implementation method for load balancer in OpenStack cloud platform
US20070294573A1 (en) Method and system for improving the availability of software processes utilizing configurable finite state tables
CN116466985A (en) Node release method, device and storage medium
CN101170544A (en) A communication method in high-availability cluster system based on single practical IP address
CN112688984A (en) Method, device and medium for issuing and executing instruction to network node

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