CN107391156B - Method, management node and service node for distributed system transmission service - Google Patents

Method, management node and service node for distributed system transmission service Download PDF

Info

Publication number
CN107391156B
CN107391156B CN201710642637.4A CN201710642637A CN107391156B CN 107391156 B CN107391156 B CN 107391156B CN 201710642637 A CN201710642637 A CN 201710642637A CN 107391156 B CN107391156 B CN 107391156B
Authority
CN
China
Prior art keywords
node
software
service
service node
message
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.)
Active
Application number
CN201710642637.4A
Other languages
Chinese (zh)
Other versions
CN107391156A (en
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.)
Chengdu Huawei Technology Co Ltd
Original Assignee
Chengdu Huawei 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 Chengdu Huawei Technology Co Ltd filed Critical Chengdu Huawei Technology Co Ltd
Priority to CN201710642637.4A priority Critical patent/CN107391156B/en
Publication of CN107391156A publication Critical patent/CN107391156A/en
Application granted granted Critical
Publication of CN107391156B publication Critical patent/CN107391156B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/465Distributed object oriented systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5083Techniques for rebalancing the load in a distributed system

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer And Data Communications (AREA)
  • Stored Programmes (AREA)

Abstract

The application provides a method, a management node and a service node for transmitting service in a distributed system. The distributed system comprises a management node and at least one service node, and the method comprises the following steps: sending a first message to a first service node of at least one service node, wherein the first message is used for informing the first service node of updating software; receiving a second message sent by the first service node, where the second message is used to indicate that the first service node has successfully updated the software, and the second message carries a version identifier of the software; acquiring the version identification of the software, and determining the number of service nodes which have successfully updated the software in at least one service node according to the version identification of the software; and determining to perform service switching under the condition that the number of the service nodes which successfully update the software meets a preset value, so that the problem of software updating in the service nodes can be solved, and the service cannot be interrupted in the updating process.

Description

Method, management node and service node for distributed system transmission service
Technical Field
The present application relates to the field of computer technology, and more particularly, to a method, a management node, and a service node for transmitting traffic in a distributed system.
Background
A Distributed System (Distributed System) is composed of a plurality of nodes, and provides services to the outside through a Front-end Network (FN) as a whole. All nodes in the system are connected through a Back-end Network (BN). The following functional nodes are typically included in the system: load Balance Node (LBN), Service Node (SN), and Cluster Management Node (CMN). Each functional node is a logical node. The service node is responsible for handling traffic. When a service node in a system needs software upgrade, two methods are generally adopted: offline upgrade and online upgrade.
For offline upgrade, all service nodes need to be restarted, and each service node is upgraded, so that service interruption can be caused. For online upgrade, the problem of coexistence of new and old versions exists in the upgrade process, and because the compatibility requirement of the new and old versions is extremely high, the compatibility is difficult to be realized completely in practice, and online upgrade cannot be performed. Based on this, a method for solving the problem of upgrading the service node needs to be provided.
Disclosure of Invention
The application provides a method, a management node, a service node and a load balancing node for transmitting services in a distributed system, which can solve the problem of software updating in the service node and can not interrupt the services in the updating process.
In a first aspect, a method for transmitting traffic in a distributed system is provided, where the distributed system includes a management node and at least one service node, and the method is performed by the management node, and the method includes:
sending a first message to a first service node of the at least one service node, the first message being used to inform the first service node of updating software;
receiving a second message sent by the first service node, where the second message is used to indicate that the first service node has successfully updated the software, and the second message carries a version identifier of the software;
acquiring the version identification of the software, and determining the number of service nodes which have successfully updated the software in the at least one service node according to the version identification of the software;
and determining to perform service switching under the condition that the number of the service nodes which have successfully updated the software meets a preset value.
In the embodiment of the application, a management node receives a second message sent by a first service node, wherein the second message is used for indicating that the first service node has successfully updated software, the second message carries a version identifier of the software, and then the management node determines the number of service nodes in the at least one service node, which have successfully updated the software, according to the version identifier of the software; and determining to perform service switching under the condition that the number of the service nodes which have successfully updated the software meets a preset value, wherein the compatibility requirement on the service nodes before and after updating is low, and the service is not interrupted in the updating process.
In an embodiment of the present application, updating software may include: software upgrade or upgrade rollback. The software upgrading refers to the upgrading of software from a low version to a high version; software rollback refers to the rollback of software from a high version to a low version.
In some possible implementations, determining, according to the version identifier of the software, a number of service nodes that have successfully updated the software in the at least one service node includes:
detecting the version identification of the software corresponding to each service node in the at least one service node to obtain the service node of the at least one service node, wherein the software is successfully updated;
and counting the number of the service nodes which have successfully updated the software.
In some possible implementations, when determining to perform service handover, the method further includes:
enabling the service nodes which have successfully updated the software, and stopping the service nodes which have not successfully updated the software in the at least one service node.
In the embodiment of the application, the management node determines whether to perform service switching by judging whether the number of service nodes in at least one service node, in which the software has been successfully updated, satisfies a preset value. Therefore, not only can the online updating of the service node be ensured, but also the service can be ensured to be transmitted only on the service node with the same version number, so that the service on the service node which successfully updates the software and the service node which does not successfully update the software cannot be interacted, namely, the service is only concentrated on the service node which successfully updates the software or is only concentrated on the service node which does not successfully update the software.
In some possible implementations, the distributed system further includes a load balancing node, wherein the enabling the service node that successfully updates the software and stopping the service node that does not successfully update the software in the at least one service node includes:
sending a switching request to the load balancing node, wherein the switching request is used for indicating the load balancing node to enable the service node which successfully updates the software and stop the service node which does not successfully update the software in the at least one service node, so that the load balancing node sends a third message to the first service node, and the third message is used for indicating to enable the first service node;
the method further comprises the following steps:
receiving a switching response message sent by the load balancing node, wherein the switching response message is used for notifying that service switching is successful;
and updating the service node which does not successfully update the software in the at least one service node according to the switching response message.
That is, when determining to perform the service switching, the management node may directly enable the service node that has successfully updated the software and stop the service node that has not successfully updated the software. Alternatively, the management node may instruct the load balancing node to perform the service switching, which is not limited herein.
In some possible implementations, before sending the first message to the first serving node of the at least one serving node, the method further includes:
sending a request message to the load balancing node, wherein the request message is used for informing the load balancing node to stop the first service node;
and receiving a request response message sent by the load node, wherein the request response message indicates that the load balancing node has successfully stopped the first service node.
Optionally, before updating the software of the first service node, the management node may also directly stop the first service node.
In some possible implementation manners, determining to perform service switching when the number of the service nodes that have successfully updated the software satisfies a preset value includes:
and when the number of the service nodes which have successfully updated the software is larger than the number of the service nodes which have not successfully updated the software in the at least one service node, determining to perform service switching.
Optionally, the preset value may be set as required.
In some possible implementations, after sending the first message to the first serving node of the at least one serving node, the method further includes:
uploading an update package of the software in the first service node, the update package for the first service node to update the software using the update package.
In a second aspect, a method for transmitting traffic in a distributed system, the distributed system including a management node and at least one service node, the method being performed by a first service node of the at least one service node, the method comprising:
receiving a first message sent by the management node, wherein the first message is used for informing the first service node of updating software;
and updating the software according to the first message, and sending a second message to the management node after successful update, wherein the second message is used for indicating that the first service node has successfully updated the software, and the second message carries the version identifier of the software, so that the management node determines the number of service nodes in the at least one service node, which have successfully updated the software, according to the version identifier of the software.
In the embodiment of the application, a first service node sends a second message to a management node, where the second message is used to indicate that the first service node has successfully updated software, and the second message carries a version identifier of the software, so that the management node determines, according to the version identifier of the software, the number of service nodes in at least one service node that have successfully updated the software, and determines to perform service switching when the number of service nodes that have successfully updated the software satisfies a preset value, the compatibility requirement on the service nodes before and after updating is low, and the service is not interrupted during the updating process.
In an embodiment of the present application, updating software may include: software upgrade or upgrade rollback. The software upgrading refers to the upgrading of software from a low version to a high version; software rollback refers to the rollback of software from a high version to a low version.
Optionally, before receiving the first message sent by the management node, the service on the first service node is deactivated. The management node may directly deactivate the traffic on the first service node, or may instruct the load balancing node to deactivate the first service node.
In some possible implementations, in a case that the number of service nodes that have successfully updated the software in the at least one service node satisfies a preset value, the distributed system further includes a load balancing node, and the method further includes:
receiving a third message sent by the load balancing node, wherein the third message is used for indicating that the first service node is enabled;
and carrying out service transmission according to the third message.
In some possible implementations, the method further includes:
acquiring an update package of the software;
wherein the updating the software according to the first message comprises:
updating software using the update package in accordance with the first message.
In a third aspect, a method for transmitting traffic in a distributed system including a management node, at least one service node, and a load balancing node is provided, the method being performed by the load balancing node, and the method including:
receiving a switching request sent by the management node, wherein the switching request is used for indicating the load balancing node to start a service node of the at least one service node, the software of which is successfully updated, and stop a service node of the at least one service node, the software of which is not successfully updated;
enabling the service node which successfully updates the software in the at least one service node according to the switching request, and stopping the service node which does not successfully update the software in the at least one service node;
and sending a switching response message to the management node, wherein the switching response message is used for notifying that service switching is successful, so that the management node updates the service node which does not successfully update the software in the at least one service node according to the switching response message.
In this embodiment of the present application, the load balancing node enables the service node, which has successfully updated the software, in the at least one service node according to the handover request sent by the management node, and stops the service node, which has not successfully updated the software, in the at least one service node, so that it can be ensured that services are transmitted only on the service nodes with the same version number, and services on the service node, which has successfully updated the software, and the service node, which has not successfully updated the software are not interacted with each other, that is, services are only concentrated on the service node, which has successfully updated the software, or are only concentrated on the service node, which has not successfully updated the software.
In some possible implementations, before receiving the handover request sent by the management node, the method further includes:
receiving a request message sent by the management node, wherein the request message is used for informing the load balancing node to stop a first service node in the at least one service node;
and stopping the first service node according to the request message, and sending a request response message to the management node, wherein the request response message indicates that the load balancing node has successfully stopped the first service node.
That is, if the software of the first service node needs to be updated, the load balancing node may receive the request message of the management node, and stop the service on the first service node.
In some possible implementations, after receiving the handover request sent by the management node, the method further includes:
sending a third message to the first service node, the third message indicating that the first service node is enabled.
In a fourth aspect, a management node in a distributed system is provided, configured to perform the method in the first aspect or any possible implementation manner of the first aspect. In particular, the management node comprises means for performing the method of the first aspect or any possible implementation manner of the first aspect.
In a fifth aspect, a service node in a distributed system is provided, configured to perform the method in the second aspect or any possible implementation manner of the second aspect. In particular, the service node comprises means for performing the method of the second aspect described above or any possible implementation manner of the second aspect.
A sixth aspect provides a load balancing node in a distributed system, configured to perform the method in the third aspect or any possible implementation manner of the third aspect. In particular, the load balancing node comprises means for performing the method of the third aspect or any possible implementation manner of the third aspect.
In a seventh aspect, a management node in a distributed system is provided. The management node includes a processor, a memory, and a communication interface. The processor is coupled to the memory and the communication interface. The memory is for storing instructions, the processor is for executing the instructions, and the communication interface is for communicating with other network elements under control of the processor. The processor, when executing the instructions stored by the memory, causes the processor to perform the method of the first aspect or any possible implementation of the first aspect.
In an eighth aspect, a service node in a distributed system is provided. The service node includes a processor, a memory, and a communication interface. The processor is coupled to the memory and the communication interface. The memory is for storing instructions, the processor is for executing the instructions, and the communication interface is for communicating with other network elements under control of the processor. The processor, when executing the instructions stored by the memory, causes the processor to perform the second aspect or the method of any possible implementation of the second aspect.
In a ninth aspect, a load balancing node in a distributed system is provided. The load balancing node includes a processor, a memory, and a communication interface. The processor is coupled to the memory and the communication interface. The memory is for storing instructions, the processor is for executing the instructions, and the communication interface is for communicating with other network elements under control of the processor. The processor, when executing the instructions stored by the memory, causes the processor to perform the third aspect or the method of any possible implementation of the third aspect.
In a tenth aspect, there is provided a computer-readable storage medium storing a program for causing a management node to execute the first aspect described above, and any one of its various implementations, for a method for transmitting traffic in a distributed system.
In an eleventh aspect, there is provided a computer-readable storage medium storing a program for causing a service node to execute the second aspect described above, and any of its various implementations, for a method of transmitting traffic in a distributed system.
In a twelfth aspect, there is provided a computer-readable storage medium storing a program for causing a load balancing node to execute the third aspect, and any of its various implementations, for a method for transmitting traffic in a distributed system.
In a thirteenth aspect, the present application provides a computer program product comprising instructions for causing a computer to perform the method of the first aspect or any of the possible implementations of the first aspect when the computer program product runs on a computer.
In a fourteenth aspect, the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the second aspect or any one of the possible implementations of the second aspect.
In a fifteenth aspect, the present application provides a computer program product comprising instructions which, when run on a computer, cause the computer to perform the method of the third aspect or any of the possible implementations of the third aspect.
Drawings
FIG. 1 is a schematic diagram of a distributed system to which embodiments of the present application are applied.
Fig. 2 is a schematic interaction diagram of a method for transmitting traffic in a distributed system according to an embodiment of the present application.
Fig. 3 is a schematic interaction diagram of a method for transmitting traffic for a distributed system according to another embodiment of the present application.
FIG. 4 is a schematic diagram of an example according to an embodiment of the present application.
FIG. 5 is a schematic diagram of another example according to an embodiment of the present application.
Fig. 6 is a schematic interaction diagram of yet another example according to an embodiment of the present application.
Fig. 7 is a schematic interaction diagram of another example according to an embodiment of the present application.
Fig. 8 is a schematic block diagram of a management node in a distributed system according to an embodiment of the present application.
FIG. 9 is a schematic block diagram of a service node in a distributed system according to an embodiment of the present application.
Fig. 10 is a schematic block diagram of a load balancing node in a distributed system according to an embodiment of the present application.
Fig. 11 is a block diagram of a management node in a distributed system according to an embodiment of the present application.
Fig. 12 is a block diagram of a service node in a distributed system according to an embodiment of the present application.
Fig. 13 is a block diagram of a structure of a load balancing node in a distributed system according to an embodiment of the present application.
Detailed Description
The technical solution in the present application will be described below with reference to the accompanying drawings.
The technical scheme of the embodiment of the application can be applied to a Distributed System (Distributed System) or a cluster System. Fig. 1 shows a schematic diagram of a distributed system to which embodiments of the present application are applied. As shown in fig. 1, the distributed system includes the following functional nodes: a Load Balance Node (LBN) 10, a Service Node (SN) 11, and a Cluster Management Node (CMN) 12. The load balancing node 10 is responsible for distributing the traffic of the client 13 to each service node 11, so as to achieve the purpose of load balancing. Each service node 11 is responsible for handling traffic. The cluster management node 12 is responsible for registration, management, upgrade and other functions of each node.
Optionally, the Distributed system may not have the load balancing node 10 in specific implementation, and performs load balancing through an algorithm, such as a Distributed Hash Table (DHT) algorithm.
It should be understood that each node is a logical node, and may be located on the same physical machine during actual deployment or may be separately deployed, which is not limited to this.
It should also be understood that fig. 1 is schematically illustrated by taking 4 serving nodes 11 as an example, and does not limit the number of serving nodes 11.
It should be further understood that fig. 1 is only an exemplary diagram of a scenario in which the embodiment of the present application may be applied, and does not limit the embodiment of the present application.
Fig. 2 shows a schematic interaction diagram of a method 200 for transmitting traffic for a distributed system according to an embodiment of the application. The distributed system includes a management node and at least one service node. For example, the management node may be the cluster management node 12 in fig. 1, and the at least one service node may be the service node 11 in fig. 1. As shown in fig. 2, the method 200 includes:
s201, a management node sends a first message to a first service node in the at least one service node, wherein the first message is used for informing the first service node of updating software;
in an embodiment of the present application, updating software may include: software upgrade or upgrade rollback. Wherein, the software upgrading refers to the upgrading of software from a low Version (Version) to a high Version; software rollback refers to the rollback of software from a high version to a low version.
It should be understood that "update software" in the embodiment of the present application is not limited to software update on a service node, and may also be update on a certain software module, which is not limited to this.
Optionally, the management node may upload an update package (e.g., an upgrade package) in the first service node, where the update package is used by the first service node to update the software, where the update package may be understood as a software package required by the service node to perform a program update.
Correspondingly, the first service node executes an update command after receiving the first message, and updates by adopting the update package.
Alternatively, the first message may be an instruction or a program, and may be implemented by those skilled in the art using a programming language. For example, the first message is an upgrade instruction.
Optionally, the first service node may represent a service node to be updated in the at least one service node. The first serving node may represent one or more serving nodes. That is, the management node may send an update instruction to a plurality of service nodes that have not successfully updated the software, and upload an update package.
Optionally, before S201, the method 200 further includes:
the management node sends a stop message to the first service node, the stop message being used to stop the first service node.
Or, optionally, the distributed system further includes a load balancing node (for example, the load balancing node may be the load balancing node 10 in fig. 1), and before S201, the method 200 further includes:
a management node sends a request message to the load balancing node, wherein the request message is used for informing the load balancing node to stop the first service node from carrying out service transmission;
the load balancing node sends a request response message to the management node, wherein the request response message indicates that the load balancing node has successfully stopped traffic transmission on the first service node.
That is, when the first service node performs software update, the service on the first service node needs to be stopped. The management node may directly stop the first service node, or the management node instructs the load balancing node to stop the first service node.
S202, the first service node updates the software according to the first message;
here, the first service node may obtain the update package to update the software after receiving the first message sent by the management node.
S203, the first service node sends a second message to the management node after successful update, where the second message is used to indicate that the first service node has successfully updated the software, and the second message carries a version identifier of the software, so that the management node determines, according to the version identifier of the software, the number of service nodes in the at least one service node that have successfully updated the software;
alternatively, the version identification of the software may be understood as a software version number or other version identification information. Wherein the software version number indicates the software version of said software on the service node.
Alternatively, the software version number may monotonically increase as the software version is released or upgraded. For example, a certain software version on the service node is numbered 1.0, which is referred to as V1.0 for short, and as the software version develops, the updated version of the software version is numbered V2.0.
Here, the first service node may send a second message to the management node after completing the update, so as to notify the management node that the software update is successful, and carry the version identifier of the software in the second message, for example, carry the updated version number V2.0. In this way, the management node may obtain or know the software version number in all the service nodes, thereby knowing the number of service nodes in the at least one service node that have successfully updated the software.
Optionally, the second message may be a registration request or a heartbeat request, that is, the updated software version number may be carried in the registration request or the heartbeat request.
Correspondingly, after receiving the second message, the management node may update the cache information, so as to count the software version number corresponding to each service node in the at least one service node.
S204, the management node acquires the version identification of the software and determines the number of service nodes which successfully update the software in the at least one service node according to the version identification of the software;
optionally, S204 includes:
the management node detects the version identification of the software corresponding to each service node in the at least one service node to acquire the service node of the at least one service node, wherein the software is successfully updated;
and the management node counts the number of the service nodes which have successfully updated the software.
Specifically, the management node may check or identify the version identifier of the software corresponding to each service node in the at least one service node, and count the number of service nodes in the at least one service node that have successfully updated the software.
S205, under the condition that the number of the service nodes which have successfully updated the software meets a preset value, the management node determines to perform service switching.
Optionally, the preset value may be determined by the management node according to actual requirements.
Optionally, S205 includes:
and when the number of the service nodes which have successfully updated the software is larger than the number of the service nodes which have not successfully updated the software in the at least one service node, determining to perform service switching.
For example, when the number of service nodes that have successfully updated the software reaches half of the total number of the at least one service node, the management node may determine to perform a service handover.
The service switching means: stopping the service on the service node which does not successfully update the software in the distributed system, and starting the service on the service node which successfully updates the software in the distributed system. In other words, traffic in the distributed system is switched from a service node that did not update the software to a service node that successfully updated the software. The time for switching the service is short and can be ignored, and the service transmission is not greatly influenced.
It should be understood that, in the embodiment of the present application, the numbers "first", "second", … are introduced only for distinguishing different objects, such as different messages, or different "service nodes", and do not limit the scope of the embodiment of the present application.
It should also be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In the embodiment of the application, a management node receives a second message sent by a first service node, wherein the second message is used for indicating that the first service node has successfully updated software, the second message carries a version identifier of the software, and then the management node determines the number of service nodes in the at least one service node, which have successfully updated the software, according to the version identifier of the software; and determining to perform service switching under the condition that the number of the service nodes which have successfully updated the software meets a preset value, wherein the compatibility requirement on the service nodes before and after updating is low, and the service is not interrupted in the updating process.
In the embodiment of the application, the management node determines whether to perform service switching by judging whether the number of service nodes in at least one service node, in which the software has been successfully updated, satisfies a preset value. Therefore, not only can the online updating of the service node be ensured, but also the service can be ensured to be transmitted only on the service node with the same version number, so that the service on the service node which successfully updates the software and the service node which does not successfully update the software cannot be interacted, namely, the service is only concentrated on the service node which successfully updates the software or is only concentrated on the service node which does not successfully update the software.
Optionally, when the number of the service nodes that have successfully updated the software does not satisfy a preset value, the management node continues to select other service nodes to be updated in the at least one service node for updating, so as to repeat the updating step.
Optionally, when determining to perform service handover, the method 200 further includes:
and enabling the service node which successfully updates the software by the management node, and stopping the service node which does not successfully update the software in the at least one service node.
That is, when determining to perform the service switching, the management node may directly enable the service node that has successfully updated the software and stop the service node that has not successfully updated the software. Alternatively, the management node may instruct the load balancing node to perform the service switching, which is not limited herein.
Optionally, as shown in fig. 3, the method 200 may further include:
s206, the management node sends a handover request to the load balancing node, where the handover request is used to instruct the load balancing node to enable the service node that successfully updates the software, and stops a service node that does not successfully update the software in the at least one service node, so that the load balancing node sends a third message to the first service node, where the third message is used to instruct to enable the first service node;
optionally, the load balancing node enables a service node, which has successfully updated the software, in the at least one service node according to the handover request, and stops a service node, which has not successfully updated the software, in the at least one service node;
s207, after receiving the handover request sent by the management node, the load balancing node sends a third message to the first service node, where the third message is used to indicate that the first service node is enabled.
Correspondingly, the first service node enables service transmission according to the third message.
Optionally, the third message may further include a service distributed by the load balancing node to the first service node, so that the first service node starts service transmission.
It should be noted that the first service node stops service transmission when performing software update. However, after the first service node successfully updates the software, the management node does not immediately start the first service node, or instruct the load balancing node to distribute the service to the first service node, but starts the first service node or instructs the load balancing node to distribute the service to the first service node when the number of the service nodes that have successfully updated the software is determined to meet a preset value. Therefore, the service can be guaranteed to be distributed or transmitted only in the service nodes identified by the same software version, so that the service nodes which successfully update the software and the service nodes which do not successfully update the software cannot interact.
S208, the load balancing node sends a switching response message to the management node, and the switching response message is used for notifying that the service switching is successful.
Optionally, the management node updates a service node, which does not successfully update the software, in the at least one service node according to the handover response message.
Alternatively, the management node may update the other service nodes of the at least one service node to which the software is to be updated together (i.e., in parallel), or update one by one. Optionally, each time the management node updates one service node, the service of the service node may be started.
Specifically, the management node may know that the service has been successfully switched when receiving the switching response message, that is, the service has been switched from the service node that has not successfully updated the software to the service node that has successfully updated the software. At this time, the management node may update a service node, which does not successfully update the software, of the at least one service node.
Therefore, the management node determines the number of service nodes which have successfully updated the software in the at least one service node through the version identifier of the software, determines to perform service switching when the number of service nodes which have successfully updated the software meets a preset value, has low requirements on compatibility of the service nodes before and after updating, and does not interrupt service in the updating process.
In order to facilitate those skilled in the art to understand the technical solutions of the embodiments of the present application, the following description will be made with reference to fig. 4. Fig. 4 shows a schematic diagram of an example according to an embodiment of the application. As shown in fig. 4, the distributed system includes 4 service nodes (including service node 1, service node 2, service node 3, and service node 4). On the left side of fig. 4, after the load balancing node stops distributing the service to the service node 2 and the service node 4, the management node updates the software of the service node 2 and the software of the service node 4 respectively, and obtains that the version numbers of the software on the service node 2 and the service node 4 are both v2, and the version numbers of the software on the service node 1 and the service node 3 are both v 1; on the right side of fig. 4, when learning that the number of service nodes successfully updated to the software version number v2 satisfies half of the total number, the management node may instruct the load balancing node to distribute the traffic to the service node 2 and the service node 4, and stop distributing the traffic to the service node 1 and the service node 3. Optionally, the management node updates the version number of the software cached in each local service node according to the update condition of each service node, so as to facilitate subsequent use. Optionally, after the service switching is completed, the management node may update the software on the service node 1 and the service node 3. FIG. 5 is a schematic diagram of another example according to an embodiment of the present application. For example, as shown in FIG. 5, the management node may upgrade the software on service node 1, upgrade the software version on service node 1 from v1 to v2, and resume traffic transmission on service node 1. Of course, the management node may continue to upgrade the service node 3 (not shown in fig. 5).
It should be understood that the description is made only by way of example in fig. 4 and 5, and the scope of the embodiments of the present application is not limited thereto.
The software upgrade will be described below with reference to the examples in fig. 6 and 7. It should be understood that the software rollback is also applicable to the technical solution of the embodiment of the present application. Fig. 6 shows a schematic interaction diagram of yet another example according to an embodiment of the application. As shown in fig. 6, this example may include the following steps:
step 1, a management node (or a cluster management node) sends a stop request to a load balancing node, wherein the stop request is used for informing the load balancing node to stop the service of a service node 1; the software version of the service node 1 is V1.
Step 2, after the load balancing node stops the service of the service node 1, replying a stop response to the management node, wherein the stop response indicates that the service on the service node 1 is successfully stopped;
step 3, the management node sends an upgrade request to the service node 1 to inform the service node to start upgrading, and uploads an upgrade package;
step 4, the service node 1 receives the upgrade package and replies the successfully received upgrade package to the management node;
step 5, the management node sends an upgrade starting request to the service node 1 to inform the service node 1 of starting upgrading;
step 6, the service node 1 executes an upgrading command and uses an upgrading packet for upgrading;
step 7, after the upgrade is successful, the service node 1 replies a response of successful upgrade to the management node, and registers a new version number V2;
step 8, after receiving the registration request, the management node updates the node version number (or cache information), i.e. the software version number of the service node 1 is updated from V1 to V2;
and 9, checking the version numbers of all the service nodes by the management node, selecting other service nodes to be upgraded when the number of the successfully upgraded service nodes (also called new nodes) does not reach half of the total number of the service nodes, and circulating the steps 1-8.
Therefore, the management node can judge whether the service node which is successfully upgraded meets the condition or not according to the software version number of the service node, and continuously select other service nodes to be upgraded under the condition of not meeting the condition.
Optionally, fig. 7 is a schematic interaction diagram according to another example of the embodiment of the present application, as shown in fig. 7, for step 9, if the management node checks that the number of new nodes is greater than the number of old nodes (service nodes that are not upgraded), service switching may be started, and a service switching request is sent to the load balancing node;
step 10, the load balancing node executes service switching, namely stopping the old node service and starting a new node service;
step 11, the load balancing node replies a response message of successful service switching;
step 12, after receiving the response message of successful service switching, the management node may select the remaining service nodes that are not upgraded to upgrade, for example, the service node 2, where the software version of the service node 2 is V1.
Therefore, the management node determines to perform service switching under the condition that the number of the service nodes which are successfully provided with the upgrade package meets a preset value, the compatibility requirement on the service nodes before and after upgrading is low, and the service is not interrupted in the upgrading process.
It should be understood that the example introduced in fig. 6 or fig. 7 is only for facilitating the technical solution of the example of the present application to be understood by those skilled in the art, and does not limit the protection scope of the embodiment of the present application.
It should also be understood that, in the various embodiments of the present application, the sequence numbers of the above-mentioned processes do not mean the execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
The method for transmitting traffic in a distributed system according to the embodiment of the present application is described above in detail. The management node, the service node, and the load balancing node in the distributed system according to the embodiment of the present application will be described below.
Fig. 8 shows a schematic block diagram of a management node 800 in a distributed system according to an embodiment of the application. Wherein the distributed system comprises at least one service node. As shown in fig. 8, the management node 800 includes:
a sending module 810, configured to send a first message to a first service node of the at least one service node, where the first message is used to notify the first service node of updating software;
a receiving module 820, configured to receive a second message sent by the first serving node, where the second message is used to indicate that the first serving node has successfully updated the software, and the second message carries a version identifier of the software;
a determining module 830, configured to obtain the version identifier of the software, and determine, according to the version identifier of the software, the number of service nodes that have successfully updated the software in the at least one service node;
the determining module 830 is further configured to determine to perform service switching when the number of the service nodes that have successfully updated the software meets a preset value.
Optionally, the determining module 830 is specifically configured to:
detecting the version identification of the software corresponding to each service node in the at least one service node to obtain the service node of the at least one service node, wherein the software is successfully updated;
and counting the number of the service nodes which have successfully updated the software.
Optionally, the management node further includes:
and the processing module is used for starting the service node which successfully updates the software and stopping the service node which does not successfully update the software in the at least one service node when the service switching is determined.
Optionally, the distributed system further includes a load balancing node, wherein the sending module 810 is further configured to:
sending a switching request to the load balancing node, wherein the switching request is used for indicating the load balancing node to enable the service node which successfully updates the software and stop the service node which does not successfully update the software in the at least one service node, so that the load balancing node sends a third message to the first service node, and the third message is used for indicating to enable the first service node;
wherein the receiving module 820 is further configured to:
receiving a switching response message sent by the load balancing node, wherein the switching response message is used for notifying that service switching is successful;
the management node 800 further comprises:
and the updating module is used for updating the service node which does not successfully update the software in the at least one service node according to the switching response message.
Optionally, the sending module 810 is further configured to:
sending a request message to the load balancing node, wherein the request message is used for notifying the load balancing node to stop the first service node from carrying out service transmission;
wherein the receiving module 820 is further configured to:
and receiving a request response message sent by the load node, wherein the request response message indicates that the load balancing node has successfully stopped the first service node.
Optionally, the determining module 830 is specifically configured to:
and when the number of the service nodes which have successfully updated the software is larger than the number of the service nodes which have not successfully updated the software in the at least one service node, determining to perform service switching.
Optionally, the management node 800 further includes:
an upload module to upload an update package of the software in the first service node, the update package for the first service node to update the software using the update package.
The management node 800 in the distributed system according to the embodiment of the present application may execute the method for managing the node side in the method for transmitting a service in a distributed system according to the embodiment of the present application, and the above and other operations and/or functions of each module in the management node 800 in the distributed system are respectively for implementing corresponding processes of the foregoing methods, so that beneficial effects in the method may also be implemented, and for brevity, no further description is provided here.
Fig. 9 shows a schematic block diagram of a service node 900 in a distributed system according to an embodiment of the application. Wherein the distributed system comprises a management node. As shown in fig. 9, the service node 900 includes:
a receiving module 910, configured to receive a first message sent by the management node, where the first message is used to notify the service node of updating software;
an update module 920, configured to update the software according to the first message;
a sending module 930, configured to send a second message to the management node after the software is successfully updated, where the second message is used to indicate that the service node has successfully updated the software, and the second message carries the version identifier of the software, so that the management node determines, according to the version identifier of the software, the number of service nodes that have successfully updated the software in at least one service node.
Optionally, the distributed system further includes a load balancing node, and the receiving module 910 is further configured to:
receiving a third message sent by the load balancing node, wherein the third message is used for indicating that the service node is enabled;
wherein the service node 900 further comprises:
and the transmission module is used for carrying out service transmission according to the third message.
Optionally, the service node 900 further includes:
the acquisition module is used for acquiring the update package of the software;
the updating module 920 is specifically configured to:
updating the software using the update package in accordance with the first message.
The service node 900 in the distributed system according to the embodiment of the present application may execute the method for managing the node side in the method for transmitting a service in the distributed system according to the embodiment of the present application, and the above and other operations and/or functions of each module in the service node 900 in the distributed system are respectively for implementing corresponding processes of the foregoing methods, so that beneficial effects in the method may also be implemented, and for brevity, no further description is provided here.
Fig. 10 shows a schematic block diagram of a load balancing node 1000 in a distributed system according to an embodiment of the application. Wherein the distributed system comprises a management node and at least one service node. As shown in fig. 10, the load balancing node 1000 includes:
a receiving module 1010, configured to receive a handover request sent by the management node, where the handover request is used to instruct the load balancing node to enable a service node of the at least one service node that has successfully updated software, and stop a service node of the at least one service node that has not successfully updated the software;
a processing module 1020, configured to enable a service node, which has successfully updated the software, in the at least one service node according to the handover request, and stop a service node, which has not successfully updated the software, in the at least one service node;
a sending module 1030, configured to send a handover response message to the management node, where the handover response message is used to notify that service handover is successful, so that the management node updates a service node, which does not successfully update the software, in the at least one service node according to the handover response message.
Optionally, the receiving module 1010 is further configured to:
receiving a request message sent by the management node, wherein the request message is used for informing the load balancing node to stop a first service node in the at least one service node;
the processing module 1020 is further configured to stop the first serving node according to the request message;
the sending module 1030 is further configured to send a request response message to the management node, where the request response message indicates that the load balancing node has successfully stopped the first service node.
Optionally, the sending module 1030 is further configured to:
sending a third message to the first service node, the third message indicating that the first service node is enabled.
The load balancing node 1000 in the distributed system according to the embodiment of the present application may perform a method for managing a node side in the method for transmitting a service in the distributed system according to the embodiment of the present application, and the above and other operations and/or functions of each module in the load balancing node 1000 in the distributed system are respectively for implementing corresponding processes of the foregoing methods, so that beneficial effects in the method may also be implemented, and for brevity, no further description is provided herein.
Fig. 11 illustrates an architecture of a management node in a distributed system according to an embodiment of the present application, which includes at least one processor 1102 (e.g., CPU), at least one network interface 1103 or other communication interface, and a memory 1104. Optionally, a receiver 1105 and a transmitter 1106 are also possible. The processor 1102 is operable to execute executable modules, such as computer programs, stored in the memory 1104. The memory 1104 may comprise a high-speed Random Access Memory (RAM) and may also include a non-volatile memory, such as at least one disk memory. The communication connection with at least one other network element is realized through at least one network interface 1103 (which may be wired or wireless). The receiver 1105 and the transmitter 1106 are used to transmit various signals, messages or information.
In some embodiments, the memory 1104 stores a program 11041, and the program 11041 can be executed by the processor 1102 to execute the method for managing the node side in the method for transmitting the service in the distributed system according to the embodiment of the present application.
Fig. 12 illustrates an architecture of a service node in a distributed system according to an embodiment of the present application, which includes at least one processor 1202 (e.g., CPU), at least one network interface 1203 or other communication interface, and a memory 1204. Optionally, a receiver 1205 and a transmitter 1206 are also possible. The processor 1202 is operable to execute executable modules, such as computer programs, stored in the memory 1204. The memory 1204 may comprise high-speed random access memory RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection with at least one other network element is realized through at least one network interface 1203 (which may be wired or wireless). The receiver 1205 and the transmitter 1206 are used to transmit various signals, messages, or information.
In some embodiments, the memory 1204 stores a program 12041, and the program 12041 can be executed by the processor 1202 to perform the method on the service node side in the method for transmitting traffic in a distributed system according to the embodiment of the present application.
Fig. 13 illustrates an architecture of a load balancing node in a distributed system according to an embodiment of the present application, which includes at least one processor 1302 (e.g., CPU), at least one network interface 1303 or other communication interfaces, and a memory 1304. Optionally, a receiver 1305 and a transmitter 1306 are also provided. The processor 1302 is configured to execute executable modules, such as computer programs, stored in the memory 1304. The memory 1304 may comprise high-speed random access memory RAM, and may also include non-volatile memory (non-volatile memory), such as at least one disk memory. The communication connection with at least one other network element is realized through at least one network interface 1303 (which may be wired or wireless). Receiver 1305 and transmitter 1306 are used to transmit various signals, messages or information.
In some embodiments, the memory 1304 stores a program 13041, and the program 13041 can be executed by the processor 1302 to perform the method on the load balancing node side in the method for transmitting traffic in a distributed system according to the embodiment 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 implementation. 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 embodiments of the present application.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the embodiments of the present application, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
The units described as separate parts may or may not be physically separate, and parts displayed 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 can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into 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 such understanding, the technical solutions of the embodiments of the present application, which essentially or partly contribute to the prior art, may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The above description is only a specific implementation of the embodiments of the present application, but the scope of the embodiments of the present application is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the embodiments of the present application, and all the changes or substitutions should be covered by the scope of the embodiments of the present application. Therefore, the protection scope of the embodiments of the present application shall be subject to the protection scope of the claims.

Claims (22)

1. A method for transmitting traffic for a distributed system, the distributed system comprising a management node and at least one service node, the method being performed by the management node, the method comprising:
sending a first message to a first service node of the at least one service node, the first message being used to inform the first service node of updating software;
receiving a second message sent by the first service node, where the second message is used to indicate that the first service node has successfully updated the software, and the second message carries a version identifier of the software;
acquiring the version identification of the software, and determining the number of service nodes which have successfully updated the software in the at least one service node according to the version identification of the software;
determining to perform service switching under the condition that the number of the service nodes which have successfully updated the software meets a preset value;
when the service switching is determined, the method further includes:
enabling the service node which has successfully updated the software, and stopping the service node which has not successfully updated the software in the at least one service node;
the distributed system further comprises a load balancing node, wherein the enabling of the service node that successfully updates the software and the stopping of the service node that unsuccessfully updates the software in the at least one service node comprises:
sending a switching request to the load balancing node, wherein the switching request is used for indicating the load balancing node to enable the service node which successfully updates the software and stop the service node which does not successfully update the software in the at least one service node, so that the load balancing node sends a third message to the first service node, and the third message is used for indicating to enable the first service node;
the method further comprises the following steps:
receiving a switching response message sent by the load balancing node, wherein the switching response message is used for notifying that service switching is successful;
and updating the service node which does not successfully update the software in the at least one service node according to the switching response message.
2. The method according to claim 1, wherein the determining the number of service nodes that have successfully updated the software from among the at least one service node according to the version identifier of the software comprises:
detecting the version identification of the software corresponding to each service node in the at least one service node to obtain the service node of the at least one service node, wherein the software is successfully updated;
and counting the number of the service nodes which have successfully updated the software.
3. The method of claim 1 or 2, wherein before the sending the first message to the first serving node of the at least one serving node, the method further comprises:
sending a request message to the load balancing node, wherein the request message is used for informing the load balancing node to stop the first service node;
and receiving a request response message sent by the load balancing node, wherein the request response message indicates that the load balancing node has successfully stopped the first service node.
4. The method according to claim 1 or 2, wherein determining to perform service switching when the number of the service nodes that have successfully updated the software satisfies a preset value comprises:
and when the number of the service nodes which have successfully updated the software is larger than the number of the service nodes which have not successfully updated the software in the at least one service node, determining to perform service switching.
5. The method according to claim 1 or 2, wherein after sending the first message to the first serving node of the at least one serving node, the method further comprises:
uploading an update package of the software in the first service node, the update package for the first service node to update the software using the update package.
6. A method for a distributed system to transport traffic, the distributed system including a management node and at least one service node, the method being performed by a first service node of the at least one service node, the method comprising:
receiving a first message sent by the management node, wherein the first message is used for informing the first service node of updating software;
updating the software according to the first message, and sending a second message to the management node after successful updating, the second message is used for indicating that the first service node has successfully updated the software, the second message carries the version identifier of the software, so that the management node determines the number of service nodes which have successfully updated the software in the at least one service node according to the version identification of the software, and determining to perform service switching, enable the service node that has successfully updated the software, and stop the service node that has not successfully updated the software in the at least one service node, when the number of the service nodes that have successfully updated the software satisfies a preset value, wherein the enabling, by the management node, the service node that successfully updates the software and stopping, by the management node, the service node that does not successfully update the software, among the at least one service node, comprises: sending a switching request to a load balancing node, where the switching request is used to instruct the load balancing node to enable the service node that has successfully updated the software, and to stop a service node that has not successfully updated the software in the at least one service node, so that the load balancing node sends a third message to the first service node, where the third message is used to instruct to enable the first service node.
7. The method of claim 6, wherein the distributed system further comprises a load balancing node, the method further comprising:
receiving a third message sent by the load balancing node, wherein the third message is used for indicating that the first service node is enabled;
and carrying out service transmission according to the third message.
8. The method according to claim 6 or 7, characterized in that the method further comprises:
acquiring an update package of the software;
wherein the updating the software according to the first message comprises:
updating the software using the update package in accordance with the first message.
9. A method for a distributed system to transport traffic, the distributed system comprising a management node, at least one service node, and a load balancing node, the method being performed by the load balancing node, the method comprising:
receiving a switching request sent by the management node, where the switching request is used to instruct the load balancing node to enable a service node in the at least one service node, which has successfully updated the software, and to stop a service node, which has not successfully updated the software, in the at least one service node, where the switching request is sent when the management node determines to perform service switching when the number of service nodes, which have successfully updated the software, in the at least one service node meets a preset value, and the number of service nodes, which have successfully updated the software, is determined according to a version identifier of the software;
enabling the service node which successfully updates the software in the at least one service node according to the switching request, and stopping the service node which does not successfully update the software in the at least one service node;
and sending a switching response message to the management node, wherein the switching response message is used for notifying that service switching is successful, so that the management node updates the service node which does not successfully update the software in the at least one service node according to the switching response message.
10. The method according to claim 9, wherein before said receiving the handover request sent by the management node, the method further comprises:
receiving a request message sent by the management node, wherein the request message is used for informing the load balancing node to stop a first service node in the at least one service node;
and stopping the first service node according to the request message, and sending a request response message to the management node, wherein the request response message indicates that the load balancing node has successfully stopped the first service node.
11. The method of claim 10, wherein after receiving the handover request sent by the management node, the method further comprises:
sending a third message to the first service node, the third message indicating that the first service node is enabled.
12. A management node in a distributed system, the distributed system comprising at least one service node, the management node comprising:
a sending module, configured to send a first message to a first service node of the at least one service node, where the first message is used to notify the first service node of updating software;
a receiving module, configured to receive a second message sent by the first service node, where the second message is used to indicate that the first service node has successfully updated the software, and the second message carries a version identifier of the software;
the determining module is used for acquiring the version identification of the software and determining the number of service nodes which have successfully updated the software in the at least one service node according to the version identification of the software;
the determining module is further configured to determine to perform service switching when the number of the service nodes that have successfully updated the software satisfies a preset value;
the management node further comprises:
a processing module, configured to, when it is determined to perform service switching, enable the service node that successfully updates the software, and stop a service node that does not successfully update the software in the at least one service node;
the distributed system further comprises a load balancing node, wherein the sending module is further configured to:
sending a switching request to the load balancing node, wherein the switching request is used for indicating the load balancing node to enable the service node which successfully updates the software and stop the service node which does not successfully update the software in the at least one service node, so that the load balancing node sends a third message to the first service node, and the third message is used for indicating to enable the first service node;
wherein the receiving module is further configured to:
receiving a switching response message sent by the load balancing node, wherein the switching response message is used for notifying that service switching is successful;
the management node further comprises:
and the updating module is used for updating the service node which does not successfully update the software in the at least one service node according to the switching response message.
13. The management node of claim 12, wherein the determining module is specifically configured to:
detecting the version identification of the software corresponding to each service node in the at least one service node to obtain the service node of the at least one service node, wherein the software is successfully updated;
and counting the number of the service nodes which have successfully updated the software.
14. The management node of claim 13, wherein the sending module is further configured to:
sending a request message to the load balancing node, wherein the request message is used for informing the load balancing node to stop the first service node;
wherein the receiving module is further configured to:
and receiving a request response message sent by a load node, wherein the request response message indicates that the load balancing node has successfully stopped the first service node.
15. The management node according to claim 13 or 14, wherein the determining module is specifically configured to:
and when the number of the service nodes which have successfully updated the software is larger than the number of the service nodes which have not successfully updated the software in the at least one service node, determining to perform service switching.
16. The management node according to claim 13 or 14, wherein the management node further comprises:
an upload module to upload an update package of the software in the first service node, the update package for the first service node to update the software using the update package.
17. A service node in a distributed system, the distributed system comprising a management node, the service node comprising:
a receiving module, configured to receive a first message sent by the management node, where the first message is used to notify the service node of updating software;
the updating module updates the software according to the first message;
a sending module for sending a second message to the management node after the software is successfully updated, the second message is used for indicating that the service node has successfully updated the software, the second message carries the version identifier of the software, so that the management node determines the number of service nodes which have successfully updated the software in at least one service node according to the version identification of the software, and determining to perform service switching, enable the service node that has successfully updated the software, and stop the service node that has not successfully updated the software in the at least one service node, when the number of the service nodes that have successfully updated the software satisfies a preset value, wherein the enabling, by the management node, the service node that successfully updates the software and stopping, by the management node, the service node that does not successfully update the software, among the at least one service node, comprises: and sending a switching request to a load balancing node, wherein the switching request is used for indicating the load balancing node to enable the service node which successfully updates the software, and stopping the service node which does not successfully update the software in the at least one service node, so that the load balancing node sends a third message to a first service node, and the third message is used for indicating to enable the first service node.
18. The service node of claim 17, wherein the distributed system further comprises a load balancing node, and wherein the receiving module is further configured to:
receiving a third message sent by the load balancing node, wherein the third message is used for indicating that the service node is enabled;
and carrying out service transmission according to the third message.
19. The serving node according to claim 17 or 18, characterized in that the serving node further comprises:
the acquisition module is used for acquiring the update package of the software;
wherein the update module is specifically configured to:
updating the software using the update package in accordance with the first message.
20. A load balancing node in a distributed system, the distributed system comprising a management node and at least one service node, the load balancing node comprising:
a receiving module, configured to receive a handover request sent by the management node, where the handover request is used to instruct the load balancing node to enable a service node of the at least one service node, which has successfully updated software, and stop a service node of the at least one service node, which has not successfully updated the software, where the handover request is sent when the management node determines to perform service handover when the number of service nodes, which have successfully updated the software, of the at least one service node meets a preset value, and the number of service nodes, which have successfully updated the software, is determined according to a version identifier of the software;
the processing module is used for enabling the service node which successfully updates the software in the at least one service node according to the switching request and stopping the service node which does not successfully update the software in the at least one service node;
and a sending module, configured to send a handover response message to the management node, where the handover response message is used to notify that service handover is successful, so that the management node updates a service node, which does not successfully update the software, in the at least one service node according to the handover response message.
21. The load balancing node of claim 20, wherein the receiving module is further configured to:
receiving a request message sent by the management node, wherein the request message is used for informing the load balancing node to stop a first service node in the at least one service node;
the processing module is further configured to stop the first service node according to the request message;
the sending module is further configured to send a request response message to the management node, where the request response message indicates that the load balancing node has successfully stopped the first service node.
22. The load balancing node according to claim 20 or 21, wherein the sending module is further configured to:
sending a third message to the first service node, the third message indicating that the first service node is enabled.
CN201710642637.4A 2017-07-31 2017-07-31 Method, management node and service node for distributed system transmission service Active CN107391156B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710642637.4A CN107391156B (en) 2017-07-31 2017-07-31 Method, management node and service node for distributed system transmission service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710642637.4A CN107391156B (en) 2017-07-31 2017-07-31 Method, management node and service node for distributed system transmission service

Publications (2)

Publication Number Publication Date
CN107391156A CN107391156A (en) 2017-11-24
CN107391156B true CN107391156B (en) 2021-01-08

Family

ID=60344299

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710642637.4A Active CN107391156B (en) 2017-07-31 2017-07-31 Method, management node and service node for distributed system transmission service

Country Status (1)

Country Link
CN (1) CN107391156B (en)

Families Citing this family (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108365984B (en) * 2018-02-06 2021-05-18 上海华为技术有限公司 Information processing method and device
CN110633096B (en) * 2018-06-21 2023-09-15 阿里巴巴集团控股有限公司 Node control method and device, version control method and device and distributed system
CN109032643A (en) * 2018-07-26 2018-12-18 北京百度网讯科技有限公司 The method and apparatus of software upgrading
CN110874238B (en) * 2018-09-03 2023-04-28 阿里巴巴集团控股有限公司 Online service updating method and device
CN111382046B (en) * 2018-12-28 2023-03-28 中国电信股份有限公司 Test system, method and device for distributed software system
CN112181915B (en) * 2019-07-03 2023-12-08 成都华为技术有限公司 Method, device, terminal and storage medium for executing service
CN114691547B (en) * 2019-12-31 2023-05-12 华为云计算技术有限公司 Method for deploying instance, instance management node, computing node and computing device
CN111338682B (en) * 2020-02-27 2023-05-09 上海百秋新网商数字科技有限公司 Continuous upgrade system service method based on load

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741894A (en) * 2008-11-26 2010-06-16 中国移动通信集团公司 Upgrade method for distributed system and upgrade scheduling node and system
CN103294675A (en) * 2012-02-23 2013-09-11 上海盛霄云计算技术有限公司 Method and device for updating data in distributed storage system
CN104094248A (en) * 2012-02-02 2014-10-08 微软公司 Self-updating functionality in a distributed system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9535735B2 (en) * 2014-06-09 2017-01-03 International Business Machines Corporation Adaptive virtual machine request approver
US10157215B2 (en) * 2016-01-13 2018-12-18 American Express Travel Related Services Company, Inc. System and method for managing data and updates to a database structure

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101741894A (en) * 2008-11-26 2010-06-16 中国移动通信集团公司 Upgrade method for distributed system and upgrade scheduling node and system
CN104094248A (en) * 2012-02-02 2014-10-08 微软公司 Self-updating functionality in a distributed system
CN103294675A (en) * 2012-02-23 2013-09-11 上海盛霄云计算技术有限公司 Method and device for updating data in distributed storage system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
分布式网络设备的业务不中断软件升级系统设计_;张敏狄;《计算机系统应用》;20100630;全文 *

Also Published As

Publication number Publication date
CN107391156A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
CN107391156B (en) Method, management node and service node for distributed system transmission service
US10083021B2 (en) Method and apparatus for providing firmware over the air service to user equipments
US9659419B2 (en) Method of controlling mobile terminal based on location information and applying security policy based on priority rules, and system thereof
US10880779B2 (en) User plane resource management method, user plane network element, and control plane network element
US10103940B2 (en) Local network and method of updating a device in a local network
US9413851B2 (en) Information processing system, information processing device, client terminal, and computer readable medium
CN111324363A (en) Equipment upgrading method, upgrading terminal, equipment and storage medium
EP3249871A1 (en) Method and device for updating network service descriptor
EP3635547B1 (en) Systems and methods for preventing service disruption during software updates
CN110650503B (en) Network access method, device, system and computer readable storage medium
US8850047B2 (en) Access control method, access control apparatus, and access control program
US11093353B2 (en) Virtual network system, VIM, virtual network control method and recording medium
JP2017510169A5 (en)
US9538326B2 (en) Apparatus and method for monitoring a location of a movable information apparatus
US20170280410A1 (en) Method, device and system for implementing information self-registration, and computer storage medium
WO2018157105A1 (en) Automatic recovery in remote management services
US20170235288A1 (en) Process control program, process control device, and process control method
JP6091333B2 (en) Network management apparatus and network management method
CN107241209B (en) Data transmission method and equipment
EP3942782B1 (en) Management for managing resource allocation in an edge computing system
US20190037017A1 (en) Information processing device, information processing method, information processing program and information processing system
US10148585B2 (en) Communication control method, information processing apparatus, and storage medium
CN112769889B (en) Service data pushing method and device, storage medium and electronic device
EP3101928A1 (en) Method and system for providing service according to policy
CN111092948A (en) Guiding method, guiding server, server and storage medium

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
GR01 Patent grant
GR01 Patent grant