TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: What did you learn in building your scalable web application?

6 点作者 sravfeyn超过 12 年前
I have built couple of client-side API mash-ups. I have only worked as an intern on a big (in terms of users) web application. I am planning to build a Django application on AWS for a large user base. Though I can build a quick prototype on Django, I just have no experience to learn from.<p>What are the common 'gotchas' in building a scalable application in Django on AWS? I intend to learn from industry experiences. Please tell your personal experience and give some pointers to blog posts or books.

2 条评论

saeidm超过 12 年前
Unless you're talking about a million concurrent users or something, Django actually scales pretty well for medium concurrency.<p>Here's some basic advice though (1) Cache stuff. Django has a built-in cache framework, but sometimes I even cache stuff in the process (It's not best practice at all, mind you, and every pro will tell you to stay away from that)<p>(2) Use the ORM properly! For example, never do something like len(MyModel.objects.filter(arg='blah')) to do things like count entries or see if entries exist. Instead use .count() or .exists()<p>(3) Unless it's something complicated, I would just use something like Heroku. Easy to scale resources up and down as well as deploy. I typically use AWS S3 as my static host and Heroku as my Django host.
评论 #4549980 未加载
评论 #4549341 未加载
the_cat_kittles超过 12 年前
new relic (<a href="https://newrelic.com/" rel="nofollow">https://newrelic.com/</a>) + load testing with funkload has been helpful for me so far, but we shall see...