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

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

Info

Publication number
CN109257448B
CN109257448B CN201811392432.6A CN201811392432A CN109257448B CN 109257448 B CN109257448 B CN 109257448B CN 201811392432 A CN201811392432 A CN 201811392432A CN 109257448 B CN109257448 B CN 109257448B
Authority
CN
China
Prior art keywords
session information
load balancing
client
information set
service request
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201811392432.6A
Other languages
Chinese (zh)
Other versions
CN109257448A (en
Inventor
刘京洋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Netease Hangzhou Network Co Ltd
Original Assignee
Netease Hangzhou Network 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 Netease Hangzhou Network Co Ltd filed Critical Netease Hangzhou Network Co Ltd
Priority to CN201811392432.6A priority Critical patent/CN109257448B/en
Publication of CN109257448A publication Critical patent/CN109257448A/en
Application granted granted Critical
Publication of CN109257448B publication Critical patent/CN109257448B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/14Session management
    • H04L67/146Markers for unambiguous identification of a particular session, e.g. session cookie or URL-encoding
    • 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/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • 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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/56Provisioning of proxy services
    • H04L67/568Storing data temporarily at an intermediate stage, e.g. caching
    • 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/1097Protocols in which an application is distributed across nodes in the network for distributed storage of data in networks, e.g. transport arrangements for network file system [NFS], storage area networks [SAN] or network attached storage [NAS]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a method and a device for synchronizing session information, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving a session information set which meets a preset condition and is sent by a synchronous server, and storing the session information set in a local cache; the session information set is obtained by the synchronization server side aggregating the received session information; when a service request sent by a first client is received, inquiring whether first session information corresponding to the first client exists in the session information set or not; and when the first session information exists, sending a processing result aiming at the service request to the first client by adopting the first session information. By the embodiment of the application, the session information is cached locally, the session information is queried locally, excessive dependence on a synchronous server is avoided, the security of the session information and the query efficiency are improved, and the occupation of network bandwidth is reduced.

Description

Session information synchronization method and device, electronic equipment and storage medium
Technical Field
The present application relates to the field of data processing, and in particular, to a method and an apparatus for synchronizing session information, an electronic device, and a storage medium.
Background
At present, in order to ensure high availability of servers, multiple servers are generally configured as a load balancing cluster, due to the existence of the load balancing cluster, two service requests sent by the same client before and after may be distributed to different load balancing nodes for processing, and the different load balancing nodes do not store session information for the client, thereby causing a service request timeout.
In the prior art, when a load balancing node needs certain session information, it may query at a synchronization server to obtain the session information, but the session information in this manner is concentrated at the synchronization server and excessively depends on the synchronization server, and if the synchronization server loses response, all service requests will be overtime.
Moreover, the load balancing nodes in the load balancing cluster are usually deployed in different machine rooms, when certain session information is needed, cross-machine network query needs to be performed, network bandwidth is occupied, and the stability of the network affects query efficiency and further affects service quality.
Disclosure of Invention
In view of the above, the present application is proposed to provide a method and apparatus for synchronizing session information, an electronic device, and a storage medium, which overcome the above problems or at least partially solve the above problems, and include:
a method for synchronizing session information is applied to a load balancing node, wherein the load balancing node belongs to a load balancing cluster, and the method comprises the following steps:
receiving a session information set which meets a preset condition and is sent by a synchronous server, and storing the session information set in a local cache; the session information set is obtained by the synchronization server side aggregating the received session information;
when a service request sent by a first client is received, inquiring whether first session information corresponding to the first client exists in the session information set or not;
and when the first session information exists, sending a processing result aiming at the service request to the first client by adopting the first session information.
Optionally, the method further comprises:
when a service request sent by a second client for the first time is received, second session information corresponding to the second client is generated, and the second session information is sent to a synchronous server.
Optionally, the load balancing node comprises a first client component and a first service component, and the synchronization service comprises a second client component and a second service component;
the step of sending the second session information to the synchronization server includes:
sending the second session information to the second server-side component by adopting the first client-side component of the load balancing node generating the second session information; the second service end component is configured to aggregate the received session information to obtain a session information set, and send the session information set to the first service end component through the second client end component.
The step of receiving the session information set sent by the synchronization server side meeting the preset condition comprises the following steps:
and receiving the session information set sent by the second client component by adopting the first service component.
Optionally, the load balancing node stores the session information set by using a red-black tree preset in a local cache.
Optionally, when a plurality of load balancing nodes form a client/server architecture, the synchronous server meeting the preset condition is a server node in the client/server architecture or a node determined according to a determination instruction;
when a point-to-point architecture is formed by the load balancing nodes, the synchronization server meeting the preset condition is the load balancing node except the current load balancing node in the load balancing nodes.
A method for synchronizing session information is applied to a synchronization server meeting preset conditions, wherein the synchronization server corresponds to a plurality of load balancing nodes, and the load balancing nodes belong to a load balancing cluster, and the method comprises the following steps:
when receiving session information sent by the plurality of load balancing nodes, aggregating the session information to obtain a session information set;
sending the session information set to the plurality of load balancing nodes; the load balancing node is used for storing the session information set in a local cache, and when a service request sent by a first client is received, sending a processing result aiming at the service request to the first client by adopting first session information corresponding to the first client in the session information set.
An apparatus for synchronizing session information, applied to a load balancing node, the load balancing node belonging to a load balancing cluster, the apparatus comprising:
the session information storage module is used for receiving a session information set which meets the preset conditions and is sent by the synchronous server, and storing the session information set in a local cache; the session information set is obtained by the synchronization server side aggregating the received session information;
the session information query module is used for querying whether first session information corresponding to a first client exists in the session information set or not when a service request sent by the first client is received;
and the session information using module is used for sending a processing result aiming at the service request to the first client by adopting the first session information when the first session information exists.
A device for synchronizing session information is applied to a synchronization server meeting preset conditions, wherein the synchronization server corresponds to a plurality of load balancing nodes, and the load balancing nodes belong to a load balancing cluster, and the device comprises:
the session information aggregation module is used for aggregating the session information to obtain a session information set when receiving the session information sent by the plurality of load balancing nodes;
a session information set sending module, configured to send the session information set to the plurality of load balancing nodes; the load balancing node is used for storing the session information set in a local cache, and when a service request sent by a first client is received, sending a processing result aiming at the service request to the first client by adopting first session information corresponding to the first client in the session information set.
An electronic device comprising a processor, a memory and a computer program stored on the memory and being executable on the processor, the computer program, when executed by the processor, implementing the steps of the method of session information synchronization as described above.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of session information synchronization according to any one of the preceding claims.
The application has the following advantages:
in the method, the session information set sent by the synchronization server meeting the preset condition is received and stored in a local cache, the session information set is obtained by aggregating the received session information by the synchronization server, when a service request sent by a first client is received, whether first session information corresponding to the first client exists in the session information set is queried, and when the first session information exists, the first session information is adopted to send a processing result aiming at the service request to the first client, so that the session information is cached locally, the query of the session information is performed locally, the condition that the synchronization server is excessively depended on is avoided, the security and the query efficiency of the session information are improved, and the occupation of network bandwidth is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the present application, the drawings needed to be used in the description of the present application will be briefly introduced below, and it is apparent that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art that other drawings can be obtained according to the drawings without inventive labor.
Fig. 1 is a flowchart illustrating steps of a method for session information synchronization according to an embodiment of the present application;
FIG. 2 is a schematic diagram of a synchronization component provided by an embodiment of the present application;
fig. 3 is a flowchart illustrating steps of a method for session information synchronization according to an embodiment of the present application;
fig. 4 is a block diagram illustrating a structure of an apparatus for synchronizing session information according to an embodiment of the present application;
fig. 5 is a block diagram illustrating a structure of another apparatus for synchronizing session information according to an embodiment of the present application.
Detailed Description
In order to make the aforementioned objects, features and advantages of the present application more comprehensible, the present application is described in further detail with reference to the accompanying drawings and the detailed description. It is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
Referring to fig. 1, a flowchart illustrating steps of a method for session information synchronization according to an embodiment of the present application is shown, where the method may be applied to a load balancing node, where the load balancing node may belong to a load balancing cluster, such as a game server cluster using TLS (Transport Layer Security), and multiple load balancing nodes may exist in the load balancing cluster.
Specifically, the method can comprise the following steps:
step 101, receiving a session information set sent by a synchronization server meeting preset conditions, and storing the session information set in a local cache; the session information set is obtained by the synchronization server side aggregating the received session information;
in the process of service processing, since a service request of the same client may be allocated to different load balancing nodes, and different load balancing nodes do not establish the same channel, session information may be used to perform channel recovery, for example, a symmetric encryption channel of TLS handshake is recovered by using session information, a synchronization server may be set to synchronize session information among multiple load balancing nodes.
In one embodiment, the plurality of load balancing nodes may constitute a client/server architecture, and when the plurality of load balancing nodes constitute the client/server architecture, the synchronous server meeting the preset condition is a server node in the client/server architecture or a node determined according to the determination instruction.
In another embodiment, the plurality of load balancing nodes may form a peer-to-peer architecture, and when the peer-to-peer architecture is formed by the plurality of load balancing nodes, the synchronization server that meets the preset condition is a load balancing node other than the current load balancing node in the plurality of load balancing nodes.
In practical application, each load balancing node in the load balancing cluster may send session information to the synchronization server, after receiving the session information, the synchronization server may store the received session information in the temporary database, and then may aggregate the session information in the temporary database to obtain a session information set, and may send the session information set to a plurality of load balancing nodes by using a TCP (Transmission Control Protocol).
For a load balancing node, the load balancing node may receive multiple types of data streams, and after receiving the data streams, the load balancing node may detect header information of the data streams, and when the header information indicates that the data streams are a session information set, store the session information set in a local cache.
In an example, a red-black tree may be preset in the load balancing node, and after the session information set is parsed, for example, after performing format conversion by using asn.1(Abstract Syntax notification One) in OpenSSL, the load balancing node may store the session information set by using the red-black tree in a local cache.
102, when receiving a service request sent by a first client, inquiring whether first session information corresponding to the first client exists in a session information set or not;
in a specific implementation, when a service request sent by a first client is received, whether a session information set stored in a local cache exists in first session information corresponding to the first client may be queried, for example, a red-black tree queries an ID of the first client, so as to obtain the first session information corresponding to the first client.
And 103, when the first session information exists, sending a processing result aiming at the service request to the first client by adopting the first session information.
When the first session information set exists in the session information set, the processing result for the service request may be sent to the first client using the first session information.
In an embodiment of the present application, the method may further include the following steps:
and when receiving a service request sent by the second client for the first time, generating second session information corresponding to the second client, and sending the second session information to the synchronous server.
In practical application, a hook, that is, a program sequence, is arranged in the load balancing node, and when a service request sent by a second client for the first time is received, the load balancing node can generate second session information corresponding to the second client, and then the hook can be adopted to output the second session information to a local cache through asn.1 coding, and then send the second session information to the synchronization server.
In an embodiment of the present application, in order to achieve sufficient decoupling inside the load balancing node, the synchronization function in the load balancing node may be componentized, as shown in fig. 2, the load balancing node 201 may include a first client component 2011 and a first service component 2012, and the synchronization service 202 may include a second client component 2021 and a second service component 2022.
In the embodiment of the application, the synchronization function of the session information in the load balancing node is modularized, so that the synchronization function of the session information and the service function of the load balancing node are isolated from each other, even if the synchronization function of the session information is broken down, the load balancing node can continue to adopt the local session information to perform service processing, the service function is not affected, and the service stability is improved.
The step of sending the second session information to the synchronization server may comprise the sub-steps of:
and sending the second session information to the second server-side component by adopting the first client-side component of the load balancing node for generating the second session information.
The second service end component is used for aggregating the received session information to obtain a session information set, and sending the session information set to the first service end component through the second client end component.
In a specific implementation, the load balancing node may employ the first client component to send the second session information to the second server component in the synchronization server, and after receiving the second session information, the second server component may aggregate the received session information to obtain the session information set.
After obtaining the set of session information, the second service-side component can send the set of session information to the second client-side component, which sends it to the first service-side component in the load-balancing node.
Correspondingly, the step of receiving the session information set sent by the synchronization server satisfying the preset condition may include:
and receiving the session information set sent by the second client component by adopting the first service component.
After the second client component sends the set of session information, the load balancing node may receive the set of session information using the first server component.
In the method, the session information set sent by the synchronization server meeting the preset condition is received and stored in a local cache, the session information set is obtained by aggregating the received session information by the synchronization server, when a service request sent by a first client is received, whether first session information corresponding to the first client exists in the session information set is queried, and when the first session information exists, the first session information is adopted to send a processing result aiming at the service request to the first client, so that the session information is cached locally, the query of the session information is performed locally, the condition that the synchronization server is excessively depended on is avoided, the security and the query efficiency of the session information are improved, and the occupation of network bandwidth is reduced.
Referring to fig. 3, a flowchart of steps of a method for session information synchronization provided in an embodiment of the present application is shown, where the method may be applied to a synchronization server that meets a preset condition, where the synchronization server corresponds to a plurality of load balancing nodes, and the plurality of load balancing nodes belong to a load balancing cluster, and the method specifically includes the following steps:
step 301, when receiving session information sent by a plurality of load balancing nodes, aggregating the session information to obtain a session information set;
step 302, sending a session information set to a plurality of load balancing nodes; the load balancing node is used for storing the session information set in a local cache, and sending a processing result aiming at the service request to the first client by adopting the first session information corresponding to the first client in the session information set when the service request sent by the first client is received.
In practical application, each load balancing node in the load balancing cluster may send session information to the synchronization server, after receiving the session information, the synchronization server may store the received session information in the temporary database, and then may aggregate the session information in the temporary database to obtain a session information set, and may send the session information set to a plurality of load balancing nodes by using TCP.
After receiving the data stream, the load balancing node may detect header information of the data stream, and store the session information set in the local cache when the header information indicates that the data stream is the session information set.
When a service request sent by a first client is received, whether a session information set stored in a local cache exists in first session information corresponding to the first client or not can be inquired, and when the session information set exists in the first session information set, a processing result aiming at the service request can be sent to the first client by adopting the first session information.
In the embodiment of the application, the session information set sent by the synchronization server meeting the preset condition is received and stored in a local cache, the session information set is obtained by aggregating the received session information by the synchronization server, when a service request sent by a first client is received, whether first session information corresponding to the first client exists in the session information set is queried, and when the first session information exists, the first session information is adopted to send a processing result aiming at the service request to the first client, so that the session information is cached locally, the query of the session information is performed locally, the condition that the synchronization server is excessively depended on is avoided, the security and the query efficiency of the session information are improved, and the occupation of network bandwidth is reduced.
It should be noted that, for simplicity of description, the method embodiments are described as a series of acts or combination of acts, but those skilled in the art will recognize that the embodiments are not limited by the order of acts described, as some steps may occur in other orders or concurrently depending on the embodiments. Further, those skilled in the art will also appreciate that the embodiments described in the specification are presently preferred and that no particular act is required of the embodiments of the application.
Referring to fig. 4, a block diagram of a structure of an apparatus for session information synchronization provided in an embodiment of the present application is shown, and is applied to a load balancing node, where the load balancing node belongs to a load balancing cluster, and the apparatus includes:
the session information saving module 401 is configured to receive a session information set sent by a synchronization server that meets a preset condition, and save the session information set in a local cache; the session information set is obtained by the synchronization server side aggregating the received session information;
a session information query module 402, configured to query whether first session information corresponding to a first client exists in a session information set when receiving a service request sent by the first client;
the session information using module 403 is configured to send a processing result for the service request to the first client by using the first session information when the first session information exists.
In an embodiment of the present application, the method further includes:
and the second session information sending module is used for generating second session information corresponding to the second client when receiving a service request sent by the second client for the first time, and sending the second session information to the synchronous server.
In an embodiment of the present application, the load balancing node includes a first client component and a first service component, the synchronization service component includes a second client component and a second service component, and the second session information sending module includes:
the first client component sending submodule is used for sending the second session information to the second server component by adopting the first client component of the load balancing node for generating the second session information; the second service end component is used for aggregating the received session information to obtain a session information set, and sending the session information set to the first service end component through the second client end component;
the session information saving module 401 includes:
and the first service end component receiving submodule is used for receiving the session information set sent by the second client end component by adopting the first service end component.
In an embodiment of the present application, the load balancing node stores the session information set by using a red and black tree preset in a local cache.
In an embodiment of the application, when a plurality of load balancing nodes form a client/server architecture, a synchronous server meeting a preset condition is a server node in the client/server architecture or a node determined according to a determination instruction;
when the point-to-point architecture is formed by the multiple load balancing nodes, the synchronous server side meeting the preset condition is the load balancing node except the current load balancing node in the multiple load balancing nodes.
Referring to fig. 5, a block diagram of another session information synchronization apparatus provided in an embodiment of the present application is shown, and is applied to a synchronization server that meets a preset condition, where the synchronization server corresponds to multiple load balancing nodes, and the multiple load balancing nodes belong to a load balancing cluster, where the apparatus includes:
the session information aggregation module 501 is configured to aggregate session information to obtain a session information set when receiving session information sent by multiple load balancing nodes;
a session information set sending module 502, configured to send a session information set to a plurality of load balancing nodes; the load balancing node is used for storing the session information set in a local cache, and sending a processing result aiming at the service request to the first client by adopting the first session information corresponding to the first client in the session information set when the service request sent by the first client is received.
It should be noted that, for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and for the relevant points, reference may be made to part of the description of the method embodiment.
An embodiment of the present application also provides an electronic device, which may include a processor, a memory, and a computer program stored on the memory and capable of running on the processor, and when executed by the processor, the computer program implements the steps of the method for session information synchronization as described above.
An embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the above method for session information synchronization.
The embodiments in the present specification are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
As will be appreciated by one of skill in the art, embodiments of the present application may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
Embodiments of the present application are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the application. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing terminal to cause a series of operational steps to be performed on the computer or other programmable terminal to produce a computer implemented process such that the instructions which execute on the computer or other programmable terminal provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present application have been described, additional variations and modifications of these embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the true scope of the embodiments of the application.
Finally, it should also be noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal 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 terminal. 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 terminal that comprises the element.
The method and apparatus for synchronizing session information, the electronic device, and the storage medium provided by the present application are introduced in detail, and a specific example is applied in the present application to explain the principle and the implementation of the present application, and the description of the above embodiment is only used to help understand the method and the core idea of the present application; meanwhile, for a person skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. A method for session information synchronization is applied to a load balancing node, wherein the load balancing node belongs to a load balancing cluster, and the method comprises the following steps:
receiving a session information set which meets a preset condition and is sent by a synchronous server, and storing the session information set in a local cache; the session information set is obtained by the synchronization server side aggregating the received session information;
when a service request sent by a first client is received, inquiring whether first session information corresponding to the first client exists in the session information set or not;
when first session information exists, sending a processing result aiming at the service request to the first client by adopting the first session information;
and the service request sent by the first client is distributed to different load balancing nodes for processing.
2. The method of claim 1, further comprising:
when a service request sent by a second client for the first time is received, second session information corresponding to the second client is generated, and the second session information is sent to a synchronous server.
3. The method of claim 2, wherein the load balancing node comprises a first client component and a first service component, and wherein the synchronization service comprises a second client component and a second service component;
the step of sending the second session information to the synchronization server includes:
sending the second session information to the second server-side component by adopting the first client-side component of the load balancing node generating the second session information; the second service end component is configured to aggregate the received session information to obtain a session information set, and send the session information set to the first service end component through the second client end component.
The step of receiving the session information set sent by the synchronization server side meeting the preset condition comprises the following steps:
and receiving the session information set sent by the second client component by adopting the first service component.
4. The method according to claim 1, 2 or 3, wherein the load balancing node stores the session information set using a red-black tree preset in a local cache.
5. The method of claim 1,
when a plurality of load balancing nodes form a client/server architecture, the synchronous server meeting the preset conditions is a server node in the client/server architecture or a node determined according to a determined instruction;
when a point-to-point architecture is formed by the load balancing nodes, the synchronization server meeting the preset condition is the load balancing node except the current load balancing node in the load balancing nodes.
6. A method for synchronizing session information is applied to a synchronization server meeting a preset condition, the synchronization server corresponds to a plurality of load balancing nodes, and the load balancing nodes belong to a load balancing cluster, and the method comprises the following steps:
when receiving session information sent by the plurality of load balancing nodes, aggregating the session information to obtain a session information set;
sending the session information set to the plurality of load balancing nodes; the load balancing node is used for storing the session information set in a local cache, and when a service request sent by a first client is received, sending a processing result aiming at the service request to the first client by adopting first session information corresponding to the first client in the session information set;
and the service request sent by the first client is distributed to different load balancing nodes for processing.
7. An apparatus for session information synchronization, applied to a load balancing node, the load balancing node belonging to a load balancing cluster, the apparatus comprising:
the session information storage module is used for receiving a session information set which meets the preset conditions and is sent by the synchronous server, and storing the session information set in a local cache; the session information set is obtained by the synchronization server side aggregating the received session information;
the session information query module is used for querying whether first session information corresponding to a first client exists in the session information set or not when a service request sent by the first client is received;
the session information using module is used for sending a processing result aiming at the service request to the first client by adopting the first session information when the first session information exists;
and the service request sent by the first client is distributed to different load balancing nodes for processing.
8. A device for synchronizing session information is applied to a synchronization server meeting a preset condition, the synchronization server corresponds to a plurality of load balancing nodes, and the load balancing nodes belong to a load balancing cluster, and the device comprises:
the session information aggregation module is used for aggregating the session information to obtain a session information set when receiving the session information sent by the plurality of load balancing nodes;
a session information set sending module, configured to send the session information set to the plurality of load balancing nodes; the load balancing node is used for storing the session information set in a local cache, and when a service request sent by a first client is received, sending a processing result aiming at the service request to the first client by adopting first session information corresponding to the first client in the session information set;
and the service request sent by the first client is distributed to different load balancing nodes for processing.
9. An electronic device, comprising a processor, a memory and a computer program stored on the memory and being executable on the processor, the computer program, when executed by the processor, implementing the steps of the method of session information synchronization according to any of claims 1 to 6.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method of session information synchronization according to any one of claims 1 to 6.
CN201811392432.6A 2018-11-21 2018-11-21 Session information synchronization method and device, electronic equipment and storage medium Active CN109257448B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811392432.6A CN109257448B (en) 2018-11-21 2018-11-21 Session information synchronization method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811392432.6A CN109257448B (en) 2018-11-21 2018-11-21 Session information synchronization method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN109257448A CN109257448A (en) 2019-01-22
CN109257448B true CN109257448B (en) 2021-07-09

Family

ID=65043757

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811392432.6A Active CN109257448B (en) 2018-11-21 2018-11-21 Session information synchronization method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN109257448B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532732B (en) * 2020-12-03 2023-12-05 郑州阿帕斯数云信息科技有限公司 Session processing method and device based on HTTPS
CN115242812A (en) * 2022-07-25 2022-10-25 济南浪潮数据技术有限公司 Node data synchronization method and device and computer readable storage medium

Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103389986A (en) * 2012-05-09 2013-11-13 阿里巴巴集团控股有限公司 Method, device and system for storing and searching Session information
CN104735098A (en) * 2013-12-18 2015-06-24 青岛海尔空调器有限总公司 Session information control method and system
CN105338095A (en) * 2015-11-17 2016-02-17 中国建设银行股份有限公司 Conversation data processing method and device
CN105516264A (en) * 2015-11-30 2016-04-20 努比亚技术有限公司 Distributed cluster system based session sharing method, apparatus and system
CN106339408A (en) * 2016-08-10 2017-01-18 深圳中兴网信科技有限公司 Data synchronization method, data synchronization device and server
CN106357778A (en) * 2016-09-27 2017-01-25 山东浪潮商用系统有限公司 Session information sharing method, device and system
CN107682406A (en) * 2017-09-08 2018-02-09 北京三快在线科技有限公司 The method, apparatus and system of a kind of business processing
CN107846433A (en) * 2016-09-19 2018-03-27 阿里巴巴集团控股有限公司 A kind of synchronous methods, devices and systems of session information
CN107895011A (en) * 2017-11-03 2018-04-10 携程旅游网络技术(上海)有限公司 Processing method, system, storage medium and the electronic equipment of session information
CN108055314A (en) * 2017-12-08 2018-05-18 锐捷网络股份有限公司 The management method and group system of a kind of group system
CN108540556A (en) * 2018-04-13 2018-09-14 南京新贝金服科技有限公司 A kind of fining Session clusters shared system and method based on cache

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262488B (en) * 2007-03-09 2012-05-09 中兴通讯股份有限公司 A content distribution network system and method
US8930527B2 (en) * 2009-05-26 2015-01-06 Oracle International Corporation High availability enabler
US20120210243A1 (en) * 2011-02-11 2012-08-16 Gavin Andrew Ross Uhma Web co-navigation
CN102497421B (en) * 2011-12-12 2014-05-28 湖南科技大学 Web server cluster system round-robin scheduling load balancing method with good fairness
US9578144B2 (en) * 2013-03-15 2017-02-21 Aerohive Networks, Inc. Layer 7 application classification
US9888068B2 (en) * 2013-04-06 2018-02-06 Citrix Systems, Inc. Systems and methods for maintaining session persistence in a cluster system
CN104834722B (en) * 2015-05-12 2018-03-02 网宿科技股份有限公司 Content Management System based on CDN
CN106550003B (en) * 2015-09-23 2020-09-11 腾讯科技(深圳)有限公司 Load balancing control method, device and system
CN105391737B (en) * 2015-12-14 2016-11-23 福建六壬网安股份有限公司 A kind of load balancing main frame group's file synchronization processing method

Patent Citations (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103389986A (en) * 2012-05-09 2013-11-13 阿里巴巴集团控股有限公司 Method, device and system for storing and searching Session information
CN104735098A (en) * 2013-12-18 2015-06-24 青岛海尔空调器有限总公司 Session information control method and system
CN105338095A (en) * 2015-11-17 2016-02-17 中国建设银行股份有限公司 Conversation data processing method and device
CN105516264A (en) * 2015-11-30 2016-04-20 努比亚技术有限公司 Distributed cluster system based session sharing method, apparatus and system
CN106339408A (en) * 2016-08-10 2017-01-18 深圳中兴网信科技有限公司 Data synchronization method, data synchronization device and server
CN107846433A (en) * 2016-09-19 2018-03-27 阿里巴巴集团控股有限公司 A kind of synchronous methods, devices and systems of session information
CN106357778A (en) * 2016-09-27 2017-01-25 山东浪潮商用系统有限公司 Session information sharing method, device and system
CN107682406A (en) * 2017-09-08 2018-02-09 北京三快在线科技有限公司 The method, apparatus and system of a kind of business processing
CN107895011A (en) * 2017-11-03 2018-04-10 携程旅游网络技术(上海)有限公司 Processing method, system, storage medium and the electronic equipment of session information
CN108055314A (en) * 2017-12-08 2018-05-18 锐捷网络股份有限公司 The management method and group system of a kind of group system
CN108540556A (en) * 2018-04-13 2018-09-14 南京新贝金服科技有限公司 A kind of fining Session clusters shared system and method based on cache

Also Published As

Publication number Publication date
CN109257448A (en) 2019-01-22

Similar Documents

Publication Publication Date Title
US9173006B2 (en) Method for live broadcasting in a distributed network and apparatus for the same
US10681127B2 (en) File upload method and system
US10637794B2 (en) Resource subscription method, resource subscription apparatus, and resource subscription system
US20060212595A1 (en) Method and computer-readable medium for associating sequence numbers with data blocks for distribution of data in a peer-to-peer network
CN108062243B (en) Execution plan generation method, task execution method and device
US20100174806A1 (en) Data Processing Method, Apparatus And System
WO2019218479A1 (en) Method and device for sending information
CN111567011B (en) Method for improving QoE of video service and WEB service by using cross-layer information
CN109257448B (en) Session information synchronization method and device, electronic equipment and storage medium
CN105450703A (en) Data caching method and data caching device
US9294563B2 (en) Apparatus and method for level-based self-adjusting peer-to-peer media streaming
CN114328618A (en) Cache data synchronization method, device, equipment and storage medium
CN110380967B (en) SSE technology-based server message pushing method
CN113678123A (en) Identity provider managing SSO sessions
US20150074234A1 (en) Content system and method for chunk-based content delivery
CN109542981B (en) Data synchronization system and method, electronic device and storage medium
US20140201376A1 (en) Method and system for the handling of redundant long poll
US10348597B2 (en) Monitoring server, resolution server, request device, and node selection method
CN105281940B (en) Method, equipment and system for HELLO message interaction based on NETCONF protocol
TWI489889B (en) Method and system for controlling flow of content delivery network and peer to peer network
EP2874368B1 (en) Method and device for generating aggregate layer networkmap and aggregate layer costmap
CN110460482B (en) Traffic acquisition method, device, server and medium
CN112243139B (en) Program distribution synchronization method and system of multimedia terminal
CN113612811B (en) Method, system, equipment and medium for client mounting in multiple channels
CN104602047A (en) Share method of EPG (error pattern generator) data, server, terminal and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant