Patent ID: 8438291

Claim:
A method of managing user session state during execution of platform-independent code in a content delivery network (CDN) deployed and operated by a service provider, the content delivery network comprising a set of edge server regions organized into distinct and separate regions and a DNS-based request handling mechanism for mapping DNS queries to the edge servers, each edge server region comprising a set of edge servers, and at least some of the edge servers in the CDN provisioned with a runtime container and application server code for executing the platform-independent code, comprising: at a first edge server, establishing a user session state object in association with the execution of a client side component of the platform-independent code at the first edge server; transferring the user session state object from the first edge server to a server side component of the platform-independent code, the server side component of the platform-independent code located remotely from the first edge server; receiving, from the server side component of the platform-independent code, a result generated by executing the server side component of the platform-independent code using the user session state object transferred from the first edge server; associating at least a second edge server to the first edge server to receive and store the user session state object; and replicating the user session state object to the second edge server, wherein, as a result of the replicating step, the user session state object is available to the platform-independent code on the second edge server if the CDN DNS-based request handling mechanism maps a given DNS query associated with the execution of the platform-independent code to the second edge server.