postrank-labs/goliath

Is Rack::Session::Cookie safe in goliath

Opened this issue · 2 comments

Is Rack::Session::Cookie safe in goliath, I see

Within Goliath, all request and response processing can be done in fully asynchronous fashion. Hence, you will have to use Rack middleware that is async-aware.

but not sure whether Rack::Session::Cookie is async-aware

Hi @Markee, i'm sure it's about using eventmachine-enabled drivers for all techologies you using during request processing. For example, you can use Rack::Session::Redis as session storage. In this case you should use EM Hiredis driver, in other case you application will block all request while talking to redis, fetching session data for one request.
As a know, Rack::Session::Cookie stores whole session hash directly in rack.session cookie, so, yes, it's "async-aware"

@AlexYankee thanks.