Re: Django-MongoDb deployment at production servert

100 views
Skip to first unread message

Chuck James

unread,
Dec 10, 2012, 3:27:09 PM12/10/12
to django...@googlegroups.com
Really no one  have Answer for this post, how people running big website using django, if no body knows how to deploy it.


On Monday, December 10, 2012 12:32:29 PM UTC-5, Chuck James wrote:
Hi,

        I am developing a website using Django and MongoDb (http://django-mongodb.org/). I have read lots of forums and posts but still not able to figure it out what is the best way or default way to deploy Django project on web. So I have couple of questions related to this, it will be great if some one can guide me.

> Do I need a dedicated servers to implement Django with MongoDb if yes then what is the min/max requirement for them. What all controls and permissions I need for those servers. 
> What is the default way to deploy it (Django project with MongoDb), what is the best way to deploy it. 
> Can we deploy it without using apache or nginx. Like some kind of server in python best to deploy Django project and I don't need to install any other web server for it.

Thanks in advance :)

Sam Solomon

unread,
Dec 11, 2012, 12:38:03 PM12/11/12
to django...@googlegroups.com
I'm guessing that the problem is there are many ways to deploy Django so it's hard for anyone to give a good one-size-fits-all answer and also hard to run down the complete list of possibilities, and I'm guessing that since this list is only viewed by a small percentage of Django users, that there are even fewer people who have used MongoDB on this list (example: I haven't used it). It might be a good idea to ask MongoDB questions on whatever support system is available for django-MongoDB.

As for me, I've probably learned everything I know about deploying Django by googling stuff like "deploying Django with nginx" "deploying Django with mod_wsgi" etc (we use nginx for static files and reverse proxying to Apache with mod_wsgi (though if I were to start over today I'd give serious consideration to gunicorn))

As for not using nginx/Apache, I believe that that is discouraged for anything other than local development (though you could technically do it, and actually, I think guinicorn can be run in a similar way to runserver without needing to configure nginx or Apache).

yati sagade

unread,
Dec 11, 2012, 12:53:49 PM12/11/12
to django...@googlegroups.com
Hi
Whether your database should live on a separate server or not is a question you can best answer by testing various configurations out depending on the load your app expects. As for the webserver, you can (and probably should) do away with Apache, and try GUnicorn, which is a great WSGI webserver that supports Django out-of-the-box. We also use Nginx as a reverse proxy to GUnicorn so that load balancing and static files seving happens at Nginx level. Though this is not exactly for production, you can get an idea of what I'm talking about by reading this post [DISCLAIMER: I'm the author!] http://ydevel.tumblr.com/post/22850778860/configuring-an-https-site-with-django-on-nginx

We have a DB intensive operations going on anytime, so we typically host MongoDB on a server by itself, which is the generally preferred way.


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/DKx6tJySMaIJ.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Yati Sagade

Software Engineer at mquotient

Twitter: @yati_itay | Github: yati-sagade

Organizing member of TEDx EasternMetropolitanBypass
http://www.ted.com/tedx/events/4933
https://www.facebook.com/pages/TEDx-EasternMetropolitanBypass/337763226244869


Chuck James

unread,
Dec 11, 2012, 2:06:32 PM12/11/12
to django...@googlegroups.com
Thanks for the reply guys :).

The reason, I am mentioning the DB here, is that MongoDb is not a relational database, so when one will tell me the Django deployment, he should keep non relational database in mind. 

Other point, deployment without any common web server (apache/nginx) because python it-self a nice language,  then why should we convert our project, so that apache/nginx will understand our code. There should be some good webserver in python. This will reduce the overhead on web server, I guess.

The default way and the best way to deploy it means:
Best way: What is the deployment process for the other best sites (firefox/pininterest/...), how are they deploying it.
Default way: The easiest way for easiest configuration setting/ lease server end changes. And most people use it to deploy.


Looking forward for your replies :).

yati sagade

unread,
Dec 11, 2012, 2:24:16 PM12/11/12
to django...@googlegroups.com
A webserver written in Python is almost certainly something you don't want for production as frankly, Python in its current form is just not suited for that.  You can try Tornado, though, which is a pure Python non-blocking webserver that seems to be very scalable. The "best" way - you can arrive at that by reading how people are doing it, like on http://instagram-engineering.tumblr.com/ or http://engineering.pinterest.com
Twitter's engineering blog is always a treat to read, as is Google's. There's a very interesting article on YouTube's backend, which is written in Python: http://highscalability.com/youtube-architecture
There are countless such resources, and the only thing you'll notice by reading them is that over and above the widely accepted best practices, the deployment needs of companies vary greatly and the solution that works for them is a result of experience and experimentation. Likewise, there is not "default" setup to suggest here as even a small company's "default" setup is often tailored to its needs and is hence the "best" for itself! Cheers :)


To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/TcQRxEMlbg8J.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.

Chuck James

unread,
Dec 11, 2012, 3:03:40 PM12/11/12
to django...@googlegroups.com
Really in-depth reply with fair option :) thanks, Seems, I should take a dedicated web server and then start implementing it with Gunicorn (will try first, then I may move to apache). Now I need to read how to deploy django with Gunicorn/apache.

Thanks.
Reply all
Reply to author
Forward
0 new messages