CN107846433A - A kind of synchronous methods, devices and systems of session information - Google Patents

A kind of synchronous methods, devices and systems of session information Download PDF

Info

Publication number
CN107846433A
CN107846433A CN201610833857.0A CN201610833857A CN107846433A CN 107846433 A CN107846433 A CN 107846433A CN 201610833857 A CN201610833857 A CN 201610833857A CN 107846433 A CN107846433 A CN 107846433A
Authority
CN
China
Prior art keywords
load
identification information
session
balancing device
information
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201610833857.0A
Other languages
Chinese (zh)
Inventor
梁军
孙成浩
陈家军
薛蹦蹦
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding 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 Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Priority to CN201610833857.0A priority Critical patent/CN107846433A/en
Publication of CN107846433A publication Critical patent/CN107846433A/en
Pending legal-status Critical Current

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/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
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/60Network streaming of media packets
    • H04L65/61Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio
    • H04L65/611Network streaming of media packets for supporting one-way streaming services, e.g. Internet radio for multicast or broadcast
    • 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
    • H04L67/1004Server selection for load balancing
    • 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/141Setup of application sessions
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Multimedia (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The application provides a kind of session information synchronous methods, devices and systems, and this method includes:First load-balancing device obtains the session information of the first session;Obtain the identification information for the first processor for creating first session;The session information and the identification information are added in multicast message, and the multicast message is sent with multicast mode;So that the second load-balancing device for receiving the multicast message parses the identification information and the session information from the multicast message, and utilize the mapping relations, select second processor corresponding to the identification information, and the session information is sent to the second processor, create the first session using the session information by the second processor.By the technical scheme of the application, business processing mistake can be avoided, multiple substantial amounts of session informations of processor parallel synchronous can be made full use of, realize the lifting of net synchronization capability, and improves the utilization rate of processor, lifts synchronous efficiency.

Description

A kind of synchronous methods, devices and systems of session information
Technical field
The application is related to internet arena, more particularly to the methods, devices and systems that a kind of session information is synchronous.
Background technology
As shown in figure 1, it is SLB (Server Load Balancing, server load balancing) or LVS (Linux Virtual Server, Linux virtual server) networking schematic diagram, multiple servers in server cluster carry jointly For same application, such as WEB (webpage) applications.The corresponding virtual ip address of multiple servers in server cluster, and often Individual server has corresponding real IP address.
When client needs to access server, it is the virtual ip address that can send purpose IP address to load-balancing device Message.Load-balancing device can be that the message selects a server, and utilize the service after the message is received The real IP address of device, the message is sent to the server.
In above-mentioned processing procedure, it is that the message selects server that load-balancing device, which can be based on load-balancing algorithm, In this manner it is ensured that substantial amounts of message is uniformly distributed to each server, so as to improve the disposed of in its entirety of multiple servers Performance.Moreover, when there is server fail, the server of load-balancing device meeting automatic shield failure, without in the future The server is sent to from the message of client.
In the prior art,, can be with SLB or LVS networking in order to solve the Single Point of Faliure of load-balancing device Dispose multiple load-balancing devices., can be by other loads when a load-balancing device stops service (such as breaking down) Balancing equipment continues offer service, and guarantee business is not interrupted.
But above-mentioned technical proposal can cause business processing mistake under some scenes.For example, load-balancing device 1 will Message 1 from client 1 is sent to server 1, and needs the message 2 from client 1 being sent to server 1, so, Server 1 is handled the business of client 1 using message 1 and message 2.Assuming that message 1 is sent to by load-balancing device 1 After server 1, stop service, then load-balancing device 2 can receive the message 2 from client 1, and load-balancing device 2 The server of message 2 can be reselected, such as selects server 2, so, message 2 can be sent to server 2.Due to the He of message 1 Message 2 is sent to different servers, business that just can not be by same server by utilizing message 1 and message 2 to client 1 Handled, so as to cause business processing mistake, the service disconnection of user.
The content of the invention
The application provides a kind of session information synchronous method, applied to including the first load-balancing device and at least one In the system of second load-balancing device, the first load-balancing device includes multiple first processors, the second load-balancing device Including multiple second processors, the identification information and second processor of first processor are configured with the second load-balancing device Identification information mapping relations, methods described includes:
First load-balancing device obtains the session information of the first session;
First load-balancing device obtains the identification information for the first processor for creating first session;
The session information and the identification information are added in multicast message by first load-balancing device, and with Multicast mode sends the multicast message;So as to the second load-balancing device of the multicast message is received from the multicast message In parse the identification information and the session information, and utilize the mapping relations, select the identification information corresponding Second processor, and the session information is sent to the second processor, the session is utilized by the second processor The session of information creating first.
The application provides a kind of session information synchronous method, applied to including the first load-balancing device and at least one In the system of second load-balancing device, the first load-balancing device includes multiple first processors, the second load-balancing device Including multiple second processors, the identification information and second processor of first processor are configured with the second load-balancing device Identification information mapping relations, methods described includes:
First load-balancing device obtains the session information of the first session, and obtains and create the of first session The identification information of one processor, and the session information and the identification information are added in multicast message, and with multicast side Formula sends the multicast message to the second load-balancing device;
Second load-balancing device parses described after the multicast message is received from the multicast message Identification information and the session information, and the mapping relations are utilized, second processor corresponding to the identification information is selected, and The session information is sent to the second processor, the first meeting is created using the session information by the second processor Words.
The application provides a kind of session information synchronous device, applied to including the first load-balancing device and at least one In the system of second load-balancing device, first load-balancing device includes multiple first processors, second load Balancing equipment includes multiple second processors, and the identification information of first processor is configured with second load-balancing device With the mapping relations of the identification information of second processor, described device is applied on first load-balancing device, and described Device specifically includes:
First acquisition unit, for obtaining the session information of the first session;
Second acquisition unit, for obtaining the identification information for the first processor for creating first session;
Processing unit, for the session information and the identification information to be added in multicast message;
Transmitting element, for sending the multicast message with multicast mode;So that receive the multicast message second is negative Carry balancing equipment and the identification information and the session information are parsed from the multicast message, and closed using the mapping System, selects second processor corresponding to the identification information, and the session information is sent into the second processor, by institute State second processor and create the first session using the session information.
The application provides a kind of session information synchronous device, applied to including the first load-balancing device and at least one In the system of second load-balancing device, first load-balancing device includes multiple first processors, second load Balancing equipment includes multiple second processors, and the identification information of first processor is configured with second load-balancing device With the mapping relations of the identification information of second processor, described device is applied on second load-balancing device, and described Device specifically includes:
Receiving unit, for receiving the multicast message from first load-balancing device;The multicast message includes The identification information of the session information of first session, the first processor of establishment first session;
Resolution unit, for parsing the identification information and the session information from the multicast message;
Selecting unit, for utilizing the mapping relations, select second processor corresponding to the identification information;
Transmitting element, for the session information to be sent into the second processor, utilized by the second processor The session information creates the first session.
The application provides a kind of session information synchronous system, and the system includes the first load-balancing device and at least one Individual second load-balancing device;Wherein, first load-balancing device includes multiple first processors, and second load is equal Weighing apparatus equipment includes multiple second processors, and the identification information of first processor is configured with second load-balancing device With the mapping relations of the identification information of second processor;
First load-balancing device includes:First acquisition unit, for obtaining the session information of the first session;Second Acquiring unit, for obtaining the identification information for the first processor for creating first session;Processing unit, for by the meeting Words information and the identification information are added in multicast message;First transmitting element, for equal to the second load with multicast mode The equipment that weighs sends the multicast message;
Second load-balancing device includes:Receiving unit, for receiving from first load-balancing device Multicast message;Resolution unit, for after the multicast message is received, parsing the mark letter from the multicast message Breath and the session information;Selecting unit, for utilizing the mapping relations, select second processing corresponding to the identification information Device;Transmitting element, for the session information to be sent into the second processor, the meeting is utilized by the second processor Talk about the session of information creating first.
Based on above-mentioned technical proposal, in the embodiment of the present application, by the way that the session information of this load-balancing device is synchronized to Other load-balancing devices, so that other load-balancing devices are localling create identical session, so as to avoid at business Manage mistake.For example, the session information of local can be synchronized to load-balancing device 2 by load-balancing device 1, so that load balancing Equipment 2 is localling create identical session.Based on the session of local, load-balancing device 1 sends out the message 1 from client 1 Server 1 is given, and the message 2 from client 1 is sent to server 1.Assuming that load-balancing device 1 is sent out by message 1 After giving server 1, stop service, then load-balancing device 2 can receive the message 2 from client 1, equal based on load The local session of the equipment that weighs 2, message 2 can be also sent to server 1 by load-balancing device 2, without being destined to other clothes Business device.So, the can of server 1 is handled the business of client 1 using message 1 and message 2, so as to avoid industry Business processing mistake, guarantee business are not interrupted.
Moreover, the identification information of processor corresponding to session information can also be sent to other bear by this load-balancing device Balancing equipment is carried, so that other load-balancing devices select the processor corresponding with the identification information to carry out the session information Processing.So, a processor can be specified to handle session information on load-balancing device, rather than multiple processors are same Shi Jingzheng is handled session information, avoids the competition between multiple processors, so as to make full use of multiple processing The substantial amounts of session information of device parallel synchronous, the lifting of net synchronization capability is realized, and the utilization rate of processor can be improved, lifting is same Walk efficiency.
Brief description of the drawings
, below will be to the application in order to clearly illustrate the embodiment of the present application or technical scheme of the prior art The required accompanying drawing used is briefly described in embodiment or description of the prior art, it should be apparent that, in describing below Accompanying drawing is only some embodiments described in the application, for those of ordinary skill in the art, can also be according to these Accompanying drawing obtains other accompanying drawings.
Fig. 1 is SLB or LVS networking schematic diagram;
Fig. 2 is the application scenarios schematic diagram in a kind of embodiment of the application;
Fig. 3 is the application scenarios schematic diagram of the multiprocessor in a kind of embodiment of the application;
Fig. 4 is the flow chart of the synchronous method of the session information in a kind of embodiment of the application;
Fig. 5 is the flow chart of the synchronous method of the session information in the application another embodiment;
Fig. 6 is the hardware structure diagram of the load-balancing device in a kind of embodiment of the application;
Fig. 7 is the structure chart of the synchronous device of the session information in a kind of embodiment of the application;
Fig. 8 is the structure chart of the synchronous device of the session information in the application another embodiment.
Embodiment
Purpose in term used in this application merely for the sake of description specific embodiment, and unrestricted the application.This Shen Please " one kind " with the singulative used in claims, " described " and "the" are also intended to including most forms, unless Context clearly shows that other implications.It is also understood that term "and/or" used herein refers to comprising one or more Associated list items purpose any or all may combine.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the application A little information should not necessarily be limited by these terms.These terms are only used for same type of information being distinguished from each other out.For example, do not departing from In the case of the application scope, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as One information.Depending on linguistic context, in addition, used word " if " can be construed to " ... when " or " when ... " Or " in response to determining ".
For problems of the prior art, a kind of synchronous method of session information is proposed in the embodiment of the present application, should Method can be applied under SLB or LVS networking scene.As shown in Fig. 2 illustrate for the application scenarios of the embodiment of the present application Figure, includes multiple servers, this multiple server provides same application, such as WEB for client jointly in server cluster Using etc..Wherein, the corresponding virtual address of multiple servers in server cluster, and each server have corresponding to it is true Address.In addition, include at least two load-balancing devices in load balancing cluster, when load balancing cluster includes two loads During the equipment that weighs, then the two load-balancing devices can be handled using active-standby mode, i.e. a load-balancing device conduct Main load-balancing device, another load-balancing device are used as standby load-balancing device.When load balancing cluster include three or During the load-balancing device that person is more than three, then these load-balancing devices can use cluster deployment mode.In above two Under deployment mode, when a load-balancing device stops service (such as breaking down), it can be set by other load balancing It is standby that offer service is provided, so as to ensure that business is not interrupted.
In one example, address can be network address, such as IP address.In IPv4 networks, IP address can be IPv4 addresses, in IPv6 networks, IP address can be IPv6 addresses.For convenience of description, subsequently by taking IP address as an example.As described above Virtual address be virtual ip address, true address is real IP address.
Wherein, Fig. 2 is a kind of typical network topology structure, but is not unique topological structure, for other topologys Structure, processing mode is identical with the processing mode of the embodiment of the present application, will not be repeated here.For more in load balancing cluster For individual load-balancing device, ECMP (Equal Cost Multipath can be used between multiple load-balancing devices Routing, equal-cost route) load balancing mode processing.
When client needs to access server, purpose IP address can be sent to load-balancing device as virtual ip address Message.For load-balancing device after the message is received, it is that the message selects server, and profit that can be based on load-balancing algorithm The message is sent to server with the real IP address of the server.
In order to which the message of client is sent into same server, to avoid business processing mistake, then need Simultaneous session information between load-balancing device.For simultaneous session information, in one example, load-balancing device 1 can be with The session information of local is synchronized to other all load-balancing devices, such as load-balancing device 2 and load-balancing device 3, after Continue exemplified by being synchronized to load-balancing device 2.
In one example, the session information of local is encapsulated into multicast message by load-balancing device 1, and with multicast mode Send multicast message.Load-balancing device 2 is after multicast message is received, according to the session information in the multicast message, at this Session corresponding to being created on load-balancing device 2.When creating session, due to multiple processors be present on load-balancing device 2, These processors can compete the process for creating session.When a processor creates session, in order to prevent producing with other processors Raw competition, then present processor can be that other processors lock, so that other processors can not handle session information, can not create meeting Words.But because other processors are locked, therefore, in the same time, only a processor can handle session information, And session is created, and the resource of other processors is wasted, synchronous high-volume conversation information that can not be concurrently.
Based on above-mentioned discovery, the method for the session information synchronization proposed in the embodiment of the present application, above-mentioned synchronization mechanism is entered Row improves, and a processor can be specified to handle session information on load-balancing device, it is not necessary to other processing Device carries out locking processing, so as to make full use of multiple processor parallel synchronous high-volume conversation information, realizes net synchronization capability Lifting, the utilization rate of processor is improved, lift synchronous efficiency.
In the embodiment of the present application, the synchronous method of the session information can apply to include the first load-balancing device (such as Load-balancing device 1 in Fig. 2) and at least one second load-balancing device (load-balancing device 2 and load in such as Fig. 2 Balancing equipment 3) system in, the first load-balancing device includes multiple first processors, and the second load-balancing device includes more Individual second processor, and the processor quantity and the second load balancing that are used for processing data forwarding on the first load-balancing device The processor quantity for being used for processing data forwarding in equipment is identical.For example, on the first load-balancing device be used for handle number Processor quantity according to forwarding is 8, and the processor quantity for being used for processing data forwarding on the second load-balancing device For 8.
In one example, the identification information and second processing of first processor are configured with the second load-balancing device The mapping relations of the identification information of device.In the mapping relations, the identification information of first processor and the mark of second processor Information is identical;Or carry out computing to the identification information of first processor using the first preset algorithm, at operation result and second The identification information for managing device is identical;Or computing, computing knot are carried out to the identification information of second processor using the second preset algorithm Fruit is identical with the identification information of first processor.
For example, as shown in figure 3, include processor 1, processor 2 ..., processor 8, load balancing on load-balancing device 1 Include processor 1, processor 2 ..., processor 8 in equipment 2, processor 1, processor 2 ..., place are included on load-balancing device 3 Manage device 8.The mapping relations configured on the load-balancing device 3 of load-balancing device 2/ can be such as table 1 or table 2 or the institute of table 3 Show.It is the situation for " identification information of first processor is identical with the identification information of second processor " in table 1.In table 2 In, it is for " carrying out computing, operation result and second processor to the identification information of first processor using the first preset algorithm Identification information it is identical " situation, moreover, the first preset algorithm is add operation, such as add-one operation, in actual applications, first Preset algorithm can also be other algorithms such as subtraction, multiplying, without limitation in the embodiment of the present application.In table 3 In, it is for " carrying out computing, operation result and first processor to the identification information of second processor using the second preset algorithm Identification information it is identical " situation, moreover,
Second preset algorithm is add operation, such as add-one operation, and in actual applications, the second preset algorithm, which can also be, to be subtracted Other algorithms such as method computing, multiplying, it is without limitation in the embodiment of the present application.
Table 1
The identification information of first processor The identification information of second processor
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
Table 2
The identification information of first processor The identification information of second processor
2 1
3 2
4 3
5 4
6 5
7 6
9 7
1 8
Table 3
In one example, processing implement body can include but is not limited to CPU (Central Processing Unit, in Central processor).In addition, session information can specifically include but is not limited to:Five-tuple information (such as source IP address, purpose IP address, Source port mark, destination interface mark, protocol type etc.), session state information (as connection establish state, connection wait state, Connection closed state, receive data mode etc.), real server information (IP address of such as real server, port, shape can be used State etc.).In addition, in actual applications, the session information can also be referred to as Session information, flow table information is referred to as.
Under above-mentioned application scenarios, as shown in figure 4, the method for session information synchronization comprises the following steps:
Step 401, the first load-balancing device obtains the session information of the first session.
In one example, the first load-balancing device obtains the process of the session information of the first session, can specifically wrap Include but be not limited to following manner:When creating the first session on first processor, then the first load-balancing device obtains first The session information of session;Or when the session status of the first session changes, then the first load-balancing device obtains first The session information of session;Or first load-balancing device can periodically obtain the session information of the first session.Certainly, exist In practical application, it is not limited to which above-mentioned acquisition modes, for example, when meeting preparatory condition, then the first load-balancing device obtains The session information of the first session is taken, the preparatory condition can include but is not limited to the condition that user rule of thumb configures, such as 5 reports Text etc., based on this, for the first session, 5 messages are often received, just obtain the session information of first session.
Step 402, the first load-balancing device obtains the identification information for the first processor for creating the first session.
For example, it is assumed that the first session is created by the processor 5 on the first load-balancing device, then the identification information got For 5;Assuming that the first session is created by the processor 8 on the first load-balancing device, then the identification information got is 8.Rear During continuous, illustrated so that the identification information got is 5 as an example.
Step 403, session information and identification information are added in multicast message by the first load-balancing device.
In one example, session information and identification information are added to the mistake in multicast message by the first load-balancing device Journey, it can specifically include but is not limited to following manner:The session information can be added to multicast report by the first load-balancing device The message load of text.The identification information can be added to the heading of multicast message by the first load-balancing device, or, by this Identification information is added to the message load of multicast message.
For the process for the message load that session information is added to multicast message, because the purpose of multicast message is exactly to be Transport session information, therefore the content in the message load of multicast message is exactly the session information.
For the process for the message load that identification information is added to multicast message, can in the first load-balancing device and On second load-balancing device, two bytes of the foremost for message load of making an appointment are identification information, so, the first load Identification information can be added to two bytes of the foremost of message load by balancing equipment.Or can be equal in the first load In the equipment that weighs and the second load-balancing device, rearmost two bytes for message load of making an appointment are identification information, so, Identification information can be added to rearmost two bytes of message load by the first load-balancing device.It is of course also possible to about Identifier information bit is determined in the other positions of message load, it is similar with above two mode for its processing mode, it is no longer superfluous herein State.Wherein, if two bytes of the foremost for message load of making an appointment are identification information, the first load-balancing device can be with Identification information is added to two bytes of the foremost of message load, and the second load-balancing device can be from message load Two bytes of foremost get identification information, in this manner it is possible to the second load-balancing device is got identification information, after And handled using identification information.Similarly, if rearmost two bytes for message load of making an appointment are identification information, Identification information can be added to rearmost two bytes of message load, and the second load balancing by the first load-balancing device Equipment can get identification information from rearmost two bytes of message load, in this manner it is possible to make the second load balancing Equipment gets identification information, is then handled using identification information.By the above-mentioned means, identification information can be sent to Second load-balancing device, and the second load-balancing device can correctly parse the identification information.
In one example, identification information is added to the mistake of the heading of multicast message for the first load-balancing device Journey, it can specifically include but is not limited to following manner:Identification information can be added to multicast message by the first load-balancing device Heading reserved field in;Or first load-balancing device identification information can be added to the message of multicast message In the multicast address field or destination interface field of head.
, can be in multicast message for the process of the reserved field of heading that identification information is added to multicast message A field is reserved in heading, the field is dedicated for the identification information in carrying the embodiment of the present application, and based on this, first is negative Carrying balancing equipment directly can be added to identification information in the reserved field.Wherein it is possible in the heading of multicast message Reserved field, and identification information can be added in the reserved field by the first load-balancing device, so, the second load balancing Equipment can gets identification information from the reserved field, is then handled using identification information.By the above-mentioned means, Identification information can be sent to the second load-balancing device, and the second load-balancing device can correctly parse mark letter Breath.
In one example, identification information is added to the multicast address field of heading for the first load-balancing device Process, following manner can be included but is not limited to:First load-balancing device rises to the multicast address field in heading Beginning multicast address carries out computing with identification information, and operation result is defined as to the multicast address of multicast message.Further, One load-balancing device carries out the process of computing to the starting multicast address of the multicast address field in heading with identification information, It can include:Add operation is carried out to starting multicast address and identification information, or starting multicast address is entered with identification information Row subtraction.Wherein, the first load-balancing device can be to the multicast address field in heading starting multicast address with Identification information carries out computing, and operation result is defined as to the multicast address of multicast message, i.e., by the multicast of multicast message Identification information is sent to the second load-balancing device by location.So, the second load-balancing device can is based on multicast message Multicast address, identification information is analyzed, is then handled using identification information.By the above-mentioned means, multicast report can be passed through Identification information is sent to the second load-balancing device by the multicast address of text, and the second load-balancing device can be based on the multicast Address correctly parses the identification information.
For example, can configuration starting multicast address (such as 239.0.0.1) and starting on the first load-balancing device in advance Port-mark (such as 10000).On this basis, the first load-balancing device enters to starting multicast address with identification information (such as 5) Row computing, add operation or subtraction are such as carried out, certainly, in actual applications, can also be other calculations such as multiplying Method, this algorithm is not limited in the embodiment of the present application, illustrated with additive exemplified by computing, therefore operation result is 239.0.0.1+5 i.e. 239.0.0.6.
So, the multicast message obtained on the first load-balancing device, the multicast address of its multicast address field are 239.0.0.6, destination interface is that both port of origination identifies (such as 10000), and source IP address is the IP address of the first load-balancing device, Source port is the port-mark of arbitrary disposition or random port-mark.
In another example, identification information is added to the destination interface word of heading for the first load-balancing device The process of section, can include but is not limited to following manner:First load-balancing device is to the destination interface field in heading Both port of origination identifies carries out computing with identification information, and operation result is defined as to the destination interface of multicast message.Further, First load-balancing device carries out the mistake of computing to the both port of origination mark of the destination interface field in heading with identification information Journey, it can include:Add operation is carried out to both port of origination mark and identification information, or to both port of origination mark and identification information Carry out subtraction.Wherein, the first load-balancing device can identify to the both port of origination of the destination interface field in heading Computing is carried out with identification information, and operation result is defined as to the destination interface of multicast message, that is, passes through the purpose of multicast message Identification information is sent to the second load-balancing device by port.So, the second load-balancing device can is based on multicast message Destination interface, analyze identification information, then handled using identification information.By the above-mentioned means, multicast can be passed through Identification information is sent to the second load-balancing device by the destination interface of message, and the second load-balancing device can be based on the mesh Port correctly parse the identification information.
For example, can configuration starting multicast address (such as 239.0.0.1) and starting on the first load-balancing device in advance Port-mark (such as 10000).On this basis, the first load-balancing device identifies to enter with identification information (such as 5) to both port of origination Row computing, add operation or subtraction are such as carried out, certainly, in actual applications, can also be other calculations such as multiplying Method, this algorithm is not limited in the embodiment of the present application, illustrated with additive exemplified by computing, therefore operation result can be 10000+5, i.e., 10005.
So, the multicast message obtained on the first load-balancing device, the multicast address of its multicast address field are 239.0.0.1, destination interface is that both port of origination identifies (such as 10005), and source IP address is the IP address of the first load-balancing device, Source port is the port-mark of arbitrary disposition or random port-mark.
Step 404, the first load-balancing device sends multicast message with multicast mode.
Step 405, the second load-balancing device parses identification information and session information from multicast message.
In one example, the second load-balancing device parses the mistake of identification information and session information from multicast message Journey, it can specifically include but is not limited to following manner:Second load-balancing device can solve from the message load of multicast message Separate out session information.Second load-balancing device can parse identification information from the heading of multicast message;Or can be with Identification information is parsed from the message load of multicast message.
Process for parsing session information from the message load of multicast message, because the purpose of multicast message is exactly For transport session information, therefore the session information can be directly parsed from message load.
Process for parsing identification information from the message load of multicast message, it is assumed that in the first load-balancing device On the second load-balancing device, two bytes of the foremost for message load of making an appointment are identification information, and so, second is negative Identification information can be parsed from two bytes of the foremost of message load by carrying balancing equipment.Or, it is assumed that in the first load On balancing equipment and the second load-balancing device, rearmost two bytes for message load of making an appointment are identification information, this Sample, the second load-balancing device can parse identification information from rearmost two bytes of message load.It is of course also possible to Agreement identification information is located at the other positions of message load, similar with above two mode for its processing mode, herein no longer Repeat.Wherein, if two bytes of the foremost for message load of making an appointment are identification information, the second load-balancing device can To get identification information from the two of the foremost of message load byte, then handled using identification information.If in advance Rearmost two bytes for arranging message load are identification information, then the second load-balancing device can be from message load most Two bytes below get identification information, are then handled using identification information.By the above-mentioned means, the second load is equal Weighing apparatus equipment can correctly parse identification information.
In one example, identification information is parsed from the heading of multicast message for the second load-balancing device Process, it can specifically include but is not limited to following manner:Second load-balancing device can be from the pre- of the heading of multicast message Identification information is parsed in section of writeeing down characters;Or second load-balancing device can be from the multicast address of the heading of multicast message Identification information is parsed in field or destination interface field.
Process for parsing identification information from the reserved field of the heading of multicast message, can be in multicast message Heading in reserve a field, the field dedicated for carrying the embodiment of the present application in identification information, based on this, second Load-balancing device directly can parse identification information from the reserved field.Wherein, the heading in multicast message is passed through Middle reserved field, so that the second load-balancing device obtains identification information from reserved field, identification information can be correctly parsed, And handled using identification information.
In one example, solved for the second load-balancing device from the multicast address field of the heading of multicast message The process of identification information is separated out, following manner can be included but is not limited to:Second load-balancing device can be from multicast address word Multicast address is parsed in section, computing is carried out to the multicast address and starting multicast address, and operation result is defined as identifying Information.Further, the second load-balancing device carries out the process of computing to the multicast address with starting multicast address, can wrap Include:Second load-balancing device carries out subtraction to multicast address and starting multicast address, or to multicast address and starting Multicast address carries out add operation.Wherein, the first load-balancing device can will be identified by the multicast address of multicast message and believed Breath be sent to the second load-balancing device, so, the second load-balancing device can the multicast address based on multicast message, correctly Identification information is parsed, is then handled using the identification information.
For example, can configuration starting multicast address (such as 239.0.0.1) and starting on the second load-balancing device in advance Port-mark (such as 10000).On this basis, it is assumed that the multicast address of the multicast address field of the multicast message received is 239.0.0.6, destination interface is that both port of origination identifies (such as 10000), and source IP address is the IP address of the first load-balancing device, Source port is the port-mark of arbitrary disposition or random port-mark, then the second load-balancing device can be to multicast address (such as 239.0.0.6) carries out computing with starting multicast address (such as 239.0.0.1), such as carries out subtraction or add operation, Certainly, in actual applications, other algorithms such as multiplying are can also be, this algorithm is not limited in the embodiment of the present application. Wherein, the algorithm that the second load-balancing device uses is the anti-inference method that the first load-balancing device uses algorithm, such as the first load When balancing equipment uses add operation, then the second load-balancing device is to multicast address (such as 239.0.0.6) and starting multicast Location (such as 239.0.0.1) carries out subtraction, and obtained identification information is 5.
In another example, for the second load-balancing device from the destination interface field of the heading of multicast message The process of identification information is parsed, following manner can be included but is not limited to:Second load-balancing device can be from destination interface Destination interface is parsed in field, computing is carried out to the destination interface and both port of origination mark, and operation result is defined as marking Know information.Further, the second load-balancing device carries out the process of computing to destination interface and both port of origination mark, can wrap Include:Second load-balancing device carries out subtraction to destination interface and both port of origination mark, or to destination interface and starting Port-mark carries out add operation.Wherein, the first load-balancing device can will be identified by the destination interface of multicast message and believed Breath be sent to the second load-balancing device, so, the second load-balancing device can the destination interface based on multicast message, correctly Identification information is parsed, is then handled using the identification information.
For example, can configuration starting multicast address (such as 239.0.0.1) and starting on the second load-balancing device in advance Port-mark (such as 10000).On this basis, it is assumed that the multicast address of the multicast address field of multicast message is 239.0.0.1, Destination interface is 10005, and source IP address is the IP address of the first load-balancing device, and source port is the port-mark of arbitrary disposition Or random port-mark, then the second load-balancing device destination interface 10005 and both port of origination mark 10000 are transported Calculate, such as carry out subtraction or add operation, certainly, in actual applications, can also be other algorithms such as multiplying, this This algorithm is not limited in application embodiment.Wherein, the algorithm that the second load-balancing device uses is that the first load balancing is set The standby anti-inference method using algorithm, when such as the first load-balancing device uses add operation, then the second load-balancing device is to purpose Port 10005 carries out subtraction with both port of origination mark 10000, and obtained identification information is 5.
In one example, it is necessary to the processing side of make an appointment the first load-balancing device and the second load-balancing device Formula, when such as the first load-balancing device carries out add operation to starting multicast address with identification information, then need agreement second negative Carry balancing equipment and subtraction is carried out to multicast address and starting multicast address.In another example the first load-balancing device is to starting When port-mark carries out add operation with identification information, then need to arrange the second load-balancing device to destination interface and initiating terminal Mouth mark carries out subtraction.
In one example, starting multicast address and the both port of origination mark configured on each load-balancing device can phase Together, for example, starting multicast ip address can be 239.0.0.1, both port of origination mark can be 10000.
Step 406, the second load-balancing device utilizes mapping relations, selects second processor corresponding to the identification information. For example, the mapping relations shown in using table 1, select processor 5 corresponding to identification information 5.
Step 407, session information is sent to the second processor (such as processor 5) of selection by the second load-balancing device, By the second processor the first session is created using the session information.
In one example, each processor has the receiving queue that oneself is used alone, and the second load-balancing device is Session information is distributed in the receiving queue of second processor.After session information is stored in the receiving queue, at second The session information can first be obtained, and utilize the session information by modes such as interruption or polls from receiving queue by managing device The first session is created, first session is identical with the first session created on the first load-balancing device.Afterwards, second processor Return to the other tasks performed in receiving queue.
In one example, in order to increase the stability of system and fault-tolerance, session information is being sent to second processing After device, second processor can also verify whether to handle session information by this second processor again.If it is, Create the first session.If it is not, then abandon the session information.
Wherein, the second load-balancing device can will carry session letter when session information is distributed into second processor The multicast message of breath is sent to second processor, and second processor can solve after multicast message is received from multicast message Separate out session information and identification information, specific analysis mode will not be repeated here referring to step 405.If from multicast message The identification information parsed is identical with the identification information of this second processor, then creates the first meeting using the session information parsed Words.If the identification information parsed from multicast message is different from the identification information of this second processor, discarding parses Session information.
Based on above-mentioned technical proposal, in the embodiment of the present application, by the way that the session information of this load-balancing device is synchronized to Other load-balancing devices, so that other load-balancing devices are localling create identical session, so as to avoid at business Manage mistake.For example, the session information of local can be synchronized to load-balancing device 2 by load-balancing device 1, so that load balancing Equipment 2 is localling create identical session.Based on the session of local, load-balancing device 1 sends out the message 1 from client 1 Server 1 is given, and the message 2 from client 1 is sent to server 1.Assuming that load-balancing device 1 is sent out by message 1 After giving server 1, stop service, then load-balancing device 2 can receive the message 2 from client 1, equal based on load The local session of the equipment that weighs 2, message 2 can be also sent to server 1 by load-balancing device 2, without being destined to other clothes Business device.So, the can of server 1 is handled the business of client 1 using message 1 and message 2, so as to avoid industry Business processing mistake, guarantee business are not interrupted.
Moreover, the identification information of processor corresponding to session information can also be sent to other bear by this load-balancing device Balancing equipment is carried, so that other load-balancing devices select the processor corresponding with the identification information to carry out the session information Processing.So, a processor can be specified to handle session information on load-balancing device, rather than multiple processors are same Shi Jingzheng is handled session information, avoids the competition between multiple processors, so as to make full use of multiple processing The substantial amounts of session information of device parallel synchronous, the lifting of net synchronization capability is realized, and the utilization rate of processor can be improved, lifting is same Walk efficiency.
Conceived based on the application same with the above method, the embodiment of the present application also proposes a kind of synchronous side of session information Method, this method can apply on the first load-balancing device, as shown in figure 5, this method includes:
Step 501, the session information of the first session is obtained.
Step 502, the identification information for the first processor for creating the first session is obtained.
Step 503, it will words information and identification information are added in multicast message.
Step 504, multicast message is sent with multicast mode, so as to receive the second load-balancing device of multicast message from group Report and identification information and session information are parsed in text, select second processor corresponding to identification information, and session information is sent out Second processor is given, the first session is created using session information by second processor.
Wherein, the handling process of step 501- steps 504 referring to step 404- steps 404 handling process.
Wherein, the second load-balancing device parses identification information and session information, selection mark letter from multicast message Second processor corresponding to breath, and session information is sent to second processor, created by second processor using session information The handling process of first session referring to step 405- steps 407 handling process.
Conceived based on the application same with the above method, the embodiment of the present application also provides a kind of session information synchronous dress Put, the synchronous device of the session information is applied in load-balancing device (such as the first load-balancing device or the second load balancing Equipment) on.The synchronous device of the session information can be realized by software, can also pass through hardware or the side of software and hardware combining Formula is realized.It is the place by the load-balancing device where it as the device on a logical meaning exemplified by implemented in software Device is managed, corresponding computer program instructions are formed in reading non-volatile storage.For hardware view, as shown in fig. 6, The hardware structure diagram of load-balancing device where the device of the session information synchronization proposed for the application, except shown in Fig. 6 Outside processor, nonvolatile memory, load-balancing device can also include other hardware, such as be responsible for the forwarding core of processing message Piece, network interface, internal memory etc.;From hardware configuration, the load-balancing device is also possible to be distributed apparatus, may include Multiple interface cards, to carry out the extension of Message processing in hardware view.
As shown in fig. 7, the structure chart of the device of the session information synchronization proposed for the application, applied to including the first load In the system of balancing equipment and at least one second load-balancing device, first load-balancing device is included at multiple first Device is managed, second load-balancing device includes multiple second processors, and the is configured with second load-balancing device The mapping relations of the identification information of one processor and the identification information of second processor, described device are applied in the described first load On balancing equipment, and described device specifically includes:
First acquisition unit 11, for obtaining the session information of the first session;
Second acquisition unit 12, for obtaining the identification information for the first processor for creating first session;
Processing unit 13, for the session information and the identification information to be added in multicast message;
Transmitting element 14, for sending the multicast message with multicast mode;So as to receive the second of the multicast message Load-balancing device parses the identification information and the session information from the multicast message, and is closed using the mapping System, selects second processor corresponding to the identification information, and the session information is sent into the second processor, by institute State second processor and create the first session using the session information.
The first acquisition unit 11, specifically for when creating the first session on first processor, obtain described the The session information of one session;Or when the session status of the first session changes, obtain the session letter of first session Breath;Or periodically obtain the session information of first session.
The processing unit 13, specifically for being added to by the session information and the identification information in multicast message During, the session information is added to the message load of the multicast message;And the identification information is added to The heading of the multicast message, or, the identification information is added to the message load of the multicast message.
The processing unit 13, specifically for the mistake in the heading that the identification information is added to the multicast message Cheng Zhong, the identification information is added in the reserved field of heading;Or the identification information is added to heading Multicast address field or destination interface field.
The processing unit 13, specifically for the identification information is added to the multicast address field of heading or During destination interface field, the starting multicast address to the multicast address field in heading is carried out with the identification information Computing, and operation result is defined as to the multicast address of the multicast message;Or to the destination interface field in heading Both port of origination identifies carries out computing with the identification information, and operation result is defined as to the destination interface of the multicast message.
The processing unit 13, specifically for the multicast address field in heading starting multicast address with it is described During identification information carries out computing, add operation is carried out with the identification information to the starting multicast address, or it is right The starting multicast address carries out subtraction with the identification information;
The both port of origination mark of destination interface field in heading carries out the process of computing with the identification information In, to the both port of origination mark with the identification information carry out add operation, or to the both port of origination mark with it is described Identification information carries out subtraction.
As shown in figure 8, the structure chart of the device of the session information synchronization proposed for the application, applied to including the first load In the system of balancing equipment and at least one second load-balancing device, first load-balancing device is included at multiple first Device is managed, second load-balancing device includes multiple second processors, and the is configured with second load-balancing device The mapping relations of the identification information of one processor and the identification information of second processor, described device are applied in the described second load On balancing equipment, and described device specifically includes:
Receiving unit 21, for receiving the multicast message from first load-balancing device;The multicast message bag Session information, the identification information for the first processor for creating first session for including the first session;
Resolution unit 22, for parsing the identification information and the session information from the multicast message;
Selecting unit 23, for selecting second processor corresponding to the identification information using the mapping relations;
Transmitting element 24, for the session information to be sent into the second processor, by second processor profit The first session is created with the session information.
The resolution unit 22, specifically for parsing the identification information and the session from the multicast message During information, the session information is parsed from the message load of the multicast message;
And the identification information is parsed from the heading of the multicast message, or, from the multicast message The identification information is parsed in message load.
The resolution unit 22, specifically for parsing the identification information in the heading from the multicast message During, the identification information is parsed from the reserved field of heading;Or from the multicast address field of heading or The identification information is parsed in destination interface field.
The resolution unit 22, specifically for being parsed from the multicast address field of heading or destination interface field During going out the identification information, multicast address is parsed from multicast address field, and to the multicast address and starting Multicast address carries out computing, and operation result is defined as into the identification information;Or parse mesh from destination interface field Port, and computing is carried out to the destination interface and both port of origination mark, and operation result is defined as the identification information.
The resolution unit 22, specifically for carrying out the process of computing with starting multicast address to the multicast address In, subtraction is carried out to the multicast address and the starting multicast address, or to the multicast address and the starting Multicast address carries out add operation;During computing is carried out to the destination interface and both port of origination mark, to the mesh Port and the both port of origination mark carry out subtraction, or the destination interface and both port of origination mark are carried out Add operation.
In the mapping relations, the identification information of the first processor and the identification information phase of the second processor Together;Or, computing, and operation result and described second are carried out to the identification information of the first processor using the first preset algorithm The identification information of processor is identical;Or, computing is carried out to the identification information of the second processor using the second preset algorithm, and Operation result is identical with the identification information of the first processor.
Conceived based on the application same with the above method, what the embodiment of the present application also provided a kind of session information synchronization is System, the system include the first load-balancing device and at least one second load-balancing device;Wherein, first load is equal Weighing apparatus equipment includes multiple first processors, and second load-balancing device includes multiple second processors, and described second The mapping relations of the identification information of first processor and the identification information of second processor are configured with load-balancing device;
First load-balancing device includes:First acquisition unit, for obtaining the session information of the first session;Second Acquiring unit, for obtaining the identification information for the first processor for creating first session;Processing unit, for by the meeting Words information and the identification information are added in multicast message;First transmitting element, for equal to the second load with multicast mode The equipment that weighs sends the multicast message;
Second load-balancing device includes:Receiving unit, for receiving from first load-balancing device Multicast message;Resolution unit, for after the multicast message is received, parsing the mark letter from the multicast message Breath and the session information;Selecting unit, for utilizing the mapping relations, select second processing corresponding to the identification information Device;Transmitting element, for the session information to be sent into the second processor, the meeting is utilized by the second processor Talk about the session of information creating first.
Through the above description of the embodiments, those skilled in the art can be understood that the application can be by Software adds the mode of required general hardware platform to realize, naturally it is also possible to which by hardware, but the former is more in many cases Good embodiment.Based on such understanding, what the technical scheme of the application substantially contributed to prior art in other words Part can be embodied in the form of software product, and the computer software product is stored in a storage medium, if including It is dry to instruct to cause a computer equipment (be personal computer, server, or network equipment etc.) to perform this Shen Method that please be described in each embodiment.It will be appreciated by those skilled in the art that accompanying drawing is the schematic diagram of a preferred embodiment, Unit or flow in accompanying drawing are not necessarily implemented necessary to the application.
It will be appreciated by those skilled in the art that the unit in device in embodiment can describe be divided according to embodiment It is distributed in the device of embodiment, respective change can also be carried out and be disposed other than in one or more devices of the present embodiment.On The unit for stating embodiment can be merged into a unit, can also be further split into multiple subelements.Above-mentioned the embodiment of the present application Sequence number is for illustration only, does not represent the quality of embodiment.
Disclosed above is only several specific embodiments of the application, and still, the application is not limited to this, any ability What the technical staff in domain can think change should all fall into the protection domain of the application.

Claims (26)

1. a kind of synchronous method of session information, it is characterised in that applied to including the first load-balancing device and at least one In the system of second load-balancing device, the first load-balancing device includes multiple first processors, the second load-balancing device Including multiple second processors, the identification information and second processor of first processor are configured with the second load-balancing device Identification information mapping relations, methods described includes:
First load-balancing device obtains the session information of the first session;
First load-balancing device obtains the identification information for the first processor for creating first session;
The session information and the identification information are added in multicast message by first load-balancing device, and with multicast Mode sends the multicast message;So that the second load-balancing device for receiving the multicast message solves from the multicast message Separate out the identification information and the session information, and utilize the mapping relations, select that the identification information is corresponding second Processor, and the session information is sent to the second processor, the session information is utilized by the second processor Create the first session.
2. according to the method for claim 1, it is characterised in that first load-balancing device obtains the meeting of the first session The process of information is talked about, is specifically included:
When creating the first session on first processor, first load-balancing device obtains the session of first session Information;Or
When the session status of the first session changes, first load-balancing device obtains the session of first session Information;Or
First load-balancing device periodically obtains the session information of first session.
3. according to the method for claim 1, it is characterised in that first load-balancing device by the session information and The identification information is added to the process in multicast message, specifically includes:
The session information is added to the message load of the multicast message by first load-balancing device;
The identification information is added to the heading of the multicast message by first load-balancing device, or, by described in Identification information is added to the message load of the multicast message.
4. according to the method for claim 3, it is characterised in that first load-balancing device adds the identification information The process of the heading of the multicast message is added to, is specifically included:
The identification information is added in the reserved field of heading by first load-balancing device;Or
The identification information is added to the multicast address field or destination interface of heading by first load-balancing device Field.
5. according to the method for claim 4, it is characterised in that first load-balancing device adds the identification information The multicast address field of heading or the process of destination interface field are added to, is specifically included:
Starting multicast address of first load-balancing device to the multicast address field in heading and the identification information Computing is carried out, and operation result is defined as to the multicast address of the multicast message;Or
Both port of origination mark and the identification information of first load-balancing device to the destination interface field in heading Computing is carried out, and operation result is defined as to the destination interface of the multicast message.
6. according to the method for claim 5, it is characterised in that
Starting multicast address of first load-balancing device to the multicast address field in heading and the identification information The process of computing is carried out, is specifically included:Add operation is carried out with the identification information to the starting multicast address, or to institute State starting multicast address and carry out subtraction with the identification information;
Both port of origination mark and the identification information of first load-balancing device to the destination interface field in heading The process of computing is carried out, is specifically included:Add operation is carried out with the identification information to both port of origination mark, or to institute State both port of origination mark and carry out subtraction with the identification information.
7. according to the method for claim 1, it is characterised in that second load-balancing device is from the multicast message The process of the identification information and the session information is parsed, is specifically included:
Second load-balancing device parses the session information from the message load of the multicast message;
Second load-balancing device parses the identification information from the heading of the multicast message;Or from institute State in the message load of multicast message and parse the identification information.
8. according to the method for claim 7, it is characterised in that second load-balancing device is from the multicast message The process of the identification information is parsed in heading, is specifically included:
Second load-balancing device parses the identification information from the reserved field of heading;Or
Second load-balancing device parses the mark from the multicast address field or destination interface field of heading Know information.
9. according to the method for claim 8, it is characterised in that second load-balancing device is from the multicast of heading The identification information is parsed in location field or destination interface field, is specifically included:
Second load-balancing device parses multicast address from multicast address field, and to the multicast address and starting Multicast address carries out computing, and operation result is defined as into the identification information;Or
Second load-balancing device parses destination interface from destination interface field, and to the destination interface and starting Port-mark carries out computing, and operation result is defined as into the identification information.
10. according to the method for claim 9, it is characterised in that
Second load-balancing device carries out the process of computing to the multicast address with starting multicast address, specifically includes: Subtraction is carried out to the multicast address and the starting multicast address, or to the multicast address and the starting multicast Address carries out add operation;
Second load-balancing device carries out the process of computing to the destination interface and both port of origination mark, specifically includes: Subtraction is carried out to the destination interface and both port of origination mark, or to the destination interface and the both port of origination Mark carries out add operation.
11. according to the method for claim 1, it is characterised in that in the mapping relations, the mark of the first processor It is identical with the identification information of the second processor to know information;Or using the first preset algorithm to the first processor Identification information carries out computing, and operation result is identical with the identification information of the second processor;Or utilize the second pre- imputation Method carries out computing, and the identification information phase of operation result and the first processor to the identification information of the second processor Together.
12. according to the method described in claim any one of 1-11, it is characterised in that the session information specifically includes:Five yuan Group information, session state information, real server information.
13. a kind of synchronous method of session information, it is characterised in that applied to including the first load-balancing device and at least one In the system of second load-balancing device, the first load-balancing device includes multiple first processors, the second load-balancing device Including multiple second processors, the identification information and second processor of first processor are configured with the second load-balancing device Identification information mapping relations, methods described includes:
First load-balancing device obtains the session information of the first session, and obtains at create first session first Manage the identification information of device, and the session information and the identification information be added in multicast message, and with multicast mode to Second load-balancing device sends the multicast message;
Second load-balancing device parses the mark after the multicast message is received from the multicast message Information and the session information, and utilize the mapping relations, select second processor corresponding to the identification information, and by institute State session information and be sent to the second processor, the first session is created using the session information by the second processor.
14. the synchronous device of a kind of session information, it is characterised in that applied to including the first load-balancing device and at least one In the system of second load-balancing device, first load-balancing device includes multiple first processors, second load Balancing equipment includes multiple second processors, and the identification information of first processor is configured with second load-balancing device With the mapping relations of the identification information of second processor, described device is applied on first load-balancing device, and described Device specifically includes:
First acquisition unit, for obtaining the session information of the first session;
Second acquisition unit, for obtaining the identification information for the first processor for creating first session;
Processing unit, for the session information and the identification information to be added in multicast message;
Transmitting element, for sending the multicast message with multicast mode;So that the second load for receiving the multicast message is equal Weighing apparatus equipment parses the identification information and the session information from the multicast message, and utilizes the mapping relations, choosing Second processor corresponding to the identification information is selected, and the session information is sent to the second processor, by described Two processors create the first session using the session information.
15. device according to claim 14, it is characterised in that
The first acquisition unit, specifically for when creating the first session on first processor, obtaining first session Session information;Or when the session status of the first session changes, obtain the session information of first session;Or Person, periodically obtain the session information of first session.
16. device according to claim 14, it is characterised in that the processing unit, specifically for by the session During information and the identification information are added in multicast message, the session information is added to the multicast message Message load;And the identification information is added to the heading of the multicast message, or, the identification information is added It is added to the message load of the multicast message.
17. device according to claim 16, it is characterised in that
The processing unit, specifically for during the identification information is added into the heading of the multicast message, The identification information is added in the reserved field of heading;Or the identification information is added to the multicast of heading Address field or destination interface field.
18. device according to claim 17, it is characterised in that
The processing unit, specifically for the identification information to be added to the multicast address field or destination of heading During mouth field, the starting multicast address to the multicast address field in heading carries out computing with the identification information, And operation result is defined as to the multicast address of the multicast message;Or the starting to the destination interface field in heading Port-mark carries out computing with the identification information, and operation result is defined as to the destination interface of the multicast message.
19. device according to claim 18, it is characterised in that
The processing unit, believe specifically for the starting multicast address and the mark of the multicast address field in heading During breath carries out computing, add operation is carried out with the identification information to the starting multicast address, or to described Beginning multicast address carries out subtraction with the identification information;
It is right during the both port of origination mark of the destination interface field in heading carries out computing with the identification information The both port of origination mark carries out add operation with the identification information, or both port of origination mark and the mark are believed Breath carries out subtraction.
20. the synchronous device of a kind of session information, it is characterised in that applied to including the first load-balancing device and at least one In the system of second load-balancing device, first load-balancing device includes multiple first processors, second load Balancing equipment includes multiple second processors, and the identification information of first processor is configured with second load-balancing device With the mapping relations of the identification information of second processor, described device is applied on second load-balancing device, and described Device specifically includes:
Receiving unit, for receiving the multicast message from first load-balancing device;The multicast message includes first The identification information of the session information of session, the first processor of establishment first session;
Resolution unit, for parsing the identification information and the session information from the multicast message;
Selecting unit, for utilizing the mapping relations, select second processor corresponding to the identification information;
Transmitting element, for the session information to be sent into the second processor, as described in utilizing the second processor Session information creates the first session.
21. device according to claim 20, it is characterised in that
The resolution unit, specifically for parsing the identification information and the session information from the multicast message During, parse the session information from the message load of the multicast message;
And the identification information is parsed from the heading of the multicast message, or, from the message of the multicast message The identification information is parsed in load.
22. device according to claim 21, it is characterised in that
The resolution unit, the process specifically for parsing the identification information in the heading from the multicast message In, the identification information is parsed from the reserved field of heading;Or multicast address field or purpose from heading The identification information is parsed in peer-port field.
23. device according to claim 22, it is characterised in that
The resolution unit, specifically for parsed from the multicast address field of heading or destination interface field it is described During identification information, multicast address is parsed from multicast address field, and to the multicast address with starting multicast Location carries out computing, and operation result is defined as into the identification information;Or parse destination from destination interface field Mouthful, and computing is carried out to the destination interface and both port of origination mark, and operation result is defined as the identification information.
24. device according to claim 23, it is characterised in that
The resolution unit, specifically for the multicast address with starting multicast address carry out computing during, to institute State multicast address and carry out subtraction with the starting multicast address, or to the multicast address and the starting multicast address Carry out add operation;To the destination interface and both port of origination mark carry out computing during, to the destination interface with The both port of origination mark carries out subtraction, or carries out addition fortune to the destination interface and both port of origination mark Calculate.
25. device according to claim 20, it is characterised in that in the mapping relations, the first processor Identification information is identical with the identification information of the second processor;Or using the first preset algorithm to the first processor Identification information carry out computing, and operation result is identical with the identification information of the second processor;It is or default using second Algorithm carries out computing, and the identification information phase of operation result and the first processor to the identification information of the second processor Together.
26. the synchronous system of a kind of session information, it is characterised in that the system includes the first load-balancing device and at least one Individual second load-balancing device;Wherein, first load-balancing device includes multiple first processors, and second load is equal Weighing apparatus equipment includes multiple second processors, and the identification information of first processor is configured with second load-balancing device With the mapping relations of the identification information of second processor;
First load-balancing device includes:First acquisition unit, for obtaining the session information of the first session;Second obtains Unit, for obtaining the identification information for the first processor for creating first session;Processing unit, for the session to be believed Breath and the identification information are added in multicast message;First transmitting element, for being set with multicast mode to the second load balancing Preparation send the multicast message;
Second load-balancing device includes:Receiving unit, for receiving the multicast from first load-balancing device Message;Resolution unit, for after the multicast message is received, parsed from the multicast message identification information and The session information;Selecting unit, for utilizing the mapping relations, select second processor corresponding to the identification information; Transmitting element, for the session information to be sent into the second processor, the session is utilized by the second processor The session of information creating first.
CN201610833857.0A 2016-09-19 2016-09-19 A kind of synchronous methods, devices and systems of session information Pending CN107846433A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610833857.0A CN107846433A (en) 2016-09-19 2016-09-19 A kind of synchronous methods, devices and systems of session information

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610833857.0A CN107846433A (en) 2016-09-19 2016-09-19 A kind of synchronous methods, devices and systems of session information

Publications (1)

Publication Number Publication Date
CN107846433A true CN107846433A (en) 2018-03-27

Family

ID=61657378

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610833857.0A Pending CN107846433A (en) 2016-09-19 2016-09-19 A kind of synchronous methods, devices and systems of session information

Country Status (1)

Country Link
CN (1) CN107846433A (en)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257448A (en) * 2018-11-21 2019-01-22 网易(杭州)网络有限公司 A kind of synchronous method and device of session information, electronic equipment, storage medium
CN111683124A (en) * 2020-05-25 2020-09-18 中国工商银行股份有限公司 Data processing method and system for IPV6 chip card
CN111756780A (en) * 2019-03-27 2020-10-09 厦门网宿有限公司 Method for synchronizing connection information and load balancing system
CN112217735A (en) * 2020-09-08 2021-01-12 网宿科技股份有限公司 Information synchronization method and load balancing system
CN112887229A (en) * 2021-01-11 2021-06-01 杭州迪普科技股份有限公司 Session information synchronization method and device
CN114328190A (en) * 2021-12-13 2022-04-12 北京安博通科技股份有限公司 Method, system and server for automatically splitting IPS event

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070171921A1 (en) * 2006-01-24 2007-07-26 Citrix Systems, Inc. Methods and systems for interacting, via a hypermedium page, with a virtual machine executing in a terminal services session
US20080256182A1 (en) * 2007-04-10 2008-10-16 Microsoft Corporation Emulation of room lock and lobby feature in distributed conferencing system
CN102118389A (en) * 2010-12-28 2011-07-06 深圳市创新科信息技术有限公司 Method for accessing storage device through internet small computer system interface (iSCSI) in multipath manner and storage device
CN102223365A (en) * 2011-06-03 2011-10-19 杭州华三通信技术有限公司 User access method and device based on SSL (Secure Socket Layer) VPN (Virtual Private Network) gateway cluster
CN103155524A (en) * 2010-08-05 2013-06-12 思杰系统有限公司 Systems and methods for IIP address sharing across cores in a multi-core system
CN103297347A (en) * 2013-05-15 2013-09-11 杭州华三通信技术有限公司 Load balance processing method and device
CN103503424A (en) * 2010-12-20 2014-01-08 思杰系统有限公司 Systems and methods for implementing connection mirroring in a multi-core system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070171921A1 (en) * 2006-01-24 2007-07-26 Citrix Systems, Inc. Methods and systems for interacting, via a hypermedium page, with a virtual machine executing in a terminal services session
US20080256182A1 (en) * 2007-04-10 2008-10-16 Microsoft Corporation Emulation of room lock and lobby feature in distributed conferencing system
CN103155524A (en) * 2010-08-05 2013-06-12 思杰系统有限公司 Systems and methods for IIP address sharing across cores in a multi-core system
CN103503424A (en) * 2010-12-20 2014-01-08 思杰系统有限公司 Systems and methods for implementing connection mirroring in a multi-core system
CN102118389A (en) * 2010-12-28 2011-07-06 深圳市创新科信息技术有限公司 Method for accessing storage device through internet small computer system interface (iSCSI) in multipath manner and storage device
CN102223365A (en) * 2011-06-03 2011-10-19 杭州华三通信技术有限公司 User access method and device based on SSL (Secure Socket Layer) VPN (Virtual Private Network) gateway cluster
CN103297347A (en) * 2013-05-15 2013-09-11 杭州华三通信技术有限公司 Load balance processing method and device

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109257448A (en) * 2018-11-21 2019-01-22 网易(杭州)网络有限公司 A kind of synchronous method and device of session information, electronic equipment, storage medium
CN109257448B (en) * 2018-11-21 2021-07-09 网易(杭州)网络有限公司 Session information synchronization method and device, electronic equipment and storage medium
CN111756780A (en) * 2019-03-27 2020-10-09 厦门网宿有限公司 Method for synchronizing connection information and load balancing system
CN111756780B (en) * 2019-03-27 2022-04-22 厦门网宿有限公司 Method for synchronizing connection information and load balancing system
CN111683124A (en) * 2020-05-25 2020-09-18 中国工商银行股份有限公司 Data processing method and system for IPV6 chip card
CN111683124B (en) * 2020-05-25 2022-11-29 中国工商银行股份有限公司 Data processing method and system for IPV6 chip card
CN112217735A (en) * 2020-09-08 2021-01-12 网宿科技股份有限公司 Information synchronization method and load balancing system
CN112887229A (en) * 2021-01-11 2021-06-01 杭州迪普科技股份有限公司 Session information synchronization method and device
CN114328190A (en) * 2021-12-13 2022-04-12 北京安博通科技股份有限公司 Method, system and server for automatically splitting IPS event
CN114328190B (en) * 2021-12-13 2023-02-24 北京安博通科技股份有限公司 Method, system and server for automatically splitting IPS (in-plane switching) event

Similar Documents

Publication Publication Date Title
CN107846433A (en) A kind of synchronous methods, devices and systems of session information
EP3624408B1 (en) Method for generating forwarding table entry, controller, and network device
CN104272708B (en) It is distributed with the stateless first order grouping to server farm and is distributed to the secondary data packets of the stateful second level grouping distribution of some server in group
CN105359470B (en) Flow table management method and relevant device and system
US8892768B2 (en) Load balancing apparatus and load balancing method
US20140334295A1 (en) Symmetric Service Chain Binding
CN108809847B (en) Method, device and network system for realizing load balance
WO2017005223A1 (en) Information sharing method of smart electricity meter, smart electricity meter and acquisition router
JP6364106B2 (en) Method, system and computer-readable medium for routing Diameter messages in a Diameter signaling router
CN106603550B (en) A kind of Network Isolation method and device
US20220255862A1 (en) Packet forwarding method, device, storage medium, and system
CN107846364A (en) A kind for the treatment of method and apparatus of message
CN109450793B (en) Method and device for scheduling service traffic
CN102447638A (en) Load balancing method and forwarding apparatus
Cheng et al. Application-aware SDN routing for big data networking
CN109474713B (en) Message forwarding method and device
CN116319422A (en) Network performance monitoring using active measurement protocols and relay mechanisms
CN110036608A (en) For Diameter message priority route by method, system and computer-readable medium
CN109495526A (en) A kind of file transmitting method, device, system, electronic equipment and storage medium
JP2010003273A (en) Sip message distribution method and sip message distribution device
CN107682265B (en) Message routing method and device of payment system
CN111835642B (en) Service processing method and network equipment
CN103370910A (en) Methods, systems, and computer readable media for next hop scaling with link aggregation
CN111464448A (en) Data transmission method and device
EP2887589A1 (en) Stateless message routing

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180327