Skip to content
This repository has been archived by the owner on Jan 24, 2019. It is now read-only.

Distribute cookies? #101

Closed
joehillen opened this issue May 22, 2015 · 4 comments
Closed

Distribute cookies? #101

joehillen opened this issue May 22, 2015 · 4 comments
Labels

Comments

@joehillen
Copy link

We are currently running this on 4 different hosts, all under the same domain via round robin DNS.

Something we run into is that a user might have to login multiple times if they end up on a different hosts between sessions. It would be nice if there were a way to distribute cookies between all the proxy hosts. I'm curious how you think that could be built.

Another issue is that cookies don't seem to persist on disk at all, so everyone has to re-login if there is a host restart. Maybe a distributed datastore could be leveraged to solve both issues. Maybe etcd?

Thoughts? Ideas?

@jehiah
Copy link
Member

jehiah commented May 22, 2015

@joehillen The server side is stateless so there is no need to store cookies there. You shouldn't be having any issues w/ different instances treating things differently (we use it across several subdomains w/o a problem at Bitly). Do your instances all have the same configuration? Is it possible they have different cookie secrets?

@jehiah
Copy link
Member

jehiah commented May 22, 2015

Also, what version code are you running and is there anything in the logs on the request that triggers authentication that gives an indication of what the issue might be?

@joehillen
Copy link
Author

Oh ok. I'll investigate this sometime then, I just assumed it was a distribution issue. Probably secrets or a short cookie lifetime.

@jehiah Thanks for the quick response.

@jehiah
Copy link
Member

jehiah commented May 22, 2015

If you explicitly want authentication to last for longer than the cookie TTL you can also look at the feature added recently in #88

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants