Skip to content
This repository has been archived by the owner on Feb 3, 2020. It is now read-only.

Commit

Permalink
updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
Caolan McMahon committed Jul 28, 2010
1 parent ec6f156 commit 44650cf
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.md
Expand Up @@ -27,3 +27,21 @@ accepts a number of options:
(default: 24 hours)
* session_key -- The cookie key name to store the session data in
(default: _node)


## Why store session data in cookies?

* Its fast, you don't need to hit the filesystem or a database to look up
session data
* It scales easily. You don't need to worry about sticky-sessions when
load-balancing across multiple nodes.
* No server-side persistence requirements

## Caveats

* You can only store 4k of data in a cookie
* Higher-bandwidth requirements, since the cookie is sent to the server with
every request.

__In summary:__ don't use cookie storage if you keep a lot of data in your
sessions!

0 comments on commit 44650cf

Please sign in to comment.