Disclosure of Invention
In view of the above, an object of the present invention is to provide a method and a platform for upgrading a multi-active server system, which can perform reliable upgrade operations on the multi-active server system. The specific scheme is as follows:
a multi-active server system upgrading method is applied to a multi-active server system comprising a main server and at least two slave servers, wherein the method comprises the following steps:
upgrading each slave server in the multi-active server system one by one, and adding the slave server into the multi-active server topological structure again when the upgrading of one slave server is completed;
and when all the updated slave servers are added into the multi-active server topological structure again, updating the master server in the multi-active server system.
Optionally, the process of upgrading each slave server in the multi-active server system one by one includes:
and performing software upgrading on each slave server in the multi-active server system, and performing corresponding data synchronization processing aiming at the software upgrading process of each slave server.
Optionally, the software upgrading of each slave server in the multi-active server system and the process of performing corresponding data synchronization processing for the software upgrading process of each slave server include:
starting a software upgrading process for each slave server in the multi-active server system, and after any slave server finishes software upgrading, extracting a corresponding data updating package of the slave server in the software upgrading period, and then merging the data updating package into the slave server.
Optionally, the process of upgrading the main server in the multi-active server system includes:
controlling a master server in the multi-active server system to generate a first master-slave switching instruction;
performing a first master-slave switching operation on the multi-active server system by using the first master-slave switching instruction so as to perform master-slave interchange on a master server and a slave server in the multi-active server system;
and upgrading the slave server obtained after the first master-slave switching operation.
Optionally, the process of upgrading the slave server obtained after the first master-slave switching operation includes:
starting a software upgrading process of the slave server obtained after the first master-slave switching operation;
when the slave server obtained after the first master-slave switching operation completes software upgrading, controlling the master server obtained after the first master-slave switching operation to generate a second master-slave switching instruction;
performing a second master-slave switching on the multi-active server system by using the second master-slave switching instruction so as to perform master-slave interchange on the master server and the slave server obtained after the first master-slave switching operation;
and extracting a corresponding data update package of the slave server obtained after the first master-slave switching operation in the software upgrading period, and merging the data update package into the master server obtained after the second master-slave switching operation so as to finish upgrading the slave server obtained after the first master-slave switching operation.
The invention also correspondingly discloses a multi-active server system upgrading platform, which is applied to a multi-active server system comprising a main server and at least two slave servers, wherein the platform comprises:
the first upgrading module is used for upgrading each slave server in the multi-active server system one by one, and each time the upgrading of one slave server is completed, the slave server is added into the multi-active server topological structure again;
and the second upgrading module is used for upgrading the main server in the multi-active server system after all the upgraded slave servers are added into the multi-active server topological structure again.
Optionally, the first upgrade module includes:
the upgrading unit is used for upgrading the software of each slave server in the multi-active server system and performing corresponding data synchronous processing aiming at the software upgrading process of each slave server;
and the slave server adding unit is used for rejoining the slave server into the multi-active server topology under the condition that the upgrading unit finishes upgrading of one slave server each time.
Optionally, the upgrade unit is specifically configured to start a software upgrade process for each slave server in the multi-active server system, and after any slave server completes the software upgrade, extract a corresponding data update package of the slave server during the software upgrade period, and then merge the data update package into the slave server.
Optionally, the second upgrade module includes:
the first control unit is used for controlling a main server in the multi-active server system to generate a first master-slave switching instruction;
the first master-slave switching unit is used for performing first master-slave switching operation on the multi-active server system by using the first master-slave switching instruction so as to perform master-slave interchange on a master server and a slave server in the multi-active server system;
and the upgrading submodule is used for upgrading the slave server obtained after the first master-slave switching operation.
Optionally, the upgrade sub-module includes:
a software upgrading starting unit, configured to start a software upgrading process of the slave server obtained after the first master-slave switching operation;
the second control unit is used for controlling the master server obtained after the first master-slave switching operation to generate a second master-slave switching instruction when the slave server obtained after the first master-slave switching operation completes software upgrading;
the second master-slave switching unit is used for performing second master-slave switching on the multi-active server system by using the second master-slave switching instruction so as to perform master-slave interchange on the master server and the slave server obtained after the first master-slave switching operation;
the data extraction unit is used for extracting a corresponding data update package of the slave server obtained after the first master-slave switching operation in the software upgrading period;
and the data merging unit is used for merging the data updating packet extracted by the data extraction unit into the master server obtained after the second master-slave switching operation so as to finish upgrading the slave server obtained after the first master-slave switching operation.
The invention discloses a multi-active server system upgrading method, which comprises the following steps: upgrading each slave server in the multi-active server system one by one, and adding the slave server into the multi-active server topological structure again when the upgrading of one slave server is completed; and when all the updated slave servers are added into the multi-active server topological structure again, the master server in the multi-active server system is updated.
Therefore, when the multi-active server system needs to be upgraded, each slave server is upgraded one by one, and each time the upgrade of one slave server is completed, the slave server is added into the multi-active server topological structure again, and after all the upgraded slave servers are added into the multi-active server topological structure again, the master server is upgraded, so that the chaotic situation caused by the fact that the master server and the slave servers are upgraded at the same time can be avoided, the phenomena of system data disorder and the like are avoided, and the multi-active server system is reliably upgraded.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a multi-active server system upgrading method, which is applied to a multi-active server system comprising a main server and at least two slave servers, wherein referring to fig. 1, the method comprises the following steps:
step S11: upgrading each slave server in the multi-active server system one by one, and adding the slave server into the multi-active server topological structure again when the upgrading of one slave server is completed;
step S12: and when all the updated slave servers are added into the multi-active server topological structure again, the master server in the multi-active server system is updated.
Therefore, when the multi-active server system needs to be upgraded, each slave server is upgraded one by one, and each slave server is added into the multi-active server topological structure again when the upgrade of one slave server is completed, and the master server is upgraded after all the upgraded slave servers are added into the multi-active server topological structure again, so that the situation that the master server and the slave servers are upgraded at the same time to cause disorder can be avoided, the occurrence of phenomena such as system data disorder is avoided, and the reliable upgrade of the multi-active server system is realized.
The embodiment of the invention discloses a specific multi-live server system upgrading method, and compared with the previous embodiment, the embodiment further explains and optimizes the technical scheme. Specifically, the method comprises the following steps:
in step S11 of the previous embodiment, the process of upgrading each slave server in the multi-server system may specifically include: and performing software upgrading on each slave server in the multi-active server system, and performing corresponding data synchronization processing aiming at the software upgrading process of each slave server.
Specifically, the software upgrading of each slave server in the multi-active server system and the corresponding data synchronization process for the software upgrading process of each slave server may include:
starting a software upgrading process for each slave server in the multi-active server system, and after any slave server finishes software upgrading, extracting a corresponding data updating package of the slave server in the software upgrading period, and then merging the data updating package into the slave server.
Further, in step S12 of the previous embodiment, the process of upgrading the main server in the multi-active server system may specifically include the following steps S121 to S123:
step S121: controlling a main server in a multi-active server system to generate a first master-slave switching instruction;
step S122: performing a first master-slave switching operation on the multi-active server system by using a first master-slave switching instruction so as to perform master-slave interchange on a master server and a slave server in the multi-active server system;
step S123: and upgrading the slave server obtained after the first master-slave switching operation.
In step S123, the process of upgrading the slave server obtained after the first master-slave switching operation may specifically include the following steps S1231 to S1234:
step S1231: starting a software upgrading process of the slave server obtained after the first master-slave switching operation;
step S1232: when the slave server obtained after the first master-slave switching operation completes software upgrading, the master server obtained after the first master-slave switching operation is controlled to generate a second master-slave switching instruction;
step S1233: performing secondary master-slave switching on the multi-active server system by using a second master-slave switching instruction so as to perform master-slave interchange on the master server and the slave server obtained after the primary master-slave switching operation;
step S1234: and extracting corresponding data update packages of the slave servers obtained after the first master-slave switching operation in the software upgrading period, and merging the data update packages into the master server obtained after the second master-slave switching operation so as to finish upgrading of the slave servers obtained after the first master-slave switching operation.
Further, an embodiment of the present invention further discloses a multi-active server system upgrade platform, which is applied to a multi-active server system including a master server and at least two slave servers, where, referring to fig. 2, the platform includes:
the first upgrading module 11 is configured to upgrade each slave server in the multi-active server system one by one, and each time the upgrade of one slave server is completed, add the slave server to the multi-active server topology again;
and the second upgrading module 12 is configured to upgrade the master server in the multi-active server system after all the upgraded slave servers are rejoined to the multi-active server topology structure.
In this embodiment, the first upgrade module may specifically include an upgrade unit and a slave server addition unit; wherein,
the upgrading unit is used for upgrading the software of each slave server in the multi-active server system and developing corresponding data synchronous processing aiming at the software upgrading process of each slave server;
and the slave server adding unit is used for adding the slave server into the multi-active server topology again under the condition that the upgrading unit finishes the upgrading of one slave server each time.
The upgrade unit may be specifically configured to start a software upgrade process for each slave server in the multi-active server system, extract a corresponding data update package of the slave server during a software upgrade period after any slave server completes the software upgrade, and then merge the data update package into the slave server.
In addition, the second upgrade module may specifically include a first control unit, a first master-slave switching unit, and an upgrade submodule; wherein,
the first control unit is used for controlling a main server in the multi-active server system to generate a first master-slave switching instruction;
the first master-slave switching unit is used for carrying out first master-slave switching operation on the multi-active server system by utilizing a first master-slave switching instruction so as to carry out master-slave interchange on a master server and a slave server in the multi-active server system;
and the upgrading submodule is used for upgrading the slave server obtained after the first master-slave switching operation.
In this embodiment, the upgrade submodule may specifically include a software upgrade starting unit, a second control unit, a second master-slave switching unit, a data extraction unit, and a data merging unit; wherein,
the software upgrading starting unit is used for starting a software upgrading process of the slave server obtained after the first master-slave switching operation;
the second control unit is used for controlling the master server obtained after the first master-slave switching operation to generate a second master-slave switching instruction when the slave server obtained after the first master-slave switching operation completes software upgrading;
the second master-slave switching unit is used for performing second master-slave switching on the multi-active server system by using a second master-slave switching instruction so as to perform master-slave interchange on the master server and the slave server obtained after the first master-slave switching operation;
the data extraction unit is used for extracting a corresponding data update package of the slave server obtained after the first master-slave switching operation in the software upgrading period;
and the data merging unit is used for merging the data updating packet extracted by the data extraction unit into the master server obtained after the second master-slave switching operation so as to finish upgrading the slave server obtained after the first master-slave switching operation.
Therefore, when the multi-active server system needs to be upgraded, each slave server is upgraded one by one, and each slave server is added into the multi-active server topological structure again when the upgrade of one slave server is completed, and the master server is upgraded after all the upgraded slave servers are added into the multi-active server topological structure again, so that the situation that the master server and the slave servers are upgraded at the same time to cause disorder can be avoided, the occurrence of phenomena such as system data disorder is avoided, and the reliable upgrade of the multi-active server system is realized.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
The method and platform for upgrading a multi-active server system provided by the invention are described in detail, specific examples are applied in the description to explain the principle and the implementation of the invention, and the description of the above embodiments is only used to help understanding the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.