I am creating multisites platform. Anybody can make simple site, with my platform. I plan to use django multidb support. One db for one site. And i need to change db settings depending on request.get_host(). I think that i's not good idea. Prompt other decisions? How it is realised on various designers of sites?
Asked
Active
Viewed 482 times
2 Answers
1
You might want to reconsider using a separate db for reach site. In reviewing the multi-db source, it looks like you'll run into a few scalability issues, depending on how many sites you want to support:
Currently all the databases are set up in settings.py. This could cause a few issues:
- Each new site would require reloading Django.
- settings.py could get large.
A better approach might to use a single DB and associate the site/account with each record as needed.

Brian Tol
- 4,149
- 6
- 24
- 27
-
If it's low, and you're doing it manually, you're probably OK; otherwise, I would use a different strategy. – Brian Tol Mar 29 '10 at 18:48
0
You can set up one site for each "site", with it's own settings file, listening to it's own socket, using the same codebase. I'm doing that and I can easily support more than 30 concurrent sites on a middle-size server. Maintainability of configurations and startup scripts is the only issue.

rewritten
- 16,280
- 2
- 47
- 50