CN109257448A - A kind of synchronous method and device of session information, electronic equipment, storage medium - Google Patents

A kind of synchronous method and device of session information, electronic equipment, storage medium Download PDF

Info

Publication number
CN109257448A
CN109257448A CN201811392432.6A CN201811392432A CN109257448A CN 109257448 A CN109257448 A CN 109257448A CN 201811392432 A CN201811392432 A CN 201811392432A CN 109257448 A CN109257448 A CN 109257448A
Authority
CN
China
Prior art keywords
session information
load balancing
client
service end
synchronous
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.)
Granted
Application number
CN201811392432.6A
Other languages
Chinese (zh)
Other versions
CN109257448B (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

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

This application provides a kind of synchronous method and devices of session information, electronic equipment, storage medium, which comprises receives and meets the session information collection that the synchronous service end of preset condition is sent, and is stored in local cache;Wherein, the session information collection is to obtain after the synchronous service end polymerize the session information received;When receiving the service request of the first client transmission, inquires the session information and concentrate with the presence or absence of the first session information corresponding with first client;When there are the first session information, using first session information, first client will be sent to for the processing result of the service request.By embodiments herein, realizes and session information cache is avoided being overly dependent upon synchronous service end, improve the efficiency of safety and the inquiry of session information, and reduce the occupancy of network bandwidth in local in the inquiry for the information that locally conversates.

Description

A kind of synchronous method and device of session information, electronic equipment, storage medium
Technical field
This application involves data processing fields, set more particularly to a kind of synchronous method and device of session information, electronics Standby, storage medium.
Background technique
Currently, the high availability in order to guarantee server, usually configures load balancing cluster for multiple servers, due to The presence of load balancing cluster, service request may be dispensed to different load balancing twice for the front and back that same client is sent Node is handled, and different load balancing nodes and the not stored session information for the client, so as to cause business Request timed out.
In the prior art, it when load balancing node needs some session information, can be carried out at synchronous service end Inquiry, to obtain session information, but the session information of this mode concentrates on synchronous service end, is overly dependent upon synchronous service End, such as synchronous server-side lose response, then all service requests will be overtime.
Moreover, the load balancing node in load balancing cluster is typically deployed at different computer rooms, when some session of needs It when information, needs to carry out the network inquiry across machine, occupies network bandwidth, and the stability of network will affect the efficiency of inquiry, And then service impacting quality.
Summary of the invention
In view of the above problems, the application is proposed in order to provide overcoming the above problem or at least being partially solved above-mentioned ask A kind of synchronous method and device of session information of topic, electronic equipment, storage medium, comprising:
A kind of method that session information is synchronous, is applied to load balancing node, the load balancing node belongs to a load Balancing cluster, which comprises
It receives and meets the session information collection that the synchronous service end of preset condition is sent, and be stored in local cache;Wherein, institute Stating session information collection is to obtain after the synchronous service end polymerize the session information received;
When receiving the service request of the first client transmission, inquire the session information concentrate with the presence or absence of with it is described Corresponding first session information of first client;
When there are the first session information, using first session information, the processing knot of the service request will be directed to Fruit is sent to first client.
Optionally, further includes:
When receiving the service request that the second client is sent for the first time, generate and second client corresponding second Session information, and second session information is sent to synchronous service end.
Optionally, the load balancing node includes the first client component and first service end component, the synchronous clothes Business end includes the second client component and second service end component;
Described the step of second session information is sent to synchronous service end includes:
Using first client component for the load balancing node for generating second session information, by described second Session information is sent to second service end component;Wherein, second service end component is used for the meeting received Words information obtains session information collection after being polymerize, and is sent to the session information collection by second client component First service end component.
It is described receive meet preset condition synchronous service end send session information collection the step of include:
Using first service end component, the session information collection that second client component is sent is received.
Optionally, the load balancing node stores the session information collection using red black tree preset in local cache.
Optionally, when multiple load balancing nodes constitute client/server architecture, the preset condition that meets Synchronous service end is service end node or the node determining according to determine instruction in client/server architecture;
When the Peer to Peer Architecture that multiple load balancing nodes are constituted, the synchronous service end for meeting preset condition For the load balancing node in multiple load balancing nodes in addition to current load balancing node.
A kind of method that session information is synchronous, applied to the synchronous service end for meeting preset condition, the synchronous service end Corresponding multiple load balancing nodes, the multiple load balancing node belong to a load balancing cluster, which comprises
When receiving the multiple load balancing node transmission session information, the session information is polymerize, is obtained To session information collection;
The session information collection is sent to the multiple load balancing node;Wherein, the load balancing node is used for The session information collection is stored in local cache, and when receiving the service request of the first client transmission, using described Session information concentrates the first session information corresponding with first client, will send out for the processing result of the service request It send to first client.
A kind of device that session information is synchronous, is applied to load balancing node, the load balancing node belongs to a load Balancing cluster, described device include:
Session information preserving module, for receiving the session information collection for meeting the synchronous service end of preset condition and sending, and It is stored in local cache;Wherein, the session information collection is that the synchronous service end carries out the session information received It is obtained after polymerization;
Session information enquiry module, for inquiring the session when receiving the service request of the first client transmission Information, which is concentrated, whether there is the first session information corresponding with first client;
Session information uses module, for that using first session information, will be directed to when there are the first session information The processing result of the service request is sent to first client.
A kind of device that session information is synchronous, applied to the synchronous service end for meeting preset condition, the synchronous service end Corresponding multiple load balancing nodes, the multiple load balancing node belong to a load balancing cluster, and described device includes:
Session information aggregation module, for when receiving the multiple load balancing node and sending session information, to institute It states session information to be polymerize, obtains session information collection;
Session information collection sending module, for the session information collection to be sent to the multiple load balancing node;Its In, the load balancing node is used to for the session information collection being stored in local cache, and is receiving the first client hair When the service request sent, the first session information corresponding with first client is concentrated using the session information, will be directed to The processing result of the service request is sent to first client.
A kind of electronic equipment, including processor, memory and be stored on the memory and can be in the processor The computer program of upper operation, the computer program realize that session information as described above is synchronous when being executed by the processor Method the step of.
A kind of computer readable storage medium stores computer program, the meter on the computer readable storage medium The step of method that as above described in any item session informations synchronize is realized when calculation machine program is executed by processor.
The application has the following advantages:
In this application, it by receiving the session information collection for meeting the synchronous service end of preset condition and sending, and is stored in Local cache, session information integrates the session information received is polymerize as synchronous service end after obtain, when receiving When the service request that one client is sent, inquiry session information is concentrated to be believed with the presence or absence of the first session corresponding with the first client Breath, using the first session information, will be sent to the first visitor for the processing result of service request when there are the first session information Family end realizes and avoids being overly dependent upon synchronous clothes in the inquiry for the information that locally conversates in local by session information cache It is engaged in end, improving the efficiency of safety and the inquiry of session information, and reduce the occupancy of network bandwidth.
Detailed description of the invention
It, below will be to attached needed in the description of the present application in order to illustrate more clearly of the technical solution of the application Figure is briefly described, it should be apparent that, the drawings in the following description are only some examples of the present application, for this field For those of ordinary skill, without any creative labor, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is the step flow chart for the method that a kind of session information that one embodiment of the application provides synchronizes;
Fig. 2 is a kind of schematic diagram for Synchronization Component that one embodiment of the application provides;
Fig. 3 is the step flow chart for the method that a kind of session information that one embodiment of the application provides synchronizes;
Fig. 4 is the structural block diagram for the device that a kind of session information that one embodiment of the application provides synchronizes;
Fig. 5 is the structural block diagram for the device that another session information that one embodiment of the application provides synchronizes.
Specific embodiment
In order to make the above objects, features, and advantages of the present application more apparent, with reference to the accompanying drawing and it is specific real Applying mode, the present application will be further described in detail.Obviously, described embodiment is some embodiments of the present application, without It is whole embodiments.Based on the embodiment in the application, those of ordinary skill in the art are not before making creative work Every other embodiment obtained is put, shall fall in the protection scope of this application.
Referring to Fig.1, the step flow chart for the method that a kind of session information that one embodiment of the application provides synchronizes is shown, This method can be applied to load balancing node, which may belong to a load balancing cluster, such as use TLS The game server cluster of (Transport Layer Security, secure transport layer protocol), can in the load balancing cluster With there are multiple load balancing nodes.
Specifically, may include steps of:
Step 101, it receives and meets the session information collection that the synchronous service end of preset condition is sent, and be stored in local slow It deposits;Wherein, session information integrates the session information received is polymerize as synchronous service end after obtain;
During business processing, since the service request of same client may be distributed to different load balancing sections Point, and different load balancing nodes and do not set up identical channel, then the recovery of channel can be carried out using session information, such as The symmetric cryptography channel shaken hands of TLS is restored using session information, then in order to realize session information between multiple load balancing nodes Synchronization, synchronous service end can be set.
In one embodiment, multiple load balancing nodes may be constructed client/server architecture, when multiple load balancing When node constitutes client/server architecture, meet the synchronous service end of preset condition for the server-side in client/server architecture Node or the node determined according to determine instruction.
In another embodiment, the Peer to Peer Architecture that multiple load balancing nodes may be constructed, when multiple load balancing When the Peer to Peer Architecture that node is constituted, the synchronous service end for meeting preset condition is in multiple load balancing nodes except current is born Carry the load balancing node except balanced node.
In practical applications, each load balancing node in load balancing cluster can send session to synchronous service end Information, after receiving session information, the session information received can be stored in volatile data base by synchronous service end, so The session information in volatile data base can be polymerize afterwards, obtain session information collection, and TCP can be used Session information collection is sent to multiple load balancing sections by (Transmission Control Protocol, transmission control protocol) Point.
For load balancing node, it can receive a plurality of types of data flows, after receiving data flow, load balancing Node can detecte the header information of data flow, when header information indicates that the data flow is session information collection, then by the meeting Words information collection is stored in local cache.
In one example, red black tree can be preset in load balancing node, after being parsed to session information collection, Such as formatted, load balancing node using the ASN.1 (Abstract Syntax Notation One) in OpenSSL Session information collection can be stored using the red black tree in local cache.
Step 102, when receive the first client transmission service request when, inquiry session information concentrate with the presence or absence of with Corresponding first session information of first client;
In the concrete realization, when receiving the service request of the first client transmission, it can inquire in local cache and deposit The session information of storage is concentrated with the presence or absence of in corresponding first session information of the first client, and the first visitor is inquired such as in red black tree The ID at family end obtains corresponding first session information of the first client.
Step 103, when there are the first session information, using the first session information, the processing knot of service request will be directed to Fruit is sent to the first client.
It concentrates and exists when the first session information collection when session information, then business can will be directed to using the first session information The processing result of request is sent to the first client.
In one embodiment of the application, it can also include the following steps:
When receiving the service request that the second client is sent for the first time, the second session corresponding with the second client is generated Information, and the second session information is sent to synchronous service end.
In practical applications, it is provided with hook, i.e. agenda in load balancing node, it is first when receiving the second client When the service request of secondary transmission, the second session information corresponding with the second client is can be generated in load balancing node, then can be with The second session information is output in local cache by ASN.1 coding using hook, is then forwarded to synchronous service end.
It, can be by load balancing section in order to realize that load balancing intra-node sufficiently decouples in one embodiment of the application Synchronizing function in point carries out modularization, such as Fig. 2, and load balancing node 201 may include the first client component 2011 and the One server-side component 2012, synchronous service end 202 may include the second client component 2021 and second service end component 2022.
In embodiments herein, by the way that the synchronizing function of session information in load balancing node is carried out modularization, So that the synchronizing function of session information and the business function of load balancing node are mutually isolated, even if the synchronizing function of session information It collapses, load balancing node can continue to carry out business processing using local session information, and business function will not It is impacted, improve the stability of business.
The step of the second session information is then sent to synchronous service end may include following sub-step:
Using the first client component of the load balancing node for generating the second session information, the second session information is sent To second service end component.
Wherein, second service end component is used to obtain session information collection after polymerizeing the session information received, and Session information collection is sent to first service end component by the second client component.
In the concrete realization, load balancing node can use the first client component, and the second session information is sent to Second service end component in synchronous service end, after receiving the second session information, second service end component can be to reception To session information polymerize, obtain session information collection.
After obtaining session information collection, session information collection can be sent to the second groups of clients by second service end component Part, the first service end component being sent to by the second client component in load balancing node.
Correspondingly, the step of receiving the session information collection for meeting the synchronous service end transmission of preset condition may include:
Using first service end component, the session information collection that the second client component is sent is received.
After the second client component sends session information collection, load balancing node can use first service end component, Receive session information collection.
In this application, it by receiving the session information collection for meeting the synchronous service end of preset condition and sending, and is stored in Local cache, session information integrates the session information received is polymerize as synchronous service end after obtain, when receiving When the service request that one client is sent, inquiry session information is concentrated to be believed with the presence or absence of the first session corresponding with the first client Breath, using the first session information, will be sent to the first visitor for the processing result of service request when there are the first session information Family end realizes and avoids being overly dependent upon synchronous clothes in the inquiry for the information that locally conversates in local by session information cache It is engaged in end, improving the efficiency of safety and the inquiry of session information, and reduce the occupancy of network bandwidth.
Referring to Fig. 3, the step flow chart for the method that a kind of session information that one embodiment of the application provides synchronizes is shown, This method can be applied to the synchronous service end for meeting preset condition, which corresponds to multiple load balancing nodes, should Multiple load balancing nodes belong to a load balancing cluster, specifically comprise the following steps:
Step 301, when receiving multiple load balancing nodes transmission session informations, session information is polymerize, is obtained To session information collection;
Step 302, it will words information collection is sent to multiple load balancing nodes;Wherein, load balancing node is for will Words information collection is stored in local cache, and when receiving the service request of the first client transmission, is concentrated using session information The first session information corresponding with the first client will be sent to the first client for the processing result of service request.
In practical applications, each load balancing node in load balancing cluster can send session to synchronous service end Information, after receiving session information, the session information received can be stored in volatile data base by synchronous service end, so The session information in volatile data base can be polymerize afterwards, obtain session information collection, and TCP can be used session information Collection is sent to multiple load balancing nodes.
After receiving data flow, load balancing node can detecte the header information of data flow, when header information indicates When the data flow is session information collection, which is stored in local cache.
When receiving the service request of the first client transmission, the session information collection stored in local cache can be inquired In with the presence or absence of in corresponding first session information of the first client, when session information is concentrated there are when the first session information collection, The first session information can be then used, the first client will be sent to for the processing result of service request.
In embodiments herein, by receiving the session information collection for meeting the synchronous service end of preset condition and sending, And be stored in local cache, session information integrates the session information received is polymerize as synchronous service end after obtain, when When receiving the service request of the first client transmission, inquiry session information is concentrated with the presence or absence of corresponding with the first client the One session information, using the first session information, will be sent when there are the first session information for the processing result of service request To the first client, realizes and avoid depending on unduly in the inquiry for the information that locally conversates in local by session information cache In synchronous service end, the efficiency of safety and the inquiry of session information is improved, and reduces the occupancy of network bandwidth.
It should be noted that for simple description, therefore, it is stated as a series of action groups for embodiment of the method It closes, but those skilled in the art should understand that, the embodiment of the present application is not limited by the described action sequence, because according to According to the embodiment of the present application, some steps may be performed in other sequences or simultaneously.Secondly, those skilled in the art also should Know, the embodiments described in the specification are all preferred embodiments, and related movement not necessarily the application is implemented Necessary to example.
Referring to Fig. 4, the structural block diagram for the device that a kind of session information that one embodiment of the application provides synchronizes is shown, is answered For load balancing node, which belongs to a load balancing cluster, which includes:
Session information preserving module 401, for receiving the session information collection for meeting the synchronous service end of preset condition and sending, And it is stored in local cache;Wherein, session information integrates the session information received is polymerize as synchronous service end after obtain 's;
Session information enquiry module 402, for when receiving the service request of the first client transmission, inquiry session to be believed Breath, which is concentrated, whether there is the first session information corresponding with the first client;
Session information uses module 403, for that using the first session information, will be directed to when there are the first session information The processing result of service request is sent to the first client.
In one embodiment of the application, further includes:
Second session information sending module, for generating when receiving the service request that the second client is sent for the first time The second session information corresponding with the second client, and the second session information is sent to synchronous service end.
In one embodiment of the application, load balancing node includes the first client component and first service end component, together Walking server-side includes the second client component and second service end component, and the second session information sending module includes:
First client component sending submodule, for using the first of the load balancing node for generating the second session information Second session information is sent to second service end component by client component;Wherein, second service end component is used for receiving Session information polymerize after obtain session information collection, and session information collection is sent to first by the second client component Server-side component;
Session information preserving module 401 includes:
First service end component receiving submodule receives the second client component hair for using first service end component The session information collection sent.
In one embodiment of the application, load balancing node stores session information using red black tree preset in local cache Collection.
In one embodiment of the application, when multiple load balancing nodes constitute client/server architecture, meet default item The synchronous service end of part is service end node or the node determining according to determine instruction in client/server architecture;
When the Peer to Peer Architecture that multiple load balancing nodes are constituted, it is multiple negative for meeting the synchronous service end of preset condition Carry the load balancing node in balanced node in addition to current load balancing node.
Referring to Fig. 5, the structural block diagram for the device that another session information that one embodiment of the application provides synchronizes is shown, Applied to the synchronous service end for meeting preset condition, which corresponds to multiple load balancing nodes, multiple load balancing Node belongs to a load balancing cluster, which includes:
Session information aggregation module 501, for when receiving multiple load balancing nodes and sending session information, to session Information is polymerize, and session information collection is obtained;
Session information collection sending module 502, for session information collection to be sent to multiple load balancing nodes;Wherein, it bears It carries balanced node and is used to for session information collection being stored in local cache, and in the service request for receiving the transmission of the first client When, the first session information corresponding with the first client is concentrated using session information, will be sent out for the processing result of service request It send to the first client.
It should be noted that for device embodiment, since it is basically similar to the method embodiment, so description Fairly simple, the relevent part can refer to the partial explaination of embodiments of method.
One embodiment of the application additionally provides a kind of electronic equipment, may include processor, memory and is stored in storage On device and the computer program that can run on a processor, session information as above is realized when computer program is executed by processor The step of synchronous method.
One embodiment of the application additionally provides a kind of computer readable storage medium, stores on computer readable storage medium Computer program, the step of session information as above synchronous method is realized when computer program is executed by processor.
All the embodiments in this specification are described in a progressive manner, the highlights of each of the examples are with The difference of other embodiments, the same or similar parts between the embodiments can be referred to each other.
It should be understood by those skilled in the art that, the embodiments of the present application may be provided as method, apparatus or calculating Machine program product.Therefore, the embodiment of the present application can be used complete hardware embodiment, complete software embodiment or combine software and The form of the embodiment of hardware aspect.Moreover, the embodiment of the present application can be used one or more wherein include computer can With in the computer-usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) of program code The form of the computer program product of implementation.
The embodiment of the present application is referring to according to the method for the embodiment of the present application, terminal device (system) and computer program The flowchart and/or the block diagram of product describes.It should be understood that flowchart and/or the block diagram can be realized by computer program instructions In each flow and/or block and flowchart and/or the block diagram in process and/or box combination.It can provide these Computer program instructions are set to general purpose computer, special purpose computer, Embedded Processor or other programmable data processing terminals Standby processor is to generate a machine, so that being held by the processor of computer or other programmable data processing terminal devices Capable instruction generates for realizing in one or more flows of the flowchart and/or one or more blocks of the block diagram The device of specified function.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing terminal devices In computer-readable memory operate in a specific manner, so that instruction stored in the computer readable memory generates packet The manufacture of command device is included, which realizes in one side of one or more flows of the flowchart and/or block diagram The function of being specified in frame or multiple boxes.
These computer program instructions can also be loaded into computer or other programmable data processing terminal devices, so that Series of operation steps are executed on computer or other programmable terminal equipments to generate computer implemented processing, thus The instruction executed on computer or other programmable terminal equipments is provided for realizing in one or more flows of the flowchart And/or in one or more blocks of the block diagram specify function the step of.
Although preferred embodiments of the embodiments of the present application have been described, once a person skilled in the art knows bases This creative concept, then additional changes and modifications can be made to these embodiments.So the following claims are intended to be interpreted as Including preferred embodiment and all change and modification within the scope of the embodiments of the present application.
Finally, it is to be noted that, herein, relational terms such as first and second and the like be used merely to by One entity or operation are distinguished with another entity or operation, without necessarily requiring or implying these entities or operation Between there are any actual relationship or orders.Moreover, the terms "include", "comprise" or its any other variant meaning Covering non-exclusive inclusion, so that process, method, article or terminal device including a series of elements not only wrap Those elements are included, but also including other elements that are not explicitly listed, or further includes for this process, method, article Or the element that terminal device is intrinsic.In the absence of more restrictions, being wanted by what sentence "including a ..." limited Element, it is not excluded that there is also other identical elements in process, method, article or the terminal device for including the element.
Method and device to a kind of session information synchronization provided herein, electronic equipment, storage medium above, into It has gone and has been discussed in detail, specific examples are used herein to illustrate the principle and implementation manner of the present application, the above implementation The explanation of example is merely used to help understand the present processes and its core concept;Meanwhile for the general technology people of this field Member, according to the thought of the application, there will be changes in the specific implementation manner and application range, in conclusion this explanation Book content should not be construed as the limitation to the application.

Claims (10)

1. a kind of synchronous method of session information, which is characterized in that be applied to load balancing node, the load balancing node category In a load balancing cluster, which comprises
It receives and meets the session information collection that the synchronous service end of preset condition is sent, and be stored in local cache;Wherein, the meeting Words information collection is to obtain after the synchronous service end polymerize the session information received;
When receiving the service request of the first client transmission, inquiring the session information and concentrating whether there is and described first Corresponding first session information of client;
When there are the first session information, using first session information, it will be sent out for the processing result of the service request It send to first client.
2. the method according to claim 1, wherein further include:
When receiving the service request that the second client is sent for the first time, the second session corresponding with second client is generated Information, and second session information is sent to synchronous service end.
3. according to the method described in claim 2, it is characterized in that, the load balancing node include the first client component and First service end component, the synchronous service end include the second client component and second service end component;
Described the step of second session information is sent to synchronous service end includes:
Using first client component for the load balancing node for generating second session information, by second session Information is sent to second service end component;Wherein, second service end component is used to believe the session received Breath obtains session information collection after being polymerize, and described in by second client component being sent to the session information collection First service end component.
It is described receive meet preset condition synchronous service end send session information collection the step of include:
Using first service end component, the session information collection that second client component is sent is received.
4. method according to claim 1 or 2 or 3, which is characterized in that the load balancing node is using in local cache Preset red black tree stores the session information collection.
5. the method according to claim 1, wherein
When multiple load balancing nodes constitute client/server architecture, the synchronous service end for meeting preset condition For the service end node in client/server architecture or the node determined according to determine instruction;
When the Peer to Peer Architecture that multiple load balancing nodes are constituted, the synchronous service end for meeting preset condition is more Load balancing node in a load balancing node in addition to current load balancing node.
6. a kind of synchronous method of session information, which is characterized in that described same applied to the synchronous service end for meeting preset condition Step server-side corresponds to multiple load balancing nodes, and the multiple load balancing node belongs to a load balancing cluster, the method Include:
When receiving the multiple load balancing node transmission session information, the session information is polymerize, must be attended the meeting Talk about information collection;
The session information collection is sent to the multiple load balancing node;Wherein, the load balancing node is used for institute It states session information collection and is stored in local cache, and when receiving the service request of the first client transmission, using the session Information concentrates the first session information corresponding with first client, will be sent to for the processing result of the service request First client.
7. a kind of synchronous device of session information, which is characterized in that be applied to load balancing node, the load balancing node category In a load balancing cluster, described device includes:
Session information preserving module for receiving the session information collection for meeting the synchronous service end of preset condition and sending, and saves In local cache;Wherein, the session information collection is that the synchronous service end polymerize the session information received It obtains afterwards;
Session information enquiry module, for inquiring the session information when receiving the service request of the first client transmission It concentrates and whether there is the first session information corresponding with first client;
Session information uses module, for that using first session information, will be directed to described when there are the first session information The processing result of service request is sent to first client.
8. a kind of synchronous device of session information, which is characterized in that described same applied to the synchronous service end for meeting preset condition Step server-side corresponds to multiple load balancing nodes, and the multiple load balancing node belongs to a load balancing cluster, described device Include:
Session information aggregation module, for when receiving the multiple load balancing node and sending session information, to the meeting Words information is polymerize, and session information collection is obtained;
Session information collection sending module, for the session information collection to be sent to the multiple load balancing node;Wherein, institute Load balancing node is stated for the session information collection to be stored in local cache, and in the industry for receiving the transmission of the first client When business request, the first session information corresponding with first client is concentrated using the session information, the industry will be directed to The processing result of business request is sent to first client.
9. a kind of electronic equipment, which is characterized in that including processor, memory and be stored on the memory and can be in institute The computer program run on processor is stated, such as claim 1 to 6 is realized when the computer program is executed by the processor Any one of described in session information synchronous method the step of.
10. a kind of computer readable storage medium, which is characterized in that store computer journey on the computer readable storage medium Sequence is realized when the computer program is executed by processor as session information described in any one of claims 1 to 6 is synchronous The step of method.
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 true CN109257448A (en) 2019-01-22
CN109257448B 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)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532732A (en) * 2020-12-03 2021-03-19 郑州阿帕斯数云信息科技有限公司 HTTPS-based session processing method and device
CN113706160A (en) * 2021-09-09 2021-11-26 中国银行股份有限公司 Method and device for uploading image before transaction submission
CN115242812A (en) * 2022-07-25 2022-10-25 济南浪潮数据技术有限公司 Node data synchronization method and device and computer readable storage medium

Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262488A (en) * 2007-03-09 2008-09-10 中兴通讯股份有限公司 A content distribution network system and method
US20110131318A1 (en) * 2009-05-26 2011-06-02 Oracle International Corporation High availability enabler
CN102497421A (en) * 2011-12-12 2012-06-13 湖南科技大学 Web server cluster system round-robin scheduling load balancing method with good fairness
US20120210243A1 (en) * 2011-02-11 2012-08-16 Gavin Andrew Ross Uhma Web co-navigation
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
CN104834722A (en) * 2015-05-12 2015-08-12 网宿科技股份有限公司 CDN (Content Delivery Network)-based content management system
CN105338095A (en) * 2015-11-17 2016-02-17 中国建设银行股份有限公司 Conversation data processing method and device
CN105391737A (en) * 2015-12-14 2016-03-09 福建六壬网安股份有限公司 Load balancing host group file synchronous processing system and processing method thereof
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
CN106550003A (en) * 2015-09-23 2017-03-29 腾讯科技(深圳)有限公司 The control method of load balancing, apparatus and system
US9888068B2 (en) * 2013-04-06 2018-02-06 Citrix Systems, Inc. Systems and methods for maintaining session persistence in a cluster 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
US20180205674A1 (en) * 2013-03-15 2018-07-19 Aerohive Networks, Inc. Layer 7 application classification
CN108540556A (en) * 2018-04-13 2018-09-14 南京新贝金服科技有限公司 A kind of fining Session clusters shared system and method based on cache

Patent Citations (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101262488A (en) * 2007-03-09 2008-09-10 中兴通讯股份有限公司 A content distribution network system and method
US20110131318A1 (en) * 2009-05-26 2011-06-02 Oracle International Corporation High availability enabler
US20120210243A1 (en) * 2011-02-11 2012-08-16 Gavin Andrew Ross Uhma Web co-navigation
CN102497421A (en) * 2011-12-12 2012-06-13 湖南科技大学 Web server cluster system round-robin scheduling load balancing method with good fairness
CN103389986A (en) * 2012-05-09 2013-11-13 阿里巴巴集团控股有限公司 Method, device and system for storing and searching Session information
US20180205674A1 (en) * 2013-03-15 2018-07-19 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
CN104735098A (en) * 2013-12-18 2015-06-24 青岛海尔空调器有限总公司 Session information control method and system
CN104834722A (en) * 2015-05-12 2015-08-12 网宿科技股份有限公司 CDN (Content Delivery Network)-based content management system
CN106550003A (en) * 2015-09-23 2017-03-29 腾讯科技(深圳)有限公司 The control method of load balancing, apparatus 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
CN105391737A (en) * 2015-12-14 2016-03-09 福建六壬网安股份有限公司 Load balancing host group file synchronous processing system and processing method thereof
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

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
SHAOFUQIJIE: ""负载均衡的服务器集群上如何进行缓存和会话数据的管理"", 《HTTPS://BLOG.CSDN.NET/SHAOFUQIJIE/ARTICLE/DETAILS/80080747》 *
彭军: ""Linux服务器负载均衡的研究与实现"", 《计算机与数字工程》 *

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112532732A (en) * 2020-12-03 2021-03-19 郑州阿帕斯数云信息科技有限公司 HTTPS-based session processing method and device
CN112532732B (en) * 2020-12-03 2023-12-05 郑州阿帕斯数云信息科技有限公司 Session processing method and device based on HTTPS
CN113706160A (en) * 2021-09-09 2021-11-26 中国银行股份有限公司 Method and device for uploading image before transaction submission
CN115242812A (en) * 2022-07-25 2022-10-25 济南浪潮数据技术有限公司 Node data synchronization method and device and computer readable storage medium

Also Published As

Publication number Publication date
CN109257448B (en) 2021-07-09

Similar Documents

Publication Publication Date Title
CN109257448A (en) A kind of synchronous method and device of session information, electronic equipment, storage medium
CN110225131A (en) A kind of service calling method and device
US11330333B2 (en) Methods of and devices for adaptive bit rate, ABR, video resolution shaping of a video stream in a telecommunications system
CN105530272B (en) A kind of synchronous method and device using data
Conway-Jones et al. Demonstration of federated learning in a resource-constrained networked environment
CN104618237A (en) TCP/UDP (Transmission Control Protocol/User Datagram Protocol)-based wide area network acceleration system and method
US20160134509A1 (en) Path acquisition method, path computation element, path computation client and system
CN108111333A (en) A kind of flow limitation method and system based on WEB
CN105656964B (en) The implementation method and device of data-pushing
CN107580021A (en) A kind of method and apparatus of file transmission
CN115334025B (en) Decentralized instant messaging method, decentralized instant messaging device, decentralized instant messaging equipment and storage medium
CN113678123A (en) Identity provider managing SSO sessions
CN109981538A (en) Registration method and system of subscription event, and processing method and system of subscription event
CN107784009A (en) Data query, data query processing method and processing device
US8302168B2 (en) Push artifact binding for communication in a federated identity system
Kim et al. An efficient software defined data transmission scheme based on mobile edge computing for the massive IoT environment
CN115484173B (en) Flow simulation method of digital twin network and digital twin network
ATE470325T1 (en) METHOD AND DEVICES FOR PROCESSING AND MANAGING SUBSCRIBER DATA IN A TELECOMMUNICATIONS NETWORK
CN109542981A (en) A kind of system and method, electronic equipment, storage medium that data synchronize
CN105763447B (en) Method and device for acquiring label switching path state
CN103929365B (en) A kind of SiteServer LBS and method suitable for UDP service
CN108900603A (en) A kind of server discovery methods, devices and systems
US20070180151A1 (en) Model driven message processing
CN110149219A (en) A kind of capture apparatus configuration method and device
Surkov et al. Method of migration from single server system to server cluster

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