Django 可以扩展吗? [英] Does Django scale?

查看:20
本文介绍了Django 可以扩展吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用 Django 构建一个 Web 应用程序.我选择 Django 的原因是:

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

  • 我想使用免费/开源工具.
  • 我喜欢 Python 并且觉得它是一种长期语言,而对于 Ruby 我不确定,而且 PHP 似乎很难学习.
  • 我正在为一个想法构建原型,并没有过多考虑未来.开发速度是主要因素,我已经了解 Python.
  • 我知道如果我将来选择这样做,迁移到 Google App Engine 会更容易.
  • 我听说 Django 不错".
  • 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".

现在我越来越接近考虑发布我的作品,我开始关注规模.我发现的有关 Django 扩展能力的唯一信息是由 Django 团队提供的(我并不是说要忽视它们,但这显然不是客观信息......).

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...).

我的问题:

  • 当今基于 Django 构建的最大"站点是什么?(我主要通过用户流量来衡量大小)
  • Django 能否每天处理 100,000 个用户,每个用户访问网站几个小时?
  • 像 Stack Overflow 这样的网站可以在 Django 上运行吗?
  • 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?

推荐答案

  1. 当今基于 Django 构建的最大网站是什么?"

没有任何地方可以收集有关 Django 构建站点的流量信息,因此我必须使用来自不同位置的数据对其进行尝试.首先,我们在主Django项目页面的首页上有一个Django站点列表,然后是一个列表Django 在 djangosites.org 建立网站.浏览列表并选择一些我知道有不错流量的我们看到:

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:

Pinterest:Alexa 在 2013 年排名第 37 (21.4.2015) 和 7000 万用户

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

Bitbucket:200TB 代码和 2.500.000 个用户

Disqus:使用 Python 服务 4 亿人.

curse.com:每天 60 万次访问.

tabblo.com:44k 每日访问量,参见 Ned Batchelder 的帖子 现代网站的基础设施.

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

chesspark.com:Alexa 排名约 179k.

pownce.com(不再活跃):alexa 排名约 65k.Pownce 的 Mike Malone 在他关于 扩展 Django Web 应用的 EuroDjangoCon 演讲中strong> 表示每秒数百次点击".这是关于如何扩展 Django 的非常好的演示,并提出了一些优点,包括 Django 可扩展性的(当前)缺点.

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 有一个使用 Django 1.5 构建的站点:ePrint center.但是,对于 novmer/2015 整个网站都被迁移了,这个链接只是一个重定向.该网站是参与订阅 Instant Ink 和 HP 提供的相关服务 (*) 的全球服务.

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 (*).

Django 可以每天处理 100,000 个用户,每个用户访问网站几个小时吗?"

是的,见上文.

像 Stack Overflow 这样的网站可以在 Django 上运行吗?"

我的直觉是肯定的,但正如其他人的回答和 Mike Malone 在他的演讲中提到的那样,数据库设计至关重要.如果我们能找到任何可靠的流量统计数据,也可以在 www.cnprog.com 上找到有力的证据.无论如何,这不仅仅是将一堆 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!

关于使用 Django 的博客文章建立高流量网站 michaelmoore.com 被描述为 前 10,000网站.Quantcast 统计数据compete.com 统计数据.

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.

(*) 编辑(包括此类引用)的作者曾在该项目中担任外包开发人员.

这篇关于Django 可以扩展吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆