Closed
Description
When worker_processes
> 1 in nginx.conf, we can not use the default in-memory session store
because there're more than one JVM instances and requests from the same session perphaps
will be handled by different JVM instances. Alough cookie store is no prolem for this case,
if we provide shared map based session store there will be more chioces. e.g.
(def my-session-store
;; use cookie store
;(ring.middleware.session.cookie/cookie-store {:key "a 16-byte secret"})
;; use nginx shared map store
(nginx.clojure.session/shared-map-store "mySessionStore"))
in nginx.conf
shared_map mySessionStore tinymap?space=1m&entries=256;