IP Library › Granted Patent US 9,344,494
Granted Patent B2
US 9,344,494 · App. 13/221,546 · Granted May 17, 2016

Failover data replication with colocation of session state data

Inventors: Rajiv P Mordani (Sunnyvale, CA); Mahesh Kannan (Santa Clara, CA)
Assignee: Oracle International Corporation
H04L67/1034G06F11/1482H04L69/40G06F11/2038
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 9,344,494
App. No.
13/221,546
Granted
May 17, 2016
Kind
B2
Abstract

A method, system, and medium are disclosed for performing failover data replication with colocation of session state data. In servicing a client request, a first session is created on a primary server. A first portion of session data comprises a state of the first session and is stored on the primary server. An identifier of the first session is stored on the primary server. One or more backup servers are selected for backup of the first portion of session data. A second session is created on the primary server. A second portion of session data comprises a state of the second session and is stored on the primary server. The same backup server(s) are selected for backup of the second portion based on the stored identifier of the first session. The primary server replicates the first and second portions of session data into memory space of the backup servers.

Claims (55)

1. A computer-implemented method, comprising:

servicing a client request by a cluster of servers, wherein the servicing includes:

creating a first session for servicing the client request on a primary server of the servers, wherein a first portion of session data comprises a state of the first session and is stored on the primary server;

storing an identifier of the first session on the primary server;

selecting one or more backup servers of the servers for backup of the first portion of the session data;

creating a second session for servicing the same client request on the primary server, wherein a second portion of the session data comprises a state of the second session and is stored on the primary server;

selecting the same one or more backup servers for backup of the second portion of the session data, wherein the selecting is performed based on the stored identifier of the first session; and

the primary server replicating the first portion of the session data and the second portion of the session data into memory space of the same one or more backup servers.

2. The method of claim 1 , wherein the identifier of the first session is stored in a thread-local variable.

3. The method of claim 1 , further comprising:

the primary server sending a response to the client request to a client of the cluster of servers, wherein the response includes an indication of the one or more backup servers.

4. The method of claim 3 , further comprising:

receiving a subsequent request at the cluster from the client, wherein the subsequent request includes the indication of the one or more backup servers;

in response to determining that the primary server is unavailable to service the subsequent request, determining a recovery server from among the one or more backup servers indicated by the subsequent request; and

the recovery server servicing the subsequent request.

5. The method of claim 4 , wherein the subsequent request encodes the indication of the one or more backup servers in a URL in the response or encodes the indication of the one or more backup servers in a cookie.

6. The method of claim 1 , wherein the one or more backup servers are selected for backup of the first portion of the session data and for backup of the second portion of the session data by calculating a function of the identifier of the first session.

7. The method of claim 1 , further comprising:

determining whether a new server joins the cluster of servers;

selecting the new server for backup of the first portion of the session data and the second portion of the session data and

replicating the first portion of the session data and the second portion of the session data into memory space of the new server.

8. A system, comprising:

a cluster of computers executing a plurality of servers, wherein the servers comprise a primary server configured to service a client request, wherein servicing the client request includes:

creating a first session for servicing the client request on the primary server, wherein a first portion of session data comprises a state of the first session and is stored on the primary server;

storing an identifier of the first session on the primary server;

selecting one or more backup servers of the plurality of servers for backup of the first portion of the session data;

creating a second session for servicing the same client request on the primary server, wherein a second portion of the session data comprises a state of the second session and is stored on the primary server;

selecting the same one or more backup servers for backup of the second portion of the session data, wherein the selecting is performed based on the stored identifier of the first session; and

the primary server replicating the first portion of the session data and the second portion of the session data into memory space of the same one or more backup servers.

9. The system of claim 8 , wherein the identifier of the first session is stored in a thread-local variable.

10. The system of claim 8 , wherein the cluster of computers is further configured to:

send a response to the client request from the primary server to a client of the plurality of servers, wherein the response includes an indication of the one or more backup servers.

11. The system of claim 10 , wherein the cluster of computers is further configured to:

receive a subsequent request from the client, wherein the subsequent request includes the indication of the one or more backup servers;

in response to determining that the primary server is unavailable to service the subsequent request, determine a recovery server from among the one or more backup servers indicated by the subsequent request; and

service the subsequent request using the recovery server.

12. The system of claim 11 , wherein the subsequent request encodes the indication of the one or more backup servers in a URL in the response or encodes the indication of the one or more backup servers in a cookie.

13. The system of claim 8 , wherein the one or more backup servers are selected for backup of the first portion of the session data and for backup of the second portion of the session data by calculating a function of the identifier of the first session.

14. The system of claim 8 , wherein the first session is created by a web container, and wherein the second session is created by an Enterprise Java Beans (EJB) container.

15. A non-transitory storage medium storing program instructions executable by a computer to implement:

a primary server configured to service a client request from a client, wherein the servicing comprises:

creating a first session to service the client request, wherein a first portion of session data comprises a state of the first session and is stored on the primary server;

storing an identifier of the first session;

selecting one or more backup servers for backup of the first portion of the session data;

creating a second session to service the same client request, wherein a second portion of the session data comprises a state of the second session and is stored on the primary server;

selecting the same one or more backup servers for backup of the second portion of the session data, wherein the selecting is performed based on the stored identifier of the first session; and

replicating the first portion of the session data and the second portion of the session data into memory space of the same one or more backup servers.

16. The storage medium of claim 15 , wherein the identifier of the first session is stored in a thread-local variable.

17. The storage medium of claim 15 , wherein the servicing further comprises:

sending a response to the request to the client, wherein the response includes an indication of the one or more backup servers.

18. The storage medium of claim 17 , wherein the program instructions are further executable to implement:

receiving a subsequent request from the client, wherein the subsequent request includes the indication of the one or more backup servers; and

in response to determining that the primary server is unavailable to service the subsequent request, determining a recovery server from among the one or more backup servers indicated by the subsequent request.

19. The storage medium of claim 18 , wherein the subsequent request encodes the indication of the one or more backup servers in a URL in the response or encodes the indication of the one or more backup servers in a cookie.

20. The storage medium of claim 15 , wherein the one or more backup servers are selected for backup of the first portion of the session data and for backup of the second portion of the session data by calculating a function of the identifier of the first session.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Sep 2, 2011
From: MORDANI, RAJIV P; KANNAN, MAHESH
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 026849/0280 →
Continuity (1)
Related Publication 20130054822A1 · Feb 28, 2013