The present invention is generally related within the field of network communications systems and methods. Particularly, the present invention relates to a method, a farm load balancing device and a computer program product for establishing a bi-directional affinity server to server communication.
In existing load balancers, there are many mechanisms to ensure affinity between a client/server and a load balanced server farm, ensuring that all requests belonging to a same session are always directed to the same server instance within the farm.
An unsolved problem in server to server communication scenarios (
Existing load balancers in the field can perform such bi-directional affinity for Layer 3 and 4 protocols (IP/UDP/TCP) as describe in U.S. Pat. No. 7,380,002, however no solution currently exists for Layer-7 protocols, such as HTTP, Radius, or others.
A common method for creating client-server affinity based on HTTP cookies is described in U.S. Pat. No. 6,473,802. Although said patent doesn't solve the problem of server to server stateful communication in case both servers perform both client and server role in client-server model. For instance, each load balancer (A_Farm_Loadbalancer or B_Farm_Loadbalancer in
Therefore, the present invention overcomes the limitations described above by providing a method that creates a single point in the flow (load balancer) that both sessions will pass it at a network layer. Moreover, it creates stickiness based on the transaction requests and bi-directional affinity by correlating the requests of different sessions and maintaining correlation mapping.
Present invention enables to start a session on a first farm A, and correlate it to a new corresponding session in a second farm B, having load balancer to maintain a mapping between the two communication sessions (sessions are tracked using known mechanisms such as HTTP header, cookies, or URL parameters) in order to guarantee stickiness between the two communication sessions to the same server instances.
According to a first aspect there is provided a method for establishing a bi-directional server to server communication, wherein a first farm load balancer having associated a plurality of client servers comprises: a) receiving a first application level protocol request from at least one of said clients servers to start a first communication session with any of a client server associated to a second farm load balancer, said first application level protocol request including information parameters at least including a session ID that identifies the client server of the first farm load balancer; and b) sending said first application level protocol request to a client server of the second farm load balancer through the latter. Then, the client server of the second farm load balancer can respond to the first application level protocol request through said second farm load balancer.
On contrary to the known proposals the first farm load balancer further performs following steps: c) receiving a second application level protocol request from said client server of the second farm load balancer in order to start a second communication session with the client server of the first farm load balancer, said second application level protocol request including information parameters at least including a session ID that identifies the client server of the second farm load balancer and the session ID that identifies the client server of the first farm load balancer; d) checking in said received second application level protocol request if the session ID that identifies the client server of the first farm load balancer matches with the one included in the first application level protocol; and e) in case of matching, sending said second application level protocol request to the client server of the first farm load balancer, enabling the later for a response.
In accordance with an embodiment, the session ID of the client server of the first farm load balancer is included in said second application level protocol request upon extracting it, said client server of the second farm load balancer, from said received first application level protocol request.
The second application level protocol request in said step c) can be received either directly from the client server of the second farm load balancer or indirectly by using the second farm load balancer.
The response of the client server of the first farm load balancer in said step e) can be also performed directly to the client server of the second farm load balancer or indirectly through the latter.
The first and second application level protocols according to different embodiments can be the same or different protocols. Generally, those application level protocols are application-layer protocols using a client-server model. According to said different embodiments both application level protocols will be selected from at least a Hyper Text Transport Protocol (HTTP), a Remote Authentication Dial In User Service (RADIUS) protocol, a Session Initiation Protocol (SIP) protocol, or combinations thereof.
According to a second aspect there is provided a farm load balancing device for establishing a bi-directional server to server communication, said farm load balancing device having associated a plurality of client servers and being configured to: receive a first application level protocol request from at least one of said clients servers in order to start a first communication session with any of a client server associated to a second farm load balancer, said first application level protocol request including information parameters at least including a session ID that identifies its client server; and send said first application level protocol request to a client server of a second farm load balancer through the latter. The farm load balancing device also includes first means for extracting from the first application level protocol request said included session ID that identifies its client server.
On contrary of the known proposals, the farm load balancing device of the second aspect of the present invention is further configured to: receive a second application level protocol request from the client server of the second farm load balancer to start a second communication session its own client server, said second application level protocol request including information parameters at least including a session ID that identifies the client server of the second farm load balancer and the session ID that identifies its own client server; and send, depending on a checking operation, said second application level protocol request to its own client server (SA). In addition, the proposed farm load balancing device further comprises second means for performing said checking operation by checking in said received second application level protocol request if the session ID that identifies its own client server matches with the one included in the first application level protocol.
In accordance with an embodiment, the farm load balancing device is further configured to receive a response to the first application level protocol request from the client server of the second farm load balancer through the latter and to forward said response to its own client server.
Furthermore, the farm load balancing device is able similarly to receive a response to the second application level protocol request from its own client server and to forward said response to the client server of the second farm load balancer either directly or through the latter.
The system of the second aspect is adapted to implement the method of the first aspect.
The subject matter described herein can be implemented in software in combination with hardware and/or firmware, or a suitable combination of them. For example, the subject matter described herein can be implemented in software executed by a processor.
According to a third aspect there is provided a computer program product comprising a computer usable medium having a computer readable program code embodied therein, said computer readable code adapted to be executed to implement a method for establishing a bidirectional server to server communication comprising steps a to e of claim 1.
The previous and other advantages and features will be more fully understood from the following detailed description of embodiments, with reference to the attached, which must be considered in an illustrative and non-limiting manner, in which:
In reference to
As illustrated in
First farm load balancer LB_Farm_A upon receiving said HTTP session request executes a decision logic, as illustrated in
Then, client server B_Server_M sends a communication session request (HTTP Session B request as termed in
Therefore, the first farm load balancer LB_Farm_A upon receiving the HTTP session B request executes said decision logic illustrated in
The HTTP session requested by the client server A_Server_N (or HTTP Session A request) could be as follows:
POST/farm_b/form.asp HTTP/1.1
Host: farm_a
SID: ANON: farm_a: “NRviasdfmdkYB4W2471l”
That is, it includes the “SID” header, which identifies the session at the client server A_Server_N. Consequently, the HTTP session requested by the client server B_Server_M or HTTP Session B request would be as follows:
POST/farm_a/form.asp HTTP/1.1
Host: farm_b
SID: ANON: farm_b: asdfVVdfmdkYB4wsrtV
Original_ID: “NRviasdfmdkYB4W2471l”
That is, includes the “SID” header, which identifies the session at the client server B_Server_M, and the “Original_ID” header, which identifies the session at the client server A_Server_N
In reference to
1 Code=Access-Request (1)
1 ID=0
2 Length=56
16 Request Authenticator
Attributes:
6 User-Name=“nemo”
18 User-Password
6 NAS-IP-Address=192.168.1.16
6 NAS-Port=3
44 Acct-Session-Id=00000016
50 Acct-Multi-Session-ld=“NRviasdfmdkY84W2471l”
That is, it includes the “Acct-Session-Id” header, which identifies the session at the client server B_Server_M, and the “Acct-Multi-Session-Id” header, which identifies the session at the client server A_Server_N
As an improvement of the invention, the first farm load balancer LB_Farm_A, once executed said rules and established the affinity of the different client servers (A_Server_N with B_Server_M) can create a mapping table storing all the linked information. For instance, in accordance to the embodiment of
And, upon having executed said rule 2, flow (10) of the figure, it could create the following mapping table:
In the same way, in accordance to the embodiment of
The scope of the present invention is defined in the following set of claims.
Number | Date | Country | Kind |
---|---|---|---|
13382555.4 | Dec 2013 | ES | national |