CN114500547B - System, method, device, electronic equipment and storage medium for synchronizing session information - Google Patents
System, method, device, electronic equipment and storage medium for synchronizing session information Download PDFInfo
- Publication number
- CN114500547B CN114500547B CN202210281644.7A CN202210281644A CN114500547B CN 114500547 B CN114500547 B CN 114500547B CN 202210281644 A CN202210281644 A CN 202210281644A CN 114500547 B CN114500547 B CN 114500547B
- Authority
- CN
- China
- Prior art keywords
- node
- session information
- host
- standby
- load balancing
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 66
- 230000001360 synchronised effect Effects 0.000 claims description 26
- 230000015654 memory Effects 0.000 claims description 22
- 230000006870 function Effects 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 230000002159 abnormal effect Effects 0.000 description 3
- 238000004891 communication Methods 0.000 description 3
- 101100012902 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) FIG2 gene Proteins 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003287 optical effect Effects 0.000 description 2
- 239000002699 waste material Substances 0.000 description 2
- 101001121408 Homo sapiens L-amino-acid oxidase Proteins 0.000 description 1
- 101000827703 Homo sapiens Polyphosphoinositide phosphatase Proteins 0.000 description 1
- 102100026388 L-amino-acid oxidase Human genes 0.000 description 1
- 102100023591 Polyphosphoinositide phosphatase Human genes 0.000 description 1
- 101100233916 Saccharomyces cerevisiae (strain ATCC 204508 / S288c) KAR5 gene Proteins 0.000 description 1
- 239000004973 liquid crystal related substance Substances 0.000 description 1
- 230000003068 static effect Effects 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/01—Protocols
- H04L67/10—Protocols in which an application is distributed across nodes in the network
- H04L67/1095—Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer And Data Communications (AREA)
Abstract
Description
技术领域Technical Field
本申请属于计算机网络技术领域,具体涉及一种会话信息的同步系统、方法、装置、电子设备及存储介质。The present application belongs to the field of computer network technology, and specifically relates to a session information synchronization system, method, device, electronic device and storage medium.
背景技术Background Art
随着互联网流量的日益增加,业务场景及系统架构日益复杂,服务器规模也越来越庞大。而负载均衡(Load Balancer,LB)则是在这种大流量场景下依据某些策略将接入流量均匀的分发到后端的业务服务集群上,既提高了系统服务能力,同时也增强了服务的可用性。服务器负载均衡(Server Load Balancer,SLB),对接入流量通过一定的调度算法,实现流量到后端业务服务器(Real Server,RS)的负载均衡。SLB通过维护会话表的方式,保证相同会话的流量经过SLB集群后可以被转发到同一台后端RS设备。在SLB集群中可以通过会话同步的方式实现集群间节点共享,或集群节点各自持有当前节点的会话表。With the increasing traffic on the Internet, business scenarios and system architectures are becoming increasingly complex, and the scale of servers is also growing. Load balancing (LB) evenly distributes access traffic to the backend business service cluster based on certain strategies in such a large traffic scenario, which not only improves the system service capabilities, but also enhances the availability of services. Server Load Balancer (SLB) uses a certain scheduling algorithm for access traffic to achieve load balancing of traffic to the backend business server (Real Server, RS). SLB maintains the session table to ensure that the traffic of the same session can be forwarded to the same backend RS device after passing through the SLB cluster. In the SLB cluster, node sharing between clusters can be achieved through session synchronization, or cluster nodes can each hold the session table of the current node.
但是,目前的会话同步方式资源利用率较低。However, the current session synchronization method has low resource utilization.
发明内容Summary of the invention
本申请实施例提供了一种会话信息的同步系统、方法、装置、电子设备及存储介质,能够解决会话同步时资源利用率低的问题,能够有效利用资源。The embodiments of the present application provide a system, method, device, electronic device and storage medium for synchronizing session information, which can solve the problem of low resource utilization during session synchronization and can effectively utilize resources.
第一方面,本申请实施例提供了一种会话信息的同步系统,该系统包括:至少一个负载均衡集群,其中,所述至少一个负载均衡集群由用于负载均衡的节点分组形成,每个负载均衡集群包括至少两个主机节点和至少一个备用节点,所述每个负载均衡集群中备用节点的数量小于主机节点的数量;其中,在每个所述负载均衡集群中,每个备用节点对应至少一个主机节点,每个主机节点对应至少一个备用节点,所述每个主机节点用于将接收到的会话信息同步至所对应的各备用节点。In a first aspect, an embodiment of the present application provides a session information synchronization system, the system comprising: at least one load balancing cluster, wherein the at least one load balancing cluster is formed by a node grouping for load balancing, each load balancing cluster comprises at least two host nodes and at least one backup node, and the number of backup nodes in each load balancing cluster is less than the number of host nodes; wherein, in each of the load balancing clusters, each backup node corresponds to at least one host node, and each host node corresponds to at least one backup node, and each host node is used to synchronize the received session information to the corresponding backup nodes.
第二方面,本申请实施例提供了一种会话信息的同步方法,应用于负载均衡集群中的主机节点,该方法包括:接收所述主机节点所对应的各备用节点发送的会话同步地址;基于所述会话同步地址,每隔第一预设时间间隔将接收到的增量的会话信息同步至所对应的各备用节点,并每隔第二预设时间间隔将接收到的全量的会话信息同步至所对应的各备用节点,其中所述第一预设时间间隔小于所述第二预设时间间隔。In the second aspect, an embodiment of the present application provides a method for synchronizing session information, which is applied to a host node in a load balancing cluster, the method comprising: receiving a session synchronization address sent by each backup node corresponding to the host node; based on the session synchronization address, synchronizing the received incremental session information to each corresponding backup node at every first preset time interval, and synchronizing the received full session information to each corresponding backup node at every second preset time interval, wherein the first preset time interval is less than the second preset time interval.
第三方面,本申请实施例提供了一种会话信息的同步方法,应用于负载均衡集群中的备用节点,该方法包括:将会话同步地址发送至所述备用节点对应的各主机节点;接收各主机节点发送的增量的会话信息和全量的会话信息,其中,所述增量的会话信息由主机节点基于所述会话同步地址每隔第一预设时间间隔发送,所述全量的会话信息由主机节点基于所述会话同步地址每隔第二预设时间间隔发送。In the third aspect, an embodiment of the present application provides a method for synchronizing session information, which is applied to a standby node in a load balancing cluster, the method comprising: sending a 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 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.
第四方面,本申请实施例提供了一种会话信息的同步装置,应用于负载均衡集群中的主机节点,该装置包括:接收模块,用于接收所述主机节点对应的各备用节点发送的会话同步地址;同步模块,用于基于所述会话同步地址,每隔第一预设时间间隔将接收到的增量的会话信息同步至所对应的各备用节点,并每隔第二预设时间间隔将接收到的全量的会话信息同步至所对应的各备用节点,其中所述第一预设时间间隔小于所述第二预设时间间隔。In a fourth aspect, an embodiment of the present application provides a session information synchronization device, which is applied to a host node in a load balancing cluster, and the device includes: a receiving module, which is used to receive a session synchronization address sent by each backup node corresponding to the host node; a synchronization module, which is used to synchronize the received incremental session information to the corresponding backup nodes at every first preset time interval based on the session synchronization address, and synchronize the received full session information to the corresponding backup nodes at every second preset time interval, wherein the first preset time interval is less than the second preset time interval.
第五方面,本申请实施例提供了一种会话信息的同步装置,应用于负载均衡集群中的备用节点,该装置包括:发送模块,用于将会话同步地址发送至所述备用节点对应的各主机节点;接收模块,用于接收各主机节点发送的增量的会话信息和全量的会话信息,其中,所述增量的会话信息由主机节点基于所述会话同步地址每隔第一预设时间间隔发送,所述全量的会话信息由主机节点基于所述会话同步地址每隔第二预设时间间隔发送。In the fifth aspect, an embodiment of the present application provides a session information synchronization device, which is applied to a standby node in a load balancing cluster, and the device includes: a sending module, used to send a session synchronization address to each host node corresponding to the standby node; a receiving module, used to receive incremental session information and full session information sent by each host 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.
第六方面,本申请实施例提供了一种电子设备,该电子设备包括处理器、存储器及存储在所述存储器上并可在所述处理器上运行的程序或指令,所述程序或指令被所述处理器执行时实现如第二方面所述的方法的步骤,或者实现如第三方面所述的方法的步骤。In a sixth aspect, an embodiment of the present application provides an electronic device, comprising a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the second aspect, or implements the steps of the method described in the third aspect.
第七方面,本申请实施例提供了一种可读存储介质,所述可读存储介质上存储程序或指令,所述程序或指令被处理器执行时实现如第二方面所述的方法的步骤,或者实现如第三方面所述的方法的步骤。In the seventh aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, the steps of the method described in the second aspect are implemented, or the steps of the method described in the third aspect are implemented.
在本申请实施例中,会话信息的同步系统包括至少一个负载均衡集群,其中,至少一个负载均衡集群由用于负载均衡的节点分组形成,每个负载均衡集群包括至少两个主机节点和至少一个备用节点,每个负载均衡集群中备用节点的数量小于主机节点的数量;其中,在每个负载均衡集群中,每个备用节点对应至少一个主机节点,每个主机节点对应至少一个备用节点,每个主机节点用于将接收到的会话信息同步至所对应的各备用节点,实现了负载均衡集群中较多的主机节点对应少量的备用节点,这相较于相关技术中一个主机节点对应一个备用节点的情况,提升了硬件资源的利用率,避免了相关技术会话同步方式中硬件资源利用率低的问题。In an embodiment of the present application, a system for synchronizing session information includes at least one load balancing cluster, wherein at least one load balancing cluster is formed by a node grouping for load balancing, each load balancing cluster includes 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; wherein, in each load balancing cluster, each standby node corresponds to at least one host node, and each host node corresponds to at least one standby node, and each host node is used to synchronize the received session information to the corresponding standby nodes, thereby achieving a situation in which a large number of host nodes in the load balancing cluster correspond to a small number of standby nodes. Compared with the situation in which one host node corresponds to one standby node in the related technology, this improves the utilization rate of hardware resources and avoids the problem of low utilization rate of hardware resources in the session synchronization method of the related technology.
附图说明BRIEF DESCRIPTION OF THE DRAWINGS
图1是本申请实施例提供的一种会话信息的同步系统的结构示意图;FIG1 is a schematic diagram of the structure of a session information synchronization system provided in an embodiment of the present application;
图2是本申请实施例提供的一种会话信息的同步方法的流程示意图;FIG2 is a flow chart of a method for synchronizing session information provided in an embodiment of the present application;
图3是本申请实施例提供的另一种会话信息的同步方法的流程示意图;3 is a flow chart of another method for synchronizing session information provided in an embodiment of the present application;
图4是本申请实施例提供的一种会话信息的同步装置的结构示意图;FIG4 is a schematic diagram of the structure of a session information synchronization device provided in an embodiment of the present application;
图5是本申请实施例提供的另一种会话信息的同步装置的结构示意图;5 is a schematic diagram of the structure of another apparatus for synchronizing session information provided in an embodiment of the present application;
图6是本申请实施例提供的一种电子设备的结构示意图。FIG. 6 is a schematic diagram of the structure of an electronic device provided in an embodiment of the present application.
具体实施方式DETAILED DESCRIPTION
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
本申请的说明书和权利要求书中的术语“第一”、“第二”等是用于区别类似的对象,而不用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便本申请的实施例能够以除了在这里图示或描述的那些以外的顺序实施,且“第一”、“第二”等所区分的对象通常为一类,并不限定对象的个数,例如第一对象可以是一个,也可以是多个。此外,说明书以及权利要求中“和/或”表示所连接对象的至少其中之一,字符“/”,一般表示前后关联对象是一种“或”的关系。The terms "first", "second", etc. in the specification and claims of the present application are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present application can be implemented in an order other than those illustrated or described here, and the objects distinguished by "first", "second", etc. are generally of one type, and the number of objects is not limited. For example, the first object can be one or more. In addition, "and/or" in the specification and claims represents at least one of the connected objects, and the character "/" generally indicates that the objects associated with each other are in an "or" relationship.
在会话同步的相关技术中,在主备模式下通常是将一主一备作为一个集群分组,在分组内进行会话同步,主机和备机都持有该组内全量的会话信息,此种方式下每台主机都对应有一台冗余备机,存在硬件资源浪费的问题。在非主备模式下是将集群内的节点进行分组,在组内进行会话同步,每台主机持有组内全部主机的会话信息,单机的会话能力会受到组内主机数量的限制,单机的处理效率较低。In the related technologies of session synchronization, in the active-standby mode, one active node and one standby node are usually grouped as a cluster, and session synchronization is performed within the group. Both the active node and the standby node hold the full amount of session information in the group. In this way, each host corresponds to a redundant standby node, which wastes hardware resources. In the non-active-standby mode, the nodes in the cluster are grouped, and session synchronization is performed within the group. Each host holds the session information of all hosts in the group. The session capacity of a single machine is limited by the number of hosts in the group, and the processing efficiency of a single machine is low.
针对此本申请将用于负载均衡的节点分为多个负载均衡集群,在一个负载均衡集群中包括至少两个主机节点和至少一个备用节点,且备用节点的数量小于主机节点的数量,即主机节点与备用节点之间的数量为多对1的关系,该种分组方式提高了硬件资源的利用率,且同时保证了单机的处理效率。To this end, the present application divides the nodes used for load balancing into multiple load balancing clusters. A load balancing cluster includes at least two host nodes and at least one backup node, and the number of backup nodes is less than the number of host nodes, that is, the number between host nodes and backup nodes is a many-to-1 relationship. This grouping method improves the utilization rate of hardware resources and at the same time ensures the processing efficiency of a single machine.
下面结合附图,通过具体的实施例及其应用场景对本申请实施例提供的一种会话信息的同步系统、方法、装置、电子设备及存储介质进行详细地说明。In conjunction with the accompanying drawings, a session information synchronization system, method, device, electronic device and storage medium provided by the embodiments of the present application are described in detail through specific embodiments and application scenarios.
其中,该会话信息的同步系统包括:至少一个负载均衡集群,其中,所述至少一个负载均衡集群由用于负载均衡的节点分组形成,每个负载均衡集群包括至少两个主机节点和至少一个备用节点,所述每个负载均衡集群中备用节点的数量小于主机节点的数量;The session information synchronization system includes: at least one load balancing cluster, wherein the at least one load balancing cluster is formed by a node grouping for load balancing, each load balancing cluster includes 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 of the load balancing clusters, each standby node corresponds to at least one host node, and each host node corresponds to at least one standby node. Each host node is used to synchronize received session information to the corresponding standby nodes.
可选的,可以是每个备用节点对应至少两个主机节点,每个主机节点对应一个备用节点。Optionally, each standby node may correspond to at least two host nodes, and each host node may correspond to one standby node.
如图1所示,在此以一个负载集群中包括两个主机节点和一个备用节点为例进行说明。例如,假设负载均衡集群110包括两个主机节点1101和一个备用节点1102。两个主机节点1101用于发送会话信息至同一个负载均衡集群110中的备用节点1102,备用节点1102用于接收和存储同一个负载均衡集群中的主机节点1101发送的会话信息,并用于替换出现故障的主机节点1101。在负载均衡集群110中,每个备用节点1102对应至少两个主机节点1101,每个主机节点1101对应一个备用节点1102,这相较于相关技术中一个主机节点对应一个备用节点的情况,提升了硬件资源的利用率。As shown in Figure 1, a load balancing cluster including two host nodes and one standby node is used as an example for explanation. For example, assume that the load balancing cluster 110 includes two host nodes 1101 and one standby node 1102. The two host nodes 1101 are used to send session information to the standby node 1102 in the same load balancing cluster 110, and the standby node 1102 is used to receive and store the session information sent by the host node 1101 in the same load balancing cluster, and to replace the failed host node 1101. In the load balancing cluster 110, each standby node 1102 corresponds to at least two host nodes 1101, and each host node 1101 corresponds to one standby node 1102, which improves the utilization rate of hardware resources compared to the situation in the related art where one host node corresponds to one standby node.
此外,在同一个负载均衡集群110中,主机节点1101可以将全量的会话信息和增量的会话信息同步至备用节点1102,主机节点1101之间不进行会话信息的同步,并且,当有主机节点1101出现故障的情况下,储存有该主机节点全量会话信息的备用节点1102替换出现故障的主机节点1101进行工作。In addition, in the same load balancing cluster 110, the host node 1101 can synchronize the full session information and the incremental session information to the backup node 1102. The host nodes 1101 do not synchronize the session information with each other. Moreover, when a host node 1101 fails, the backup node 1102 storing the full session information of the host node replaces the failed host node 1101 to work.
这样,实现了负载均衡集群中较多的主机节点对应少量的备用节点,这相较于相关技术中一个主机节点对应一个备用节点的情况,提升了硬件资源的利用率,避免了相关技术会话同步方式中硬件资源利用率低的问题,并且,可以在负载均衡集群中的主机节点出现故障的情况下,能够迅速进行主备切换,并且不需要重新建立连接,节约了资源,避免了资源的额外开销。In this way, a small number of backup nodes are matched with a large number of host nodes in the load balancing cluster. Compared with the situation in the related technology where one host node corresponds to one backup node, this improves the utilization rate of hardware resources and avoids the problem of low utilization rate of hardware resources in the session synchronization method of the related technology. In addition, when a host node in the load balancing cluster fails, the active-standby switching can be performed quickly without the need to re-establish the connection, thus saving resources and avoiding additional resource overhead.
图2示出本发明的一个实施例提供的一种会话信息的同步方法,应用于负载均衡集群中的主机节点,该方法包括如下步骤:FIG2 shows a method for synchronizing session information provided by an embodiment of the present invention, which is applied to a host node in a load balancing cluster. The method comprises the following steps:
步骤202:接收所述主机节点所对应的各备用节点发送的会话同步地址。Step 202: Receive 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 each corresponding host node of its own session synchronization address, and at this time each host node receives the session synchronization address sent by the standby node.
由于每个主机节点对应至少一个备用节点,主机节点接收所对应的备用节点发送的会话同步地址时,需要接收所对应的每个备用节点所发送的会话同步地址。Since 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, it needs to receive the session synchronization address sent by each corresponding standby node.
可以理解的是,主机节点所对应的备用节点为,与主机节点建立通信的备用节点。It can be understood that the standby node corresponding to the host node is the standby node that establishes communication with the host node.
步骤204:基于所述会话同步地址,每隔第一预设时间间隔将接收到的增量的会话信息同步至所对应的各备用节点,并每隔第二预设时间间隔将接收到的全量的会话信息同步至所对应的各备用节点。Step 204: Based on the session synchronization address, synchronize the received incremental session information to the corresponding backup nodes at every first preset time interval, and synchronize the received full session information to the corresponding backup nodes at every second preset time interval.
其中所述第一预设时间间隔小于所述第二预设时间间隔。The first preset time interval is smaller than the second preset time interval.
具体的,主机节点采用等价路由及哈希的方案等价接收会话信息,主机节点基于接收的各备用节点的会话同步地址,开启会话同步功能,基于该会话同步地址,将接收到的会话信息同步至对应的各备用节点。Specifically, the host node uses an equal-cost routing and hashing scheme to equally receive session information. The host node starts a session synchronization function based on the received session synchronization addresses of each backup node, and synchronizes the received session information to the corresponding backup nodes based on the session synchronization address.
需要说明的是,主机节点之间并不进行会话同步。It should be noted that session synchronization is not performed between host nodes.
增量的会话信息可以是指在第一预设时间间隔内主机节点所接收到的会话信息。主机节点每隔第一预设时间间隔将自身增量的会话信息同步至对应的各备用节点,提高了会话同步的效率。The incremental session information may refer to the session information received by the host node within the first preset time interval. The host node synchronizes its own incremental session information to the corresponding standby nodes every first preset time interval, thereby improving the efficiency of session synchronization.
此外,全量的会话信息可以是指主机节点所接收到的所有会话信息。主机节点可以每隔第二预设时间间隔将自身全量的会话信息同步至对应的各备用节点,这保证了主机节点与对应的备用节点之间的会话信息的一致性。In addition, the full amount of session information may refer to all session information received by the host node. The host node may synchronize its full amount of session information to the corresponding backup nodes at every second preset time interval, which ensures the consistency of session information between the host node and the corresponding backup nodes.
可选的,第一预设时间间隔可以小于第二预设时间间隔,即可以间隔较小时间进行增量会话信息的同步,并间隔较长时间进行全量会话信息的同步,以便备用节点将老化的会话信息及时删除,并兼顾会话同步的效率以及主备节点会话的一致性。Optionally, the first preset time interval may be smaller than the second preset time interval, that is, incremental session information may be synchronized at shorter intervals and full session information may be synchronized at longer intervals, so that the standby node may delete aged session information in a timely manner and take into account both the efficiency of session synchronization and the consistency of sessions between the primary and standby nodes.
这样,主机节点通过每隔第一预设时间间隔将接收到的增量的会话信息同步至所对应的各备用节点,并每隔第二预设时间间隔将接收到的全量的会话信息同步至所对应的各备用节点,使得主机节点的增量的会话信息和全量的会话信息都可以进行会话同步,在提升了会话信息同步的效率的同时,兼顾了备用节点与主机节点的会话信息一致性。In this way, the host node synchronizes the received incremental session information to the corresponding backup nodes at every first preset time interval, and synchronizes the received full session information to the corresponding backup nodes at every second preset time interval, so that both the incremental session information and the full session information of the host node can be synchronized, which improves the efficiency of session information synchronization while taking into account the consistency of session information between the backup node and the host node.
本发明实施例提供的会话信息的同步方法,通过接收主机节点所对应的各备用节点发送的会话同步地址;基于会话同步地址,每隔第一预设时间间隔将接收到的增量的会话信息同步至所对应的各备用节点,并每隔第二预设时间间隔将接收到的全量的会话信息同步至所对应的各备用节点,其中第一预设时间间隔小于第二预设时间间隔,实现了主机节点能够明确同步了自身会话信息的备用节点,使得主机节点的增量的会话信息和全量的会话信息都可以同步至所对应的各备用节点,在提升了会话信息同步的效率的同时,兼顾了备用节点与主机节点的会话信息一致性,从而使得备用节点持有同一主机节点的全量的会话信息,使得备用节点在替换发生故障的主机节点时,能够完全替换发生故障的主机节点进行工作。The method for synchronizing session information provided by the embodiment of the present invention receives session synchronization addresses sent by each backup node corresponding to the host node; based on the session synchronization address, synchronizes the received incremental session information to each corresponding backup node at every first preset time interval, and synchronizes the received full session information to each corresponding backup node at every second preset time interval, wherein the first preset time interval is less than the second preset time interval, so that the host node can clearly synchronize the backup node of its own session information, so that the incremental session information and the full session information of the host node can be synchronized to each corresponding backup node, while improving the efficiency of session information synchronization, taking into account the consistency of session information between the backup node and the host node, so that the backup node holds the full session information of the same host node, so that when the backup node replaces the failed host node, it can completely replace the failed host node to work.
此外,在一种实现方式中,主机节点还可以接收所对应的备用节点在检测到该备用节点所对应的任意主机节点发生故障时所发送的指示信息,并基于所述指示信息,停止将所述会话信息同步至所述备用节点。In addition, in one implementation, the host node may also receive indication information sent by the corresponding backup node when detecting that any host node corresponding to the backup node fails, and based on the indication information, stop synchronizing the session information to the backup node.
其中,所述指示信息用于通知本备用节点待进行主备切换。The indication information is used to notify the standby node to perform active/standby switching.
具体的,在主机节点所对应的备用节点检测到该备用节点所对应的任意主机节点发生故障时,例如主机节点死机,此时备用节点可以向主机节点发送用于通知本备用节点待进行主备切换的指示信息;主机节点接收该指示信息后,可以停止将会话信息同步至该备用节点。Specifically, when the backup node corresponding to the host node detects that any host node corresponding to the backup node has a fault, such as the host node crashes, the backup node can send an indication message to the host node to notify the backup node to perform a master-slave switch; after the host node receives the indication message, it can stop synchronizing the session information to the backup node.
当然,此时备用节点可以切换为主机节点,并接替发生故障的主机节点接收会话信息,这实现了负载均衡集群中的主机节点出现故障等异常情况时,能够迅速进行主备切换,且因其保有集群全量的会话信息,能够做到对用户无感的切换,客户端无需进行重连,避免了客户端重传等额外开销。Of course, at this time, the standby node can be switched to the host node and take over the failed host node to receive session information. This enables rapid master-slave switching when abnormal situations such as failures occur in the host node in the load balancing cluster. And because it retains the full amount of session information in the cluster, it can achieve user-imperceptible switching, and the client does not need to reconnect, avoiding additional overhead such as client retransmission.
此外,若主机节点恢复正常,则可以转换为备用节点重新进入工作状态。In addition, if the host node returns to normal, it can be converted to a standby node and re-enter the working state.
另外,在一种实现方式中,在本实施例中主机节点还可以采用第一预设标识对已进行同步的会话信息进行标记,并采用第二预设标识对未进行同步的会话信息进行标记。In addition, in an implementation manner, in this embodiment, the host node may also use a first preset identifier to mark the synchronized session information, and use a second preset identifier to mark the unsynchronized session information.
具体的,本实施例可以在现有会话表的基础上增加会话同步标记(即第一预设标识和第二预设标识),通过会话同步标记对会话表中的信息进行分类。其中,可以采用第一预设标记对已经同步到备用节点的会话信息进行标记,采用第二预设标记对未同步到备用节点的会话信息进行标记。例如,第一预设标记可以为1,第二预设标记为2,已经同步到备用节点的会话信息标记为1,未同步到备用节点的会话信息标记为2。Specifically, this embodiment can add a session synchronization mark (i.e., a first preset mark and a second preset mark) on the basis of the existing session table, and classify the information in the session table by the session synchronization mark. The first preset mark can be used to mark the session information that has been synchronized to the standby node, and the second preset mark can be used to mark the session information that has not been synchronized to the standby node. For example, the first preset mark can be 1, the second preset mark can 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 mark and the second preset mark can be preset by an administrator, and are not specifically limited here.
这样主机节点通过第一预设标识对已进行同步的会话信息进行标记,并通过第二预设标识对未进行同步的会话信息进行标记,使得会话信息同步时,避免了出现重复同步的问题,提升了会话信息同步的效率,避免了资源浪费。In this way, the host node marks the synchronized session information with the first preset identifier, and marks the unsynchronized session information with the second preset identifier, so that when the session information is synchronized, the problem of repeated synchronization is avoided, the efficiency of session information synchronization is improved, and resource waste is avoided.
图3示出本发明的一个实施例提供的另一种会话信息的同步方法,应用于负载均衡集群中的备用节点,该方法包括如下步骤:FIG3 shows another method for synchronizing session information provided by an embodiment of the present invention, which is applied to a standby node in a load balancing cluster. The method comprises the following steps:
步骤302:将会话同步地址发送至所述备用节点对应的各主机节点。Step 302: Send 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 each corresponding host node of its own session synchronization address. At this time, each host node receives the session synchronization address sent by the standby node and starts the session synchronization function.
由于每个备用节点对应至少一个主机节点,备用节点将会话同步地址发送至所述备用节点对应的各主机节点时,需要将会话同步地址发送至所述备用节点对应的每个主机节点。Since 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 can be understood that the host node corresponding to the standby node is the host node that establishes communication with the standby node.
步骤304:接收各主机节点发送的增量的会话信息和全量的会话信息。Step 304: Receive the incremental session information and the full session information sent by each host node.
备用节点接收所对应的各主机节点基于备用节点的会话同步地址发送的增量的会话信息和全量的会话信息,其中,增量的会话信息由主机节点基于会话同步地址每隔第一预设时间间隔发送,全量的会话信息由主机节点基于会话同步地址每隔第二预设时间间隔发送。The backup node receives incremental session information and full session information sent by the corresponding host nodes based on the session synchronization address of the backup node, wherein the incremental session information is sent by the host node based on the session synchronization address at every first preset time interval, and the full session information is sent by the host node based on the session synchronization address at every second preset time interval.
增量的会话信息可以是指在第一预设时间间隔内主机节点所接收到的会话信息,备用节点每隔第一预设时间间隔,接收主机节点发送的自身增量的会话信息,提高了会话同步的效率。The incremental session information may refer to the session information received by the host node within a first preset time interval. The standby node receives its own incremental session information sent by the host node every first preset time interval, thereby improving the efficiency of session synchronization.
全量的会话信息可以是指主机节点所接收到的所有会话信息。备用节点可以每隔第二预设时间间隔接收主机节点发送的自身全量的会话信息,这保证了主机节点与备用节点之间的会话信息的一致性。The full amount of session information may refer to all session information received by the host node. The standby node may receive its own full amount of session information sent by the host node every second preset time interval, which ensures the consistency of session information between the host node and the standby node.
可选的,第一预设时间间隔可以小于第二预设时间间隔,即可以间隔较小时间进行接收目标主机节点自身增量的会话信息,并间隔较长时间接收目标主机节点发送的自身全量的会话信息,以便备用节点将老化的会话信息及时删除,并兼顾会话同步的效率。Optionally, the first preset time interval may be smaller than the second preset time interval, that is, the target host node's own incremental session information may be received at a shorter interval, and the target host node's own full session information may be received at a longer interval, so that the standby node can delete the aged session information in time and take into account the efficiency of session synchronization.
本发明实施例提供的会话信息的同步方法,备用节点通过将会话同步地址发送至备用节点对应的各主机节点,接收各主机节点发送的增量的会话信息和全量的会话信息,其中,增量的会话信息由主机节点基于会话同步地址每隔第一预设时间间隔发送,全量的会话信息由主机节点基于会话同步地址每隔第二预设时间间隔发送,提高了会话同步的效率,保证了主机节点与备用节点之间的会话信息的一致性。According to the method for synchronizing session information provided by an embodiment of the present invention, a standby node sends a session synchronization address to each host node corresponding to the standby node, and receives incremental session information and full session information sent by each host node, wherein the incremental session information is sent by the host node at a first preset time interval based on the session synchronization address, and the full session information is sent by the host node at a second preset time interval based on the session synchronization address, thereby improving the efficiency of session synchronization and ensuring the consistency of session information between the host node and the standby node.
在一种实现方式中,备用节点还可以在检测到所述备用节点所对应的任意主机节点发生故障时,向所述备用节点所对应的各主机节点发送指示信息,其中,所述指示信息用于通知本备用节点待进行主备切换;所述备用节点切换为主机节点,并接替发生故障的主机节点接收会话信息。In one implementation, the standby node can also send indication information to each host node corresponding to the standby node when it detects that any host node corresponding to the standby node fails, wherein the indication information is used to notify the standby node to perform a master-slave switch; the standby node switches to a host node and takes over the failed host node to receive session information.
具体的,在该备用节点所对应的任意主机节点发生故障,例如主机节点死机时,备用节点可以检测到主机节点发生了故障,此时备用节点可以向所对应的各主机节点发送用于通知本备用节点待进行主备切换指示信息;主机节点接收该指示信息后,可以停止将会话信息同步至备用节点。Specifically, when any host node corresponding to the backup node fails, for example, when the host node crashes, the backup node can detect that the host node has failed. At this time, the backup node can send indication information to each corresponding host node to notify the backup node to perform a master-slave switch; after receiving the indication information, the host node can stop synchronizing the session information to the backup node.
当然,此时备用节点可以切换为主机节点,并接替发生故障的主机节点接收会话信息,这实现了负载均衡集群中的主用节点出现故障等异常情况时,能够迅速进行主备切换,且因其保有集群全量的会话信息,能够做到对用户无感的切换,客户端无需进行重连,避免了客户端重传等额外开销。Of course, at this time, the standby node can be switched to the host node and take over the failed host node to receive session information. This enables rapid master-slave switching when the main node in the load balancing cluster fails or other abnormal situations occur. And because it retains the full amount of session information in the cluster, it can achieve user-imperceptible switching, and the client does not need to reconnect, avoiding additional overhead such as client retransmission.
此外,若主机节点恢复正常,则可以转换为备用节点重新进入工作状态。In addition, if the host node returns to normal, it can be converted to a standby node and re-enter the working state.
这样本实施例提升了硬件资源的利用率,避免了相关技术会话同步方式中硬件资源利用率低的问题,且可以在负载均衡集群出现死机等异常情况时,迅速进行主备切换,且无需重新建连,避免了客户端重传等额外开销,还实现了在会话同步的基础之上,通过增量同步和全量同步的方式,兼顾了会话同步的效率和主备节点会话表的一致性。In this way, this embodiment improves the utilization rate of hardware resources, avoids the problem of low hardware resource utilization in the session synchronization method of the related technology, and can quickly perform master-slave switching when an abnormal situation such as a crash occurs in the load balancing cluster, without the need to re-establish the connection, avoiding additional overhead such as client retransmission, and also achieves both the efficiency of session synchronization and the consistency of the session tables of the master and standby nodes through incremental synchronization and full synchronization on the basis of session synchronization.
需要说明的是,本申请实施例提供的应用于负载均衡集群中的主机节点会话信息的同步方法,执行主体可以为会话信息的同步装置,或者该会话信息的同步装置中的用于执行会话信息的同步方法的控制模块。本申请实施例中以会话信息的同步装置执行会话信息的同步方法为例,说明本申请实施例提供的会话信息的同步装置。It should be noted that the method for synchronizing session information of host nodes in a load balancing cluster provided in the embodiment of the present application can be executed by a synchronization device for session information, or a control module in the synchronization device for session information for executing the synchronization method for session information. In the embodiment of the present application, the synchronization device for session information is taken as an example to illustrate the synchronization device for session information provided in the embodiment of the present application.
图4是本发明实施例应用于主机节点的会话信息的同步装置的结构示意图。如图4所示,会话信息的同步装置400包括:接收模块410、同步模块420。Fig. 4 is a schematic diagram of the structure of a synchronization device for session information applied to a host node according to an embodiment of the present invention. As shown in Fig. 4 , the synchronization device 400 for session information includes: a receiving module 410 and a synchronization module 420 .
接收模块410,用于接收所述主机节点对应的各备用节点发送的会话同步地址,同步模块420,用于基于所述会话同步地址,每隔第一预设时间间隔将接收到的增量的会话信息同步至所对应的各备用节点,并每隔第二预设时间间隔将接收到的全量的会话信息同步至所对应的各备用节点,其中所述第一预设时间间隔小于所述第二预设时间间隔。The receiving module 410 is used to receive the session synchronization address sent by each backup node corresponding to the host node, and the synchronization module 420 is used to synchronize the received incremental session information to each corresponding backup node at every first preset time interval based on the session synchronization address, and synchronize the received full session information to each corresponding backup node at every second preset time interval, wherein the first preset time interval is smaller than the second preset time interval.
在一种实现方式中,接收模块410还用于,In one implementation, the receiving module 410 is further configured to:
接收所对应的备用节点在检测到该备用节点所对应的任意主机节点发生故障时所发送的指示信息,其中所述指示信息用于通知本备用节点待进行主备切换;基于所述指示信息,停止将所述会话信息同步至所述备用节点。Receive indication information sent by the corresponding standby node when detecting that any host node corresponding to the standby node fails, wherein the indication information is used to notify the standby node to perform a master-slave switch; based on the indication information, stop synchronizing the session information to the standby node.
在一种实现方式中,同步模块420还用于,In one implementation, the synchronization module 420 is further configured to:
所述主机节点采用第一预设标识对已进行同步的会话信息进行标记,并采用第二预设标识对未进行同步的会话信息进行标记。The host node uses a first preset identifier to mark the synchronized session information, and uses a second preset identifier to mark the unsynchronized session information.
本申请实施例中的会话信息的同步装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The synchronization device of session information in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
本申请实施例中的会话信息的同步装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。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 operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
本申请实施例提供的会话信息的同步装置能够实现图2的方法实施例中实现的各个过程,为避免重复,这里不再赘述。The session information synchronization device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 2, and will not be described again here to avoid repetition.
需要说明的是,本申请实施例提供的应用于负载均衡集群中的备用节点的会话信息的同步方法,执行主体可以为会话信息的同步装置,或者该会话信息的同步装置中的用于执行会话信息的同步方法的控制模块。本申请实施例中以会话信息的同步装置执行会话信息的同步方法为例,说明本申请实施例提供的会话信息的同步装置。It should be noted that the execution subject of the method for synchronizing session information of a standby node in a load balancing cluster provided in an embodiment of the present application may be a synchronization device for session information, or a control module in the synchronization device for session information for executing the synchronization method for session information. In the embodiment of the present application, the execution of the synchronization method for session information by a synchronization device for session information is taken as an example to illustrate the synchronization device for session information provided in an embodiment of the present application.
图5是本发明实施例应用于备用节点的会话信息的同步装置的结构示意图。如图5所示,会话信息的同步装置500包括:发送模块510、接收模块520。Fig. 5 is a schematic diagram of the structure of a synchronization device for session information applied to a standby node according to an embodiment of the present invention. As shown in Fig. 5 , the synchronization device 500 for session information includes: a sending module 510 and a receiving module 520 .
发送模块510,用于将会话同步地址发送至所述备用节点对应的各主机节点;接收模块520,用于接收各主机节点发送的增量的会话信息和全量的会话信息,其中,所述增量的会话信息由主机节点基于所述会话同步地址每隔第一预设时间间隔发送,所述全量的会话信息由主机节点基于所述会话同步地址每隔第二预设时间间隔发送。The sending module 510 is used to send the session synchronization address to each host node corresponding to the backup node; the receiving module 520 is used to receive incremental session information and full session information sent by each host node, wherein 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.
在一种实现方式中,发送模块520还用于,在检测到所述备用节点所对应的任意主机节点发生故障时,向所述备用节点所对应的各主机节点发送指示信息,其中,所述指示信息用于通知本备用节点待进行主备切换;所述备用节点切换为主机节点,并接替发生故障的主机节点接收会话信息。In one implementation, the sending module 520 is also used to send indication information to each host node corresponding to the backup node when a failure is detected in any host node corresponding to the backup node, wherein the indication information is used to notify the backup node to perform a master-slave switch; the backup node switches to a host node and takes over the failed host node to receive session information.
本申请实施例中的会话信息的同步装置可以是装置,也可以是终端中的部件、集成电路、或芯片。该装置可以是移动电子设备,也可以为非移动电子设备。示例性的,移动电子设备可以为手机、平板电脑、笔记本电脑、掌上电脑、车载电子设备、可穿戴设备、超级移动个人计算机(ultra-mobile personal computer,UMPC)、上网本或者个人数字助理(personal digital assistant,PDA)等,非移动电子设备可以为服务器、网络附属存储器(Network Attached Storage,NAS)、个人计算机(personal computer,PC)、电视机(television,TV)、柜员机或者自助机等,本申请实施例不作具体限定。The synchronization device of session information in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc. The non-mobile electronic device can be a server, a network attached storage (NAS), a personal computer (PC), a television (TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
本申请实施例中的会话信息的同步装置可以为具有操作系统的装置。该操作系统可以为安卓(Android)操作系统,可以为ios操作系统,还可以为其他可能的操作系统,本申请实施例不作具体限定。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 operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
本申请实施例提供的会话信息的同步装置能够实现图3的方法实施例中实现的各个过程,为避免重复,这里不再赘述。The session information synchronization device provided in the embodiment of the present application can implement each process implemented in the method embodiment of Figure 3, and will not be described again here to avoid repetition.
可选的,如图6所示,本申请实施例还提供一种电子设备600,包括处理器601,存储器602,存储器602上存储有可在所述处理器601上运行的程序或指令,该程序或指令被处理器601执行时实现:接收所述主机节点所对应的各备用节点发送的会话同步地址;基于所述会话同步地址,每隔第一预设时间间隔将接收到的增量的会话信息同步至所对应的各备用节点,并每隔第二预设时间间隔将接收到的全量的会话信息同步至所对应的各备用节点,其中所述第一预设时间间隔小于所述第二预设时间间隔。Optionally, as shown in Figure 6, an embodiment of the present application also provides an electronic device 600, including a processor 601 and a memory 602, wherein the memory 602 stores a program or instruction that can be executed on the processor 601, and the program or instruction, when executed by the processor 601, implements: receiving a session synchronization address sent by each backup node corresponding to the host node; based on the session synchronization address, synchronizing the received incremental session information to each corresponding backup node at every first preset time interval, and synchronizing the received full session information to each corresponding backup node at every second preset time interval, wherein the first preset time interval is less than the second preset time interval.
在一种实现方式中,还包括:接收所对应的备用节点在检测到该备用节点所对应的任意主机节点发生故障时所发送的指示信息,其中所述指示信息用于通知本备用节点待进行主备切换;基于所述指示信息,停止将所述会话信息同步至所述备用节点。In one implementation, it also includes: receiving indication information sent by the corresponding backup node when detecting that any host node corresponding to the backup node fails, wherein the indication information is used to notify the backup node to perform a master-slave switch; based on the indication information, stop synchronizing the session information to the backup node.
在一种实现方式中,还包括:所述主机节点采用第一预设标识对已进行同步的会话信息进行标记,并采用第二预设标识对未进行同步的会话信息进行标记。In one implementation, the method further includes: the host node using a first preset identifier to mark the synchronized session information, and using a second preset identifier to mark the unsynchronized session information.
或者,该程序或指令被处理器601执行时实现:将会话同步地址发送至所述备用节点对应的各主机节点;接收各主机节点发送的增量的会话信息和全量的会话信息,其中,所述增量的会话信息由主机节点基于所述会话同步地址每隔第一预设时间间隔发送,所述全量的会话信息由主机节点基于所述会话同步地址每隔第二预设时间间隔发送。Alternatively, when the program or instruction is executed by the processor 601, it is implemented: sending the session synchronization address to each host node corresponding to the backup 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 based on the session synchronization address at every first preset time interval, and the full session information is sent by the host node based on the session synchronization address at every second preset time interval.
在一种实现方式中,还包括:在检测到所述备用节点所对应的任意主机节点发生故障时,向所述备用节点对应的各主机节点发送指示信息,其中,所述指示信息用于通知本备用节点待进行主备切换;所述备用节点切换为主机节点,并接替发生故障的主机节点接收会话信息。In one implementation, it also includes: when a failure is detected in any host node corresponding to the backup node, an indication message is sent to each host node corresponding to the backup node, wherein the indication message is used to notify the backup node to perform a master-slave switch; the backup node switches to a host node and takes over the failed host node to receive session information.
具体执行步骤可以参见上述会话信息的同步方法实施例的各个步骤,且能达到相同的技术效果,为避免重复,这里不再赘述。The specific execution steps can refer to the various steps of the above-mentioned session information synchronization method embodiment, and can achieve the same technical effect. To avoid repetition, they are not described here.
需要说明的是,本申请实施例中的电子设备包括:服务器、终端或除终端之外的其他设备。It should be noted that the electronic devices in the embodiments of the present application include: servers, terminals, or other devices except terminals.
以上电子设备结构并不构成对电子设备的限定,电子设备可以包括比图示更多或更少的部件,或者组合某些部件,或者不同的部件布置,例如,输入单元,可以包括图形处理器(Graphics Processing Unit,GPU)和麦克风,显示单元可以采用液晶显示器、有机发光二极管等形式来配置显示面板。用户输入单元包括触控面板以及其他输入设备中的至少一种。触控面板也称为触摸屏。其他输入设备可以包括但不限于物理键盘、功能键(比如音量控制按键、开关按键等)、轨迹球、鼠标、操作杆,在此不再赘述。The above electronic device structure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, the input unit may include a graphics processing unit (GPU) and a microphone, and the display unit may be configured with a display panel in the form of a liquid crystal display, an organic light-emitting diode, etc. The user input unit includes a touch panel and at least one of other input devices. The touch panel is also called a touch screen. Other input devices may include, but are not limited to, a physical keyboard, function keys (such as volume control buttons, switch buttons, etc.), a trackball, a mouse, and a joystick, which will not be repeated here.
存储器可用于存储软件程序以及各种数据。存储器可主要包括存储程序或指令的第一存储区和存储数据的第二存储区,其中,第一存储区可存储操作系统、至少一个功能所需的应用程序或指令(比如声音播放功能、图像播放功能等)等。此外,存储器可以包括易失性存储器或非易失性存储器,或者,存储器可以包括易失性和非易失性存储器两者。其中,非易失性存储器可以是只读存储器(Read-Only Memory,ROM)、可编程只读存储器(Programmable ROM,PROM)、可擦除可编程只读存储器(Erasable PROM,EPROM)、电可擦除可编程只读存储器(Electrically EPROM,EEPROM)或闪存。易失性存储器可以是随机存取存储器(Random Access Memory,RAM),静态随机存取存储器(Static RAM,SRAM)、动态随机存取存储器(Dynamic RAM,DRAM)、同步动态随机存取存储器(Synchronous DRAM,SDRAM)、双倍数据速率同步动态随机存取存储器(Double Data Rate SDRAM,DDRSDRAM)、增强型同步动态随机存取存储器(Enhanced SDRAM,ESDRAM)、同步连接动态随机存取存储器(Synchlink DRAM,SLDRAM)和直接内存总线随机存取存储器(Direct Rambus RAM,DRRAM)。The memory can be used to store software programs and various data. The memory may mainly include a first storage area for storing programs or instructions and a second storage area for storing data, wherein the first storage area may store an operating system, an application program or instructions required for at least one function (such as a sound playback function, an image playback function, etc.), etc. In addition, the memory may include a volatile memory or a non-volatile memory, or the memory may include both volatile and non-volatile memories. Among them, the non-volatile memory may be a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), or a flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM) and direct memory bus random access memory (DRRAM).
处理器可包括一个或多个处理单元;可选的,处理器集成应用处理器和调制解调处理器,其中,应用处理器主要处理涉及操作系统、用户界面和应用程序等的操作,调制解调处理器主要处理无线通信信号,如基带处理器。可以理解的是,上述调制解调处理器也可以不集成到处理器中。The processor may include one or more processing units; optionally, the processor integrates an application processor and a modem processor, wherein the application processor mainly processes operations related to the operating system, user interface, and application programs, and the modem processor mainly processes wireless communication signals, such as a baseband processor. It is understandable that the modem processor may not be integrated into the processor.
本申请实施例还提供一种可读存储介质,所述可读存储介质上存储有程序或指令,该程序或指令被处理器执行时实现上述会话信息的同步方法实施例的各个过程,且能达到相同的技术效果,为避免重复,这里不再赘述。An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned session information synchronization method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
其中,所述处理器为上述实施例中所述的电子设备中的处理器。所述可读存储介质,包括计算机可读存储介质,如计算机只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等。The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
需要说明的是,在本文中,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者装置不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者装置所固有的要素。在没有更多限制的情况下,由语句“包括一个……”限定的要素,并不排除在包括该要素的过程、方法、物品或者装置中还存在另外的相同要素。此外,需要指出的是,本申请实施方式中的方法和装置的范围不限按示出或讨论的顺序来执行功能,还可包括根据所涉及的功能按基本同时的方式或按相反的顺序来执行功能,例如,可以按不同于所描述的次序来执行所描述的方法,并且还可以添加、省去、或组合各种步骤。另外,参照某些示例所描述的特征可在其他示例中被组合。It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
通过以上的实施方式的描述,本领域的技术人员可以清楚地了解到上述实施例方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以通过硬件,但很多情况下前者是更佳的实施方式。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质(如ROM/RAM、磁碟、光盘)中,包括若干指令用以使得一台终端(可以是手机,计算机,服务器,空调器,或者网络设备等)执行本申请各个实施例所述的方法。Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
上面结合附图对本申请的实施例进行了描述,但是本申请并不局限于上述的具体实施方式,上述的具体实施方式仅仅是示意性的,而不是限制性的,本领域的普通技术人员在本申请的启示下,在不脱离本申请宗旨和权利要求所保护的范围情况下,还可做出很多形式,均属于本申请的保护之内。The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims (9)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210281644.7A CN114500547B (en) | 2022-03-22 | 2022-03-22 | System, method, device, electronic equipment and storage medium for synchronizing session information |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202210281644.7A CN114500547B (en) | 2022-03-22 | 2022-03-22 | System, method, device, electronic equipment and storage medium for synchronizing session information |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| CN114500547A CN114500547A (en) | 2022-05-13 |
| CN114500547B true CN114500547B (en) | 2024-10-29 |
Family
ID=81489130
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202210281644.7A Active CN114500547B (en) | 2022-03-22 | 2022-03-22 | System, method, device, electronic equipment and storage medium for synchronizing session information |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN114500547B (en) |
Families Citing this family (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115460273A (en) * | 2022-08-05 | 2022-12-09 | 视联动力信息技术股份有限公司 | Service processing method, device, system, electronic equipment and storage medium |
| CN115695538A (en) * | 2022-10-27 | 2023-02-03 | 中国银行股份有限公司 | Service data processing method, device and server |
Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111625592A (en) * | 2019-02-28 | 2020-09-04 | 北京京东尚科信息技术有限公司 | Load balancing method and device for distributed database |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN102882981B (en) * | 2012-10-19 | 2015-01-28 | 南京邮电大学 | Load balancing method of node task under equivalence structural cloud platform |
| CN104243527B (en) * | 2013-06-20 | 2018-08-21 | 华为技术有限公司 | Method of data synchronization, data synchronization unit and distributed system |
| CN104506357B (en) * | 2014-12-22 | 2018-05-11 | 国云科技股份有限公司 | A kind of high-availability cluster node administration method |
| CN110417842B (en) * | 2018-04-28 | 2022-04-12 | 北京京东尚科信息技术有限公司 | Fault processing method and device for gateway server |
| CN110647580B (en) * | 2019-09-05 | 2022-06-10 | 南京邮电大学 | Distributed container cluster mirror image management main node, slave node, system and method |
| CN112671928B (en) * | 2020-12-31 | 2023-02-07 | 北京天融信网络安全技术有限公司 | Equipment centralized management architecture, load balancing method, electronic equipment and storage medium |
-
2022
- 2022-03-22 CN CN202210281644.7A patent/CN114500547B/en active Active
Patent Citations (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN111625592A (en) * | 2019-02-28 | 2020-09-04 | 北京京东尚科信息技术有限公司 | Load balancing method and device for distributed database |
Also Published As
| Publication number | Publication date |
|---|---|
| CN114500547A (en) | 2022-05-13 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN110912780B (en) | High-availability cluster detection method, system and controlled terminal | |
| CN106331098B (en) | Server cluster system | |
| US9639437B2 (en) | Techniques to manage non-disruptive SAN availability in a partitioned cluster | |
| CN102006189B (en) | Primary access server determination method and device for dual-machine redundancy backup | |
| CN107465767A (en) | A kind of method and system of data syn-chronization | |
| CN108964948A (en) | Principal and subordinate's service system, host node fault recovery method and device | |
| CN103944974B (en) | A kind of protocol message processing method, controller failure processing method and relevant device | |
| CN114500547B (en) | System, method, device, electronic equipment and storage medium for synchronizing session information | |
| CN102388570B (en) | Single board running method and system under active-standby mode | |
| US11349706B2 (en) | Two-channel-based high-availability | |
| WO2016177231A1 (en) | Dual-control-based active-backup switching method and device | |
| CN107203443A (en) | A kind of method and apparatus of the virtual machine High Availabitity based on KVM virtualization | |
| CN106385330B (en) | Implementation method and device of a network function virtualization orchestrator | |
| CN108123967A (en) | Data synchronization method and system for a cluster system | |
| CN120238423A (en) | Port failure switching method, device and storage medium | |
| CN111835544B (en) | Monitoring method and system of virtual router based on user mode protocol stack | |
| CN102262558A (en) | Synchronizing method and system of virtual machine | |
| CN111835684B (en) | Network isolation monitoring method and system for haproxy equipment | |
| CN105049263A (en) | Data processing method and data processing system | |
| CN101242255B (en) | A method and system for realizing N+1 redundant backup and load share | |
| CN107707665A (en) | A kind of network storage method, device, system and computer-readable recording medium | |
| CN111416851A (en) | Method for session synchronization among multiple load balancers and load balancer | |
| WO2024198629A1 (en) | Computer device, data processor, processing system, and switching method | |
| CN101141233B (en) | A Method for Realizing Active/Standby Redundancy of Node B | |
| CN116996174A (en) | Disaster recovery methods, devices, equipment and media based on multi-availability zone IoT platform |
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 |
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. |
|
| TA01 | Transfer of patent application right | ||
| GR01 | Patent grant | ||
| GR01 | Patent grant |