

Ask HN: Is anyone being able to use Django+MongoDB in production successfully? - merlinsbrain

We're a startup and we chose to use the Django framework and we're more or less happy with that decision. However, we're constantly facing some problem or the other with our data store, MongoDB in conjunction with it. We are currently using the django-nonrel fork.<p>It seems the only two ways to use Django+MongoDB together are either using the django-nonrel fork of Django 1.3 which has its own problems (e.g. pretty much no more development) or to use MongoEngine (active development but no Admin UI). Both of these are causing us to sacrifice features of Django at the very least.<p>Are there any applications out there that have managed to use Django+MongoDB in production successfully and are those apps still running? How have you gone about it?<p>Do you think at an early stage its worth spending an extra 1-2weeks shifting back to PostgreSQL and not worry about scalability and multiple requests? I'm not the most talented DevOps guy, I would prefer a solution that would abstract all that away as much as possible, but then again, am ready to do what's best for the product.
======
argonaut
1\. As you said yourself, django no-rel basically means you're stuck with a
version of django that is 2 point releases old and will have to forgo all
future releases of django for the foreseeable future.

2\. Using mongoose, however, means you throw out the admin ui and any other
apps that use django's orm.

At this point, I think it is very clear that you have 4 feasible options:

1\. Use Django with mongoose.

2\. Use a lighter framework like Flask, since you kind of lose most of
django's benefits when you throw out the django orm.

3\. Use Django with SQL (preferably postgres)

4\. Use some other language (Ruby?)

I recommend that if you really want to use Mongo you should use a framework
like Flask. Otherwise I recommend you use SQL and stick with vanilla Django.
Worry about scaling when it becomes a problem. Scaling is a problem you want
to have! When I was working at a startup I _wish_ our main problem was scaling
(versus finding product market fit). Don't prematurely optimize.

~~~
argonaut
Oops, I meant mongoengine, not mongoose. I've been coding in node.js of late.

------
iambibhas
Drop Django-nonrel. It has issues of it's own. You can stop using Django's ORM
and use Mongoengine[1] ODM which is actively under development and awesome.
You might have to make some extra effort, but it'll at least keep you away
from problems of some stale 3rd party app.

[1]: <http://docs.mongoengine.org/en/latest/django.html>

~~~
merlinsbrain
We're definitely exploring mongoengine. The problem is that we've read that it
doesn't support the Admin UI then. All these tradeoffs!

------
vdugar
Given that you're an early-stage startup, I'd suggest you go with a
combination that allows you to develop your product quickly. If django-nonrel
isn't seeing much development anymore, it would be safest to move away from
it.

~~~
merlinsbrain
Quickest (and easiest) to MVP would probably be Postgres but what when we
scale up? I know Instagram did it, but I also read that Systrom went mad
making calls to the best minds in the Valley during their Android launch while
he was at it!

------
eldho
We are also on nonrel.

It is a bad decision to move back to PostgreSQL, better invest that time on
your product and make it better. You can always change later.

