[ckan-dev] Session storage and stateless instances

Alice Heaton a.heaton at nhm.ac.uk
Tue May 20 10:37:49 UTC 2014


On 16/05/14 19:05, Nick Stenning wrote:
> Hi all,
>
> I have two questions: one specific, and one general.
>
> 1. If I found time to make the appropriate adjustments to CKAN to make
> the database the default session store, would anyone be averse to that?
> Storing sessions on disk causes all kinds of problems, the most
> important of which for me is that it makes it difficult to load balance
> multiple identically-configured CKAN instances. One either has to define
> server affinity based on session cookies, or put the filesystem session
> storage onto a network filesystem, which is a terrible idea on many
> levels (atomicity, network partitions, etc.)

Probably good documentation on setting up load balancing would be more 
useful than setting defaults?

It's easy enough to setup:

beaker.session.type = ext:database
beaker.session.url = postgresql://.....

Also - what would the default values be? Would it use the main ckan 
database, or a separate one? I think it would make more sense to use a 
separate database (don't want session tables in my backups, or in my 
read-only slaves), but that means extra configuration steps for first 
time users.

> 2. More generally, is anyone aware of any other aspects of CKAN which
> stand in the way of application instances being fully stateless?
>
> -N
>




More information about the ckan-dev mailing list