Stateful Session Management via Central Object Store
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Storing session state in a web application can hinder scalability due to the statelessness of HTTP protocol, leading to session state loss when requests are dispatched to different server instances, making load balancing ineffective.
Innovation Solution
Storing stateful information as objects in a central object store accessible via lookup keys and encrypting these keys into cookies, allowing any application server to access and maintain session state without losing information, enabling flexible request dispatching across a pool of servers.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If session state is stored on a server side of a web application, then session state can be maintained, but scalability is hindered and load balancing becomes difficult
Solution Approach 1:
The patent extracts session state data from individual server instances and stores it in an externalized session storage system (database, cache, or distributed storage). This allows any server in the pool to access any user's session state, enabling requests to be load-balanced across multiple servers without losing session information, thus resolving the contradiction between maintaining session state and achieving scalability
Solution Approach 2:
The patent introduces an intermediary session storage layer between the application servers and user sessions. This intermediary component (externalized storage system) mediates between multiple servers and session data, allowing any server to retrieve or store session state without direct server-to-server communication, thereby enabling both session persistence and scalable load balancing
2Reliability
If all requests resulting from a given session are dispatched to a same server instance, then session state is maintained, but load balancing becomes ineffective
Solution Approach 1:
By extracting session state from server memory and storing it externally with unique session identifiers, the system allows load balancers to distribute requests across different servers based on available resources while the external storage ensures session state consistency is maintained through identifier-based retrieval
Solution Approach 2:
The externalized session storage system provides universal access to session state for all servers in the pool. Any server can function as the handling server for any user session by retrieving the session state from the external storage using the session identifier, making each server multi-functional and enabling effective load balancing while maintaining session consistency
Data Source
AI summary
In one embodiment, a method includes receiving a HTTP request from a client device, the HTTP request initiating a user session. The method further includes dispatching the HTTP request to a selected application server of a set of application servers. In addition, the method includes servicing the request. Moreover, the method includes storing stateful information as at least one object in a central object store, wherein each of the at least one object is accessible via a lookup key. Also, the method includes generating a cookie. Further, the method includes encrypting into the cookie each lookup key for the at least one object. In addition, the method includes transmitting a response to the client device, the response comprising the cookie.


