2

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?

2 Answers 2

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.

Sign up to request clarification or add additional context in comments.

1 Comment

If it's low, and you're doing it manually, you're probably OK; otherwise, I would use a different strategy.
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.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.