Best database solution for Django on AWS
Asked Answered
S

1

5

Good morning,

I am currently looking at deploying a Django app on a EC2 instance, but everything is getting too confusing for me! I understand that Django has built-in implementation for MySQL, PSQL, and SQLite. Now, Amazon has RDS (MySQL), SimpleDB and DynamoDB. Do you guys have any recommendation on what should be used? I want something that is scalable for the future and bullet-proof. AWS provides a python API for its SimpleDB and DynamoDB. Will that work nicely with Django?!

Thanks a lot!

EDIT: I would rather be focusing on an overall solution that will be bulletproof, efficient and fast, and not too complicated. As I plan for more people to work on the system, I don't really want something that is complicated and hard to maintan. I would rather spend more time implementing and installing things, but at the end, the solution will be faster and easy to understand and work with. (IE.: Querying the DB will be straight-forward and no hacks around).

Satiable answered 23/3, 2012 at 16:33 Comment(1)
They can all "work nicely" with Django, but you should tell us what your priorities are - development speed/time, sysadmin time, redundancy, performance etc?Squashy
R
7

SimpleDB and DynamoDB are NoSQL so you'll need django-nonrel to deal with it and have no guarantees if everything will work fine. But if you need to use NoSQL - there is some 3rd-party modules for Django.

RDS is MySQL so you can use Django's default MySQL driver, and ORM, and admin and so on. It seems a good solution but you can't tweak or update these MySQL instances.

If your DB is not big and heavy yet, you can set up a local mysql instance on your EC2 and move it to RDS if you will need to grow.

Renita answered 24/3, 2012 at 2:38 Comment(4)
Ok cool. Would you recommend using Django + MySQL (on each EC2 instance) or use Boto+DynamoDB (or SimpleDB) or Django+RDS? The product will be sold to X different companies, which they will pay for the hosting. As a developer, are we better off selling X EC2 instances with their own EC2 + MySQL, or have X EC2 instances all connecting to either RDS/Dynamo (so the DB is shared among all of them). Think of it as money is no object, but the amount of user for each EC2 won't go beyond 10k.Satiable
10k overall or even daily users can be processed with one server without external DB (if you do not provide nuclear explosion calculations service). I'd use MySQL (local or RDS) because nonrel db adds an external absctraction to connect ORM back to objects, which is anyway less tested than Django's mysql connector. But not sure which one (local or RDS) is overall better. There seems to be no great problems with RDS and it's definitely easier to deploy for each instance. Plus scalability and stuff... So RDS looks a bit better than local DB.Renita
@Renita you mentioned there are 3rd party modules for Django to use DynamoDB. I couldnt find anything but a session-module. How about ORM? Could I still define my classes and have them being created on dynamodb automatically like in MySQL?Kiloliter
Looks like there are no backends for Dynamo, sorry for my mistake.Renita

© 2022 - 2024 — McMap. All rights reserved.