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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Mysql Sharding For A Site That Gets 5 Billion Views Per Month

68 点作者 paul_houle大约 16 年前

4 条评论

aristus大约 16 年前
Also remember that the 5Bn pageviews is not the reason to shard -- it's the total size and mutation rate ("read/write ratio") of your data. If your DB fits in memory, or if your reads are 10X your writes, don't just shard because it's cool.
mdasen大约 16 年前
A wonderful read for anyone looking to learn about sharding. However, the Final Thoughts section is probably the most important: don't do it unless you have to. Sharding is a pain and will severely limit your ability to develop new features quickly and for many sites, sharding will never be needed (since they won't grow that big). Databases are efficient and hardware is fast. Sometimes your user-base is larger than what those great things can handle so it's good to know what sharding is, but it isn't fun to do so avoid it if you don't need it.
amix大约 16 年前
If you plan to create a popular product that handles tons of data and tons of users, then include sharding as soon as possible. Bolting sharding on after you have lots of data, lots of code, lots of traffic and lots of users is a nightmare and worst-case scenario.<p>You can postpone it thought if you are unsure how popular your product will become. If you do postpone it, then be sure your joins are "sane" - normally, you don't really do joins in a sharded environment as data is located on different databases, so you will do yourself a major favor in not doing joins that will force you to re-model your data when you switch to sharding.<p>And in a sharded environment you also copy things around :)
评论 #504530 未加载
Hates_大约 16 年前
40m+ active users and I'd never even heard of them!
评论 #503232 未加载
评论 #503479 未加载
评论 #503330 未加载