2

I have multiple mysql databases (physical and logical). Using django 1.3 with multiple database support.

I would like to set up database connection pooling with mysql for django for multiple mysql databases so I can have efficient sharding. What is the way to do this?

2 Answers 2

2

I've just been looking at how to do this and came across this implementation. It's a very quick way to spin up your own backend which is really just Django's default mysql backend with some minimal changes. It does use sqlalchemy to manage the pooling but that additional dependency is a small price to pay. It's working well for me.

http://menendez.com/blog/mysql-connection-pooling-django-and-sqlalchemy/

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

Comments

1

This can be done by embedding SQLAlchemy pooling into Django. There are two (more/less ugly) ways of doing that:

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.