Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does Django scale? [closed]

I'm building a web application with Django. The reasons I chose Django were:

  • I wanted to work with free/open-source tools.
  • I like Python and feel it's a long-term language, whereas regarding Ruby I wasn't sure, and PHP seemed like a huge hassle to learn.
  • I'm building a prototype for an idea and wasn't thinking too much about the future. Development speed was the main factor, and I already knew Python.
  • I knew the migration to Google App Engine would be easier should I choose to do so in the future.
  • I heard Django was "nice".

Now that I'm getting closer to thinking about publishing my work, I start being concerned about scale. The only information I found about the scaling capabilities of Django is provided by the Django team (I'm not saying anything to disregard them, but this is clearly not objective information...).

My questions:

  • What's the "largest" site that's built on Django today? (I measure size mostly by user traffic)
  • Can Django deal with 100,000 users daily, each visiting the site for a couple of hours?
  • Could a site like Stack Overflow run on Django?
like image 223
Roee Adler Avatar asked May 20 '09 05:05

Roee Adler


People also ask

Is Django highly scalable?

Scalable: Some of the high traffic websites developed using Django. Django has the ability to quickly and flexibly scale the website to meet the heaviest traffic demands. (Learn about scalable web applications in Django.)

Is Django horizontally scalable?

Since the Django web nodes have no stored state, they scale horizontally—just fire up more of then when you need them. Being able to do this is the essence of good scalability.

How do I scale a Django site?

Scaling horizontally also requires you to make your app stateless and keep the state “outside”. This can be achieved in Django with Cache Backends (Memcache or Redis) to store data on another server to achieve statelessness. Adding cache to Django can help you handle 45k requests per second.

Can Django handle big data?

For performance reasons, there are certainly reasons not to use Python and Django for operations with large amounts of data. But, Django gives you all the functionality to interact with your database in a easy, understandable and pythonic way.


1 Answers

  1. "What are the largest sites built on Django today?"

    There isn't any single place that collects information about traffic on Django built sites, so I'll have to take a stab at it using data from various locations. First, we have a list of Django sites on the front page of the main Django project page and then a list of Django built sites at djangosites.org. Going through the lists and picking some that I know have decent traffic we see:

    • Instagram: What Powers Instagram: Hundreds of Instances, Dozens of Technologies.

    • Pinterest: Alexa rank 37 (21.4.2015) and 70 Million users in 2013

    • Bitbucket: 200TB of Code and 2.500.000 Users

    • Disqus: Serving 400 million people with Python.

    • curse.com: 600k daily visits.

    • tabblo.com: 44k daily visits, see Ned Batchelder's posts Infrastructure for modern web sites.

    • chesspark.com: Alexa rank about 179k.

    • pownce.com (no longer active): alexa rank about 65k. Mike Malone of Pownce, in his EuroDjangoCon presentation on Scaling Django Web Apps says "hundreds of hits per second". This is a very good presentation on how to scale Django, and makes some good points including (current) shortcomings in Django scalability.

    • HP had a site built with Django 1.5: ePrint center. However, as for novemer/2015 the entire website was migrated and this link is just a redirect. This website was a world-wide service attending subscription to Instant Ink and related services HP offered (*).

  2. "Can Django deal with 100,000 users daily, each visiting the site for a couple of hours?"

    Yes, see above.

  3. "Could a site like Stack Overflow run on Django?"

    My gut feeling is yes but, as others answered and Mike Malone mentions in his presentation, database design is critical. Strong proof might also be found at www.cnprog.com if we can find any reliable traffic stats. Anyway, it's not just something that will happen by throwing together a bunch of Django models :)

There are, of course, many more sites and bloggers of interest, but I have got to stop somewhere!


Blog post about Using Django to build high-traffic site michaelmoore.com described as a top 10,000 website. Quantcast stats and compete.com stats.


(*) The author of the edit, including such reference, used to work as outsourced developer in that project.

like image 174
Van Gale Avatar answered Sep 16 '22 20:09

Van Gale