CN114500547A - Session information synchronization system, method, device, electronic equipment and storage medium - Google Patents

Session information synchronization system, method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114500547A
CN114500547A CN202210281644.7A CN202210281644A CN114500547A CN 114500547 A CN114500547 A CN 114500547A CN 202210281644 A CN202210281644 A CN 202210281644A CN 114500547 A CN114500547 A CN 114500547A
Authority
CN
China
Prior art keywords
node
session information
standby
session
host node
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210281644.7A
Other languages
Chinese (zh)
Inventor
肖立美
杨峰明
徐永健
黄保华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Sina Technology China Co Ltd
Original Assignee
Sina Technology China 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 Sina Technology China Co Ltd filed Critical Sina Technology China Co Ltd
Priority to CN202210281644.7A priority Critical patent/CN114500547A/en
Publication of CN114500547A publication Critical patent/CN114500547A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes

Abstract

The application discloses a system, a method and a device for synchronizing session information, electronic equipment and a storage medium, belongs to the technical field of computer networks, can solve the problem of low resource utilization rate during session synchronization, and can effectively utilize resources. The system comprises: at least one load balancing cluster, wherein the at least one load balancing cluster is formed by grouping nodes for load balancing, each load balancing cluster comprises at least two host nodes and at least one standby node, and the number of standby nodes in each load balancing cluster is less than the number of host nodes; in each load balancing cluster, each backup node corresponds to at least one host node, each host node corresponds to at least one backup node, and each host node is configured to synchronize the received session information to the corresponding backup nodes.

Description

Session information synchronization system, method, device, electronic equipment and storage medium
Technical Field
The application belongs to the technical field of computer networks, and particularly relates to a system, a method and a device for synchronizing session information, electronic equipment and a storage medium.
Background
With the increasing of internet flow, service scenes and system architectures are increasingly complex, and the scale of a server is also increasingly huge. Load Balancing (LB) distributes access traffic uniformly to a back-end service cluster according to some strategies in such a large-traffic scenario, which not only improves system service capability, but also enhances service availability. Server Load Balancing (SLB), which implements Load balancing from traffic to a back-end service Server (RS) through a certain scheduling algorithm for access traffic. The SLB ensures that the flow of the same session can be forwarded to the same back-end RS equipment after passing through the SLB cluster by maintaining a session table. In the SLB cluster, the sharing of nodes among clusters can be realized in a session synchronization mode, or cluster nodes respectively hold a session table of a current node.
However, the current session synchronization method has low resource utilization rate.
Disclosure of Invention
The embodiment of the application provides a synchronization system, a synchronization method, a synchronization device, an electronic device and a storage medium for session information, which can solve the problem of low resource utilization rate during session synchronization and can effectively utilize resources.
In a first aspect, an embodiment of the present application provides a system for synchronizing session information, where the system includes: at least one load balancing cluster, wherein the at least one load balancing cluster is formed by node groups for load balancing, each load balancing cluster comprises at least two host nodes and at least one standby node, and the number of the standby nodes in each load balancing cluster is less than that of the host nodes; in each load balancing cluster, each backup node corresponds to at least one host node, each host node corresponds to at least one backup node, and each host node is configured to synchronize the received session information to the corresponding backup nodes.
In a second aspect, an embodiment of the present application provides a session information synchronization method, which is applied to a host node in a load balancing cluster, and the method includes: receiving session synchronization addresses sent by each standby node corresponding to the host node; based on the session synchronization address, synchronizing the received incremental session information to the corresponding standby nodes at intervals of a first preset time interval, and synchronizing the received full session information to the corresponding standby nodes at intervals of a second preset time interval, wherein the first preset time interval is smaller than the second preset time interval.
In a third aspect, an embodiment of the present application provides a method for synchronizing session information, where the method is applied to a standby node in a load balancing cluster, and the method includes: sending the session synchronization address to each host node corresponding to the standby node; receiving incremental session information and full session information sent by each host node, wherein the incremental session information is sent by the host node at intervals of a first preset time interval based on the session synchronization address, and the full session information is sent by the host node at intervals of a second preset time interval based on the session synchronization address.
In a fourth aspect, an embodiment of the present application provides a session information synchronization apparatus, which is applied to a host node in a load balancing cluster, and the apparatus includes: a receiving module, configured to receive session synchronization addresses sent by each standby node corresponding to the host node; and the synchronization module is used for synchronizing the received incremental session information to each corresponding standby node every other first preset time interval and synchronizing the received full session information to each corresponding standby node every other second preset time interval based on the session synchronization address, wherein the first preset time interval is smaller than the second preset time interval.
In a fifth aspect, an embodiment of the present application provides a session information synchronization apparatus, which is applied to a standby node in a load balancing cluster, and the apparatus includes: the sending module is used for sending the session synchronization address to each host node corresponding to the standby node; the receiving module is used for receiving incremental session information and full session information sent by each host node, wherein the incremental session information is sent by the host node at intervals of a first preset time interval based on the session synchronization address, and the full session information is sent by the host node at intervals of a second preset time interval based on the session synchronization address.
In a sixth aspect, the present application provides an electronic device, which includes a processor, a memory, and a program or instructions stored on the memory and executable on the processor, and when executed by the processor, the program or instructions implement the steps of the method according to the second aspect, or implement the steps of the method according to the third aspect.
In a seventh aspect, the present application provides a readable storage medium, on which a program or instructions are stored, which when executed by a processor implement the steps of the method according to the second aspect, or implement the steps of the method according to the third aspect.
In the embodiment of the application, the synchronization system of the session information comprises at least one load balancing cluster, wherein the at least one load balancing cluster is formed by node groups for load balancing, each load balancing cluster comprises at least two host nodes and at least one standby node, and the number of the standby nodes in each load balancing cluster is smaller than that of the host nodes; in each load balancing cluster, each standby node corresponds to at least one host node, each host node corresponds to at least one standby node, and each host node is used for synchronizing the received session information to the corresponding standby nodes, so that a large number of host nodes in the load balancing cluster correspond to a small number of standby nodes, and compared with the situation that one host node corresponds to one standby node in the related art, the utilization rate of hardware resources is improved, and the problem of low utilization rate of the hardware resources in a session synchronization mode in the related art is solved.
Drawings
Fig. 1 is a schematic structural diagram of a system for synchronizing session information according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a session information synchronization method according to an embodiment of the present application;
fig. 3 is a schematic flowchart of another session information synchronization method provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a session information synchronization apparatus according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of another session information synchronization apparatus provided in an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are some, but not all, embodiments of the present application. 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 application.
The terms first, second and the like in the description and in the claims of the present application are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that embodiments of the application may be practiced in sequences other than those illustrated or described herein, and that the terms "first," "second," and the like are generally used herein in a generic sense and do not limit the number of terms, e.g., the first term can be one or more than one. In addition, "and/or" in the specification and claims means at least one of connected objects, a character "/" generally means that a preceding and succeeding related objects are in an "or" relationship.
In the related art of session synchronization, in the active/standby mode, a master is usually used as a cluster group, session synchronization is performed in the group, and the master and the standby have the full session information in the group. In the non-main/standby mode, nodes in the cluster are grouped, session synchronization is performed in the group, each host holds session information of all hosts in the group, the session capacity of a single machine is limited by the number of the hosts in the group, and the processing efficiency of the single machine is low.
The method divides the nodes for load balancing into a plurality of load balancing clusters, one load balancing cluster comprises at least two host nodes and at least one standby node, the number of the standby nodes is smaller than that of the host nodes, namely the number of the host nodes and the standby nodes is in a relation of multiple pairs of 1, the grouping formula improves the utilization rate of hardware resources, and meanwhile, the processing efficiency of a single machine is guaranteed.
A system, a method, an apparatus, an electronic device and a storage medium for synchronizing session information provided in the embodiments of the present application are described in detail below with reference to the accompanying drawings through specific embodiments and application scenarios thereof.
The system for synchronizing the session information comprises: at least one load balancing cluster, wherein the at least one load balancing cluster is formed by node groups for load balancing, each load balancing cluster comprises at least two host nodes and at least one standby node, and the number of the standby nodes in each load balancing cluster is less than that of the host nodes;
in each load balancing cluster, each backup node corresponds to at least one host node, each host node corresponds to at least one backup node, and each host node is configured to synchronize the received session information to the corresponding backup nodes.
Optionally, each backup node may correspond to at least two host nodes, and each host node corresponds to one backup node.
As shown in fig. 1, a load cluster including two host nodes and one standby node is taken as an example for explanation. For example, assume that load balancing cluster 110 includes two host nodes 1101 and one standby node 1102. Two host nodes 1101 are configured to send session information to a standby node 1102 in the same load balancing cluster 110, and the standby node 1102 is configured to receive and store the session information sent by the host nodes 1101 in the same load balancing cluster, and is configured to replace a failed host node 1101. In the load balancing cluster 110, each backup node 1102 corresponds to at least two host nodes 1101, and each host node 1101 corresponds to one backup node 1102, which improves the utilization rate of hardware resources compared to the case where one host node corresponds to one backup node in the related art.
In addition, in the same load balancing cluster 110, the host node 1101 may synchronize the full amount of session information and the incremental session information to the standby node 1102, the host nodes 1101 do not synchronize the session information, and when there is a failure of the host node 1101, the standby node 1102 storing the full amount of session information of the host node replaces the failed host node 1101 to operate.
Therefore, a large number of host nodes in the load balancing cluster correspond to a small number of standby nodes, and compared with the situation that one host node corresponds to one standby node in the related art, the utilization rate of hardware resources is improved, the problem of low utilization rate of the hardware resources in a session synchronization mode in the related art is solved, and in addition, under the situation that the host nodes in the load balancing cluster fail, the main-standby switching can be rapidly carried out, connection does not need to be reestablished, resources are saved, and extra expenses of the resources are avoided.
Fig. 2 shows a synchronization method for session information, which is applied to a host node in a load balancing cluster, according to an embodiment of the present invention, and the method includes the following steps:
step 202: and receiving the session synchronization address sent by each standby node corresponding to the host node.
Specifically, before the session synchronization function in the load balancing cluster starts, the standby node may notify its session synchronization address to each corresponding host node, and at this time, each host node receives the session synchronization address sent by the standby node.
Because each host node corresponds to at least one standby node, when the host node receives the session synchronization address sent by the corresponding standby node, the host node needs to receive the session synchronization address sent by each corresponding standby node.
It is understood that the backup node corresponding to the host node is the backup node that establishes communication with the host node.
Step 204: and based on the session synchronization address, synchronizing the received incremental session information to the corresponding standby nodes at intervals of a first preset time interval, and synchronizing the received full session information to the corresponding standby nodes at intervals of a second preset time interval.
Wherein the first preset time interval is less than the second preset time interval.
Specifically, the host node equivalently receives the session information by adopting an equivalent routing and hash scheme, the host node starts a session synchronization function based on the received session synchronization address of each standby node, and synchronizes the received session information to each corresponding standby node based on the session synchronization address.
Note that session synchronization is not performed between the host nodes.
The incremental session information may refer to session information received by the host node within a first preset time interval. The host node synchronizes the incremental session information to each corresponding standby node every first preset time interval, so that the session synchronization efficiency is improved.
Further, the full amount of session information may refer to all session information received by the host node. The host node can synchronize the full session information of the host node to each corresponding standby node every second preset time interval, so that the consistency of the session information between the host node and the corresponding standby node is ensured.
Optionally, the first preset time interval may be smaller than the second preset time interval, that is, the incremental session information may be synchronized at a shorter time interval, and the full session information may be synchronized at a longer time interval, so that the standby node deletes the aged session information in time, and the efficiency of session synchronization and the consistency of sessions between the active and standby nodes are both considered.
Therefore, the host node synchronizes the received incremental session information to the corresponding standby nodes at intervals of a first preset time interval and synchronizes the received full session information to the corresponding standby nodes at intervals of a second preset time interval, so that the incremental session information and the full session information of the host node can be synchronized, the efficiency of session information synchronization is improved, and the consistency of the session information of the standby nodes and the host node is considered.
The method for synchronizing the session information provided by the embodiment of the invention receives the session synchronization address sent by each standby node corresponding to the host node; synchronizing the received incremental session information to corresponding standby nodes at intervals of a first preset time interval based on the session synchronization address, and synchronizes the received full session information to each corresponding standby node every second preset time interval, wherein the first preset time interval is smaller than the second preset time interval, the standby node of which the host node can definitely synchronize the self-session information is realized, so that the incremental session information and the full session information of the host node can be synchronized to the corresponding standby nodes, improves the efficiency of the synchronization of the session information, simultaneously considers the consistency of the session information of the standby node and the host node, therefore, the standby node can hold the whole session information of the same host node, and the standby node can completely replace the host node with the fault to work when replacing the host node with the fault.
In addition, in an implementation manner, the host node may further receive indication information sent by the corresponding standby node when detecting that any host node corresponding to the standby node fails, and based on the indication information, stop synchronizing the session information to the standby node.
The indication information is used for informing the standby node that the standby node is to be subjected to the main-standby switching.
Specifically, when the backup node corresponding to the host node detects that any host node corresponding to the backup node fails, for example, the host node crashes, at this time, the backup node may send, to the host node, indication information for notifying that the backup node is to perform the master-backup switching; the host node may stop synchronizing session information to the standby node after receiving the indication.
Certainly, at this time, the standby node can be switched to the host node and receives the session information in place of the host node with the fault, so that when the host node in the load balancing cluster has an abnormal condition such as a fault, the active-standby switching can be rapidly performed, and the switching which is not sensible to the user can be performed because the session information of the whole cluster is kept, the client does not need to be reconnected, and the additional overhead such as client retransmission is avoided.
In addition, if the host node returns to normal, the host node can be converted into a standby node to enter the working state again.
In addition, in an implementation manner, in this embodiment, the host node may further mark the synchronized session information with a first preset identifier, and mark the session information that is not synchronized with a second preset identifier.
Specifically, in this embodiment, session synchronization marks (i.e., a first preset mark and a second preset mark) may be added on the basis of the existing session table, and the information in the session table is classified by the session synchronization marks. The session information synchronized to the standby node may be marked by a first preset mark, and the session information not synchronized to the standby node may be marked by a second preset mark. For example, the first preset flag may be 1, the second preset flag may be 2, the session information that has been synchronized to the standby node is marked as 1, and the session information that has not been synchronized to the standby node is marked as 2.
It should be noted that the first preset flag and the second preset flag may be preset by an administrator, and are not specifically limited herein.
Therefore, the host node marks the synchronized session information through the first preset identification and marks the session information which is not synchronized through the second preset identification, so that the problem of repeated synchronization is avoided when the session information is synchronized, the efficiency of session information synchronization is improved, and the resource waste is avoided.
Fig. 3 shows another session information synchronization method provided by an embodiment of the present invention, which is applied to a standby node in a load balancing cluster, and the method includes the following steps:
step 302: and sending the session synchronization address to each host node corresponding to the standby node.
Specifically, before the session synchronization function in the load balancing cluster starts, the standby node may notify its session synchronization address to each corresponding host node, and at this time, each host node receives the session synchronization address sent by the standby node and starts the session synchronization function.
Because each standby node corresponds to at least one host node, when the standby node sends the session synchronization address to each host node corresponding to the standby node, the session synchronization address needs to be sent to each host node corresponding to the standby node.
It will be appreciated that the backup node corresponds to a host node that is in communication with the backup node.
Step 304: and receiving incremental session information and full session information sent by each host node.
The standby node receives incremental session information and full session information which are sent by each corresponding host node based on the session synchronization address of the standby node, wherein the incremental session information is sent by the host node based on the session synchronization address at intervals of a first preset time interval, and the full session information is sent by the host node based on the session synchronization address at intervals of a second preset time interval.
The incremental session information may refer to session information received by the host node in a first preset time interval, and the standby node receives the incremental session information sent by the host node at intervals of the first preset time interval, so that the efficiency of session synchronization is improved.
The full amount of session information may refer to all session information received by the host node. The standby node can receive the whole session information sent by the host node at intervals of a second preset time interval, so that the consistency of the session information between the host node and the standby node is ensured.
Optionally, the first preset time interval may be smaller than the second preset time interval, that is, the session information of the increment of the target host node may be received at a shorter time interval, and the session information of the total amount of the session information sent by the target host node may be received at a longer time interval, so that the standby node deletes the aged session information in time, and the efficiency of session synchronization is considered.
In the method for synchronizing session information provided in the embodiments of the present invention, the backup node sends the session synchronization address to each host node corresponding to the backup node, and receives incremental session information and full session information sent by each host node, where the incremental session information is sent by the host node at intervals of a first preset time interval based on the session synchronization address, and the full session information is sent by the host node at intervals of a second preset time interval based on the session synchronization address, so that the efficiency of session synchronization is improved, and the consistency of the session information between the host node and the backup node is ensured.
In an implementation manner, a standby node may further send indication information to each host node corresponding to the standby node when detecting that any host node corresponding to the standby node fails, where the indication information is used to notify the standby node that the standby node is to be subjected to active-standby switching; and the standby node is switched to be the host node and receives the session information for replacing the host node with the fault.
Specifically, when any host node corresponding to the standby node fails, for example, the host node crashes, the standby node may detect that the host node fails, and at this time, the standby node may send, to each corresponding host node, instruction information for notifying that the standby node is to perform the main/standby switching; the host node may stop synchronizing the session information to the standby node upon receiving the indication.
Certainly, at this time, the standby node can be switched to the host node and receive the session information in place of the host node with the fault, so that when the main node in the load balancing cluster has an abnormal condition such as a fault, the main node and the standby node can be quickly switched, and the switching which is not sensible to users can be realized because the session information of the whole cluster is kept, the client does not need to be reconnected, and the additional overhead such as client retransmission is avoided.
In addition, if the host node returns to normal, the host node can be converted into a standby node to enter the working state again.
Therefore, the utilization rate of hardware resources is improved, the problem of low utilization rate of the hardware resources in a session synchronization mode in the related technology is solved, main and standby switching can be rapidly performed when abnormal conditions such as halt and the like occur in a load balancing cluster, re-connection is not needed, extra expenses such as client retransmission and the like are avoided, and session synchronization efficiency and consistency of a main and standby node session table are considered through incremental synchronization and full synchronization modes on the basis of session synchronization.
It should be noted that, in the synchronization method applied to the session information of the host node in the load balancing cluster, the execution subject may be a synchronization apparatus for session information, or a control module in the synchronization apparatus for session information, configured to execute the synchronization method for session information. In the embodiment of the present application, a method for executing synchronization of session information by using a synchronization apparatus of session information is taken as an example, and a synchronization apparatus of session information provided in the embodiment of the present application is described.
Fig. 4 is a schematic structural diagram of a synchronization apparatus for session information of a host node according to an embodiment of the present invention. As shown in fig. 4, the session information synchronization apparatus 400 includes: a receiving module 410 and a synchronization module 420.
A receiving module 410, configured to receive session synchronization addresses sent by the backup nodes corresponding to the host node, and a synchronizing module 420, configured to synchronize, based on the session synchronization addresses, the received incremental session information to the corresponding backup nodes at intervals of a first preset time interval, and synchronize the received full session information to the corresponding backup nodes at intervals of a second preset time interval, where the first preset time interval is smaller than the second preset time interval.
In one implementation, the receiving module 410 is further configured to,
receiving indication information sent by a corresponding standby node when detecting that any host node corresponding to the standby node fails, wherein the indication information is used for informing the standby node that the standby node is to be subjected to main-standby switching; based on the indication information, stopping synchronizing the session information to the standby node.
In one implementation, the synchronization module 420 is further configured to,
and the host node marks the synchronized session information by adopting a first preset identifier and marks the non-synchronized session information by adopting a second preset identifier.
The device for synchronizing session information in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The synchronization device of the session information in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The synchronization apparatus for session information provided in this embodiment of the present application can implement each process implemented in the method embodiment of fig. 2, and is not described here again to avoid repetition.
It should be noted that, in the synchronization method for session information applied to the standby node in the load balancing cluster, the execution subject may be a synchronization device for session information, or a control module in the synchronization device for session information, which is used for executing the synchronization method for session information. In the embodiment of the present application, a method for executing synchronization of session information by using a synchronization apparatus of session information is taken as an example, and a synchronization apparatus of session information provided in the embodiment of the present application is described.
Fig. 5 is a schematic structural diagram of a synchronization apparatus for session information of a standby node according to an embodiment of the present invention. As shown in fig. 5, the session information synchronization apparatus 500 includes: a sending module 510 and a receiving module 520.
A sending module 510, configured to send the session synchronization address to each host node corresponding to the standby node; a receiving module 520, configured to receive incremental session information and full session information sent by each host node, where the incremental session information is sent by the host node at every first preset time interval based on the session synchronization address, and the full session information is sent by the host node at every second preset time interval based on the session synchronization address.
In an implementation manner, the sending module 520 is further configured to send, when it is detected that any host node corresponding to the standby node fails, indication information to each host node corresponding to the standby node, where the indication information is used to notify that the standby node is to perform active/standby switching; and the standby node is switched to be the host node and receives the session information for replacing the host node with the fault.
The device for synchronizing session information in the embodiment of the present application may be a device, or may be a component, an integrated circuit, or a chip in a terminal. The device can be mobile electronic equipment or non-mobile electronic equipment. By way of example, the mobile electronic device may be a mobile phone, a tablet computer, a notebook computer, a palm top computer, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook or a Personal Digital Assistant (PDA), and the like, and the non-mobile electronic device may be a server, a Network Attached Storage (NAS), a Personal Computer (PC), a Television (TV), a teller machine or a self-service machine, and the like, and the embodiments of the present application are not particularly limited.
The synchronization device of session information in the embodiment of the present application may be a device having an operating system. The operating system may be an Android (Android) operating system, an ios operating system, or other possible operating systems, and embodiments of the present application are not limited specifically.
The session information synchronization apparatus provided in this embodiment of the present application can implement each process implemented in the method embodiment of fig. 3, and is not described here again to avoid repetition.
Optionally, as shown in fig. 6, an electronic device 600 further provided in the embodiments of the present application includes a processor 601, a memory 602, where the memory 602 stores a program or instructions executable on the processor 601, and when the program or instructions are executed by the processor 601, the program or instructions implement: receiving session synchronization addresses sent by each standby node corresponding to the host node; based on the session synchronization address, synchronizing the received incremental session information to the corresponding standby nodes at intervals of a first preset time interval, and synchronizing the received full session information to the corresponding standby nodes at intervals of a second preset time interval, wherein the first preset time interval is smaller than the second preset time interval.
In one implementation, the method further comprises: receiving indication information sent by a corresponding standby node when detecting that any host node corresponding to the standby node fails, wherein the indication information is used for informing the standby node that the standby node is to be subjected to main-standby switching; based on the indication information, stopping synchronizing the session information to the standby node.
In one implementation, the method further comprises: and the host node marks the synchronized session information by adopting a first preset identifier and marks the non-synchronized session information by adopting a second preset identifier.
Alternatively, the program or instructions when executed by the processor 601 implement: sending the session synchronization address to each host node corresponding to the standby node; receiving incremental session information and full session information sent by each host node, wherein the incremental session information is sent by the host node at intervals of a first preset time interval based on the session synchronization address, and the full session information is sent by the host node at intervals of a second preset time interval based on the session synchronization address.
In one implementation, the method further comprises: when detecting that any host node corresponding to the standby node fails, sending indication information to each host node corresponding to the standby node, wherein the indication information is used for informing the standby node of standby-to-be-switched; and the standby node is switched to be the host node and receives the session information for replacing the host node with the fault.
For specific execution steps, reference may be made to each step of the above-described synchronization method for session information, and the same technical effect can be achieved.
It should be noted that the electronic device in the embodiment of the present application includes: a server, a terminal, or other device besides a terminal.
The above electronic device structure does not constitute a limitation of the electronic device, the electronic device may include more or less components than those shown, or some components may be combined, or different component arrangements, for example, the input Unit may include a Graphics Processing Unit (GPU) and a microphone, and the display Unit may configure the display panel in the form of a liquid crystal display, an organic light emitting diode, or the like. The user input unit includes at least one of a touch panel and other input devices. The touch panel is also referred to as a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which are not described in detail herein.
The memory may be used to store software programs as well as various data. The memory may mainly include a first storage area storing a program or an instruction and a second storage area storing data, wherein the first storage area may store an operating system, an application program or an instruction (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like. Further, the memory may include volatile memory or nonvolatile memory, or the memory may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. The volatile Memory may be a Random Access Memory (RAM), a Static Random Access Memory (Static RAM, SRAM), a Dynamic Random Access Memory (Dynamic RAM, DRAM), a Synchronous Dynamic Random Access Memory (Synchronous DRAM, SDRAM), a Double Data Rate Synchronous Dynamic Random Access Memory (Double Data Rate SDRAM, ddr SDRAM), an Enhanced Synchronous SDRAM (ESDRAM), a Synchronous Link DRAM (SLDRAM), and a Direct Memory bus RAM (DRRAM).
A processor may include one or more processing units; optionally, the processor integrates an application processor, which mainly handles operations related to the operating system, user interface, application programs, etc., and a modem processor, which mainly handles wireless communication signals, such as a baseband processor. It will be appreciated that the modem processor described above may not be integrated into the processor.
The embodiment of the present application further provides a readable storage medium, where a program or an instruction is stored on the readable storage medium, and when the program or the instruction is executed by a processor, the program or the instruction implements each process of the foregoing session information synchronization method embodiment, and can achieve the same technical effect, and in order to avoid repetition, details are not repeated here.
The processor is the processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and so on.
It should be noted that, in this document, 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 like elements in a process, method, article, or apparatus that comprises the element. Further, it should be noted that the scope of the methods and apparatus of the embodiments of the present application is not limited to performing the functions in the order illustrated or discussed, but may include performing the functions in a substantially simultaneous manner or in a reverse order based on the functions involved, e.g., the methods described may be performed in an order different than that described, and various steps may be added, omitted, or combined. In addition, features described with reference to certain examples may be combined in other examples.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present application may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal (such as a mobile phone, a computer, a server, an air conditioner, or a network device) to execute the method according to the embodiments of the present application.
While the present embodiments have been described with reference to the accompanying drawings, it is to be understood that the invention is not limited to the precise embodiments described above, which are meant to be illustrative and not restrictive, and that various changes may be made therein by those skilled in the art without departing from the spirit and scope of the invention as defined by the appended claims.

Claims (10)

1. A system for synchronizing session information, comprising:
at least one load balancing cluster, wherein the at least one load balancing cluster is formed by node groups for load balancing, each load balancing cluster comprises at least two host nodes and at least one standby node, and the number of the standby nodes in each load balancing cluster is less than that of the host nodes;
in each load balancing cluster, each backup node corresponds to at least one host node, each host node corresponds to at least one backup node, and each host node is configured to synchronize the received session information to the corresponding backup nodes.
2. A method for synchronizing session information, applied to the host node in the load balancing cluster according to claim 1, comprising:
receiving session synchronization addresses sent by each standby node corresponding to the host node;
based on the session synchronization address, synchronizing the received incremental session information to the corresponding standby nodes at intervals of a first preset time interval, and synchronizing the received full session information to the corresponding standby nodes at intervals of a second preset time interval, wherein the first preset time interval is smaller than the second preset time interval.
3. The synchronization method of claim 2, further comprising:
receiving indication information sent by a corresponding standby node when detecting that any host node corresponding to the standby node fails, wherein the indication information is used for informing the standby node that the standby node is to be subjected to main-standby switching;
based on the indication information, stopping synchronizing the session information to the standby node.
4. The synchronization method of claim 2, further comprising:
and the host node marks the synchronized session information by adopting a first preset identifier and marks the non-synchronized session information by adopting a second preset identifier.
5. A method for synchronizing session information, applied to the standby node in the load balancing cluster according to claim 1, comprising:
sending the session synchronization address to each host node corresponding to the standby node;
receiving incremental session information and full session information sent by each host node, wherein the incremental session information is sent by the host node at intervals of a first preset time interval based on the session synchronization address, and the full session information is sent by the host node at intervals of a second preset time interval based on the session synchronization address.
6. The synchronization method of claim 5, further comprising:
when detecting that any host node corresponding to the standby node fails, sending indication information to each host node corresponding to the standby node, wherein the indication information is used for informing the standby node of standby-to-standby switching;
and the standby node is switched to be the host node and receives the session information for replacing the host node with the fault.
7. A session information synchronization apparatus applied to the host node in the load balancing cluster according to claim 1, comprising:
a receiving module, configured to receive session synchronization addresses sent by each standby node corresponding to the host node;
and the synchronization module is used for synchronizing the received incremental session information to each corresponding standby node every other first preset time interval and synchronizing the received full session information to each corresponding standby node every other second preset time interval based on the session synchronization address, wherein the first preset time interval is smaller than the second preset time interval.
8. A session information synchronization apparatus applied to the standby node in the load balancing cluster according to claim 1, comprising:
the sending module is used for sending the session synchronization address to each host node corresponding to the standby node;
the receiving module is used for receiving incremental session information and full session information sent by each host node, wherein the incremental session information is sent by the host node at intervals of a first preset time interval based on the session synchronization address, and the full session information is sent by the host node at intervals of a second preset time interval based on the session synchronization address.
9. An electronic device comprising a processor, a memory and a program or instructions stored on the memory and executable on the processor, the program or instructions, when executed by the processor, implementing the steps of the method for synchronizing session information according to any one of claims 2-4 or implementing the steps of the method for synchronizing session information according to any one of claims 5-6.
10. A readable storage medium, characterized in that a program or instructions are stored thereon, which program or instructions, when executed by a processor, implement the steps of the method for synchronizing session information according to any one of claims 2-4, or implement the steps of the method for synchronizing session information according to any one of claims 5-6.
CN202210281644.7A 2022-03-22 2022-03-22 Session information synchronization system, method, device, electronic equipment and storage medium Pending CN114500547A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210281644.7A CN114500547A (en) 2022-03-22 2022-03-22 Session information synchronization system, method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210281644.7A CN114500547A (en) 2022-03-22 2022-03-22 Session information synchronization system, method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114500547A true CN114500547A (en) 2022-05-13

Family

ID=81489130

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210281644.7A Pending CN114500547A (en) 2022-03-22 2022-03-22 Session information synchronization system, method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114500547A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882981A (en) * 2012-10-19 2013-01-16 南京邮电大学 Load balancing method of node task under equivalence structural cloud platform
CN110417842A (en) * 2018-04-28 2019-11-05 北京京东尚科信息技术有限公司 Fault handling method and device for gateway server
CN110647580A (en) * 2019-09-05 2020-01-03 南京邮电大学 Distributed container cluster mirror image management main node, slave node, system and method
CN111625592A (en) * 2019-02-28 2020-09-04 北京京东尚科信息技术有限公司 Load balancing method and device for distributed database
CN112671928A (en) * 2020-12-31 2021-04-16 北京天融信网络安全技术有限公司 Equipment centralized management architecture, load balancing method, electronic equipment and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882981A (en) * 2012-10-19 2013-01-16 南京邮电大学 Load balancing method of node task under equivalence structural cloud platform
CN110417842A (en) * 2018-04-28 2019-11-05 北京京东尚科信息技术有限公司 Fault handling method and device for gateway server
CN111625592A (en) * 2019-02-28 2020-09-04 北京京东尚科信息技术有限公司 Load balancing method and device for distributed database
CN110647580A (en) * 2019-09-05 2020-01-03 南京邮电大学 Distributed container cluster mirror image management main node, slave node, system and method
CN112671928A (en) * 2020-12-31 2021-04-16 北京天融信网络安全技术有限公司 Equipment centralized management architecture, load balancing method, electronic equipment and storage medium

Similar Documents

Publication Publication Date Title
CN106331098B (en) Server cluster system
US9639437B2 (en) Techniques to manage non-disruptive SAN availability in a partitioned cluster
EP2648114B1 (en) Method, system, token conreoller and memory database for implementing distribute-type main memory database system
CN102355369B (en) Virtual clustered system as well as processing method and processing device thereof
CN106664216B (en) VNF switching method and device
CN108200124B (en) High-availability application program architecture and construction method
CN105099793B (en) Hot spare method, apparatus and system
US20210014106A1 (en) High availability on a distributed networking platform
CN107666493B (en) Database configuration method and equipment thereof
CN105471995A (en) High-availability implementation method for large-scale Web server cluster based on SOA
CN105069152B (en) data processing method and device
CN104158707A (en) Method and device of detecting and processing brain split in cluster
WO2021164385A1 (en) Virtualization method, apparatus and device for internet of things device system, and storage medium
CN110391940A (en) Response method, device, system, equipment and the storage medium of address of service
CN104753987B (en) A kind of distributed conversation management method and system
CN105553682A (en) Event notification method and event notification system
CN111865632A (en) Switching method of distributed data storage cluster and switching instruction sending method and device
CN111541762A (en) Data processing method, management server, device and storage medium
CN105872048B (en) Control method and electronic equipment
CN102571311B (en) Master-slave switching communication system and master-slave switching communication method
CN111835684B (en) Network isolation monitoring method and system for haproxy equipment
CN112073499A (en) Dynamic service method of multi-machine type cloud physical server
CN101567804B (en) Method, equipment and system for realizing protection of system anomaly
CN114500547A (en) Session information synchronization system, method, device, electronic equipment and storage medium
CN107948002B (en) AP access control method and device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230307

Address after: Room 501-502, 5/F, Sina Headquarters Scientific Research Building, Block N-1 and N-2, Zhongguancun Software Park, Dongbei Wangxi Road, Haidian District, Beijing, 100193

Applicant after: Sina Technology (China) Co.,Ltd.

Address before: 100080 7th floor, Sina headquarters scientific research building, plot n-1 and n-2, Zhongguancun Software Park Phase II (West Expansion), Dongbeiwang West Road, Haidian District, Beijing

Applicant before: Sina.com Technology (China) Co.,Ltd.