multi tenancy with Flask / SQL Alchemy

299 views
Skip to first unread message

sjo...@congressus.nl

unread,
Dec 17, 2012, 9:36:30 AM12/17/12
to sqlal...@googlegroups.com

Hi,

 What are the best practises to implement a multi tenancy environment in Flask? Flask-SQLAlchemy does not provide any service for this. We have a set of models where some needs to be synchronised with one (our own) database and other models need to be synchronised with the client database. Multi-bind does not work, as the client is not yet known the first time as the App launches.

  • One Flask App, One SqlAlchemy, One Session, Multiple Connections
  • One Flask App, One SqlAlchemy, Multiple Session, One Connection each
  • One Flask App, Multiple SqlAlchemy, One Session each, Multiple Connections
  • Multiple Flask Allps, One SqlAlchemy each, One Session each, One Connection each
Or look into multi-threading and use one thread per tenant?

Hope you can shed some light on my issue! Thanks

 Sjoerd Huisman

Reply all
Reply to author
Forward
0 new messages