LearnBoost / cluster

Node.JS multi-core server manager with plugins support.
http://learnboost.github.com/cluster
MIT License
2.29k stars 159 forks source link

connect sessions and cluster #77

Closed pnitsch closed 13 years ago

pnitsch commented 13 years ago

Might be more related to connect than cluster, but it's something to be aware of. I've been playing with a web app that uses connect sessions heavily. With two workers spawned the session id can occasionally change, most likely due to the request being handled by a different worker than the previous request.

Not sure if there's a workaround. I might try to write my own store and pass id's along with the request. Dunno.

tj commented 13 years ago

what session store are you using? if it's the memory store, then use something persistant like connect-redis etc

pnitsch commented 13 years ago

Worked like a charm. Thanks for pointing out that lib.

tj commented 13 years ago

relying on memory state is usually bad :p memory store is only good for testing really

pnitsch commented 13 years ago

I was unaware. Glad I posted the issue. :)