Hi ALL:
We have a new django powered project which have a potential heavy-traffic characteristic(means a heavy db interaction). So we need to consider the database scalability in advance. With some researches, the following questions are still not clear to us:
- coarse-grained: how to specify one db table(a django model) to a specific db(maybe in another server)?
- fine-grained: how to specify a group of table rows to a specific db(so-called sharding, also can in another db server)?
- how to specify write and read to different db?(which will be helpful for future mysql master/slave replication)
We are finding the solution with:
- be transparent to application program(means we don't need to have additional codes in views.py)
- should be in ORM level(means only needs to specify in models.py)
- compatible with the current(or future) django release(to keep a minimal change for future's upgrading of django)
I'm still doing the research. And will share in this thread later if I've got some fruits.
Hope anyone with the experience can answer. Thanks.