Typically, a user's first request to a site establishes a session. A session has a key that is passed to the user as a cookie, so the same session is retrieved with each subsequent request.
Session storage can store information about this user that you do not want (or cannot because of the length of cookies) to put in a cookie, for example, the current user ID or the contents of the basket. This usually represents some serialized data structure depending on the language / structure used.
The reason you could implement session storage in an external database rather than on the local web server is because you have an account if there are multiple web servers in the pool; so if the first user request went to server A, and the next went to server B, your web application can still receive the same session data each time.
Ben o
source share