什么时候是开始考虑扩展的好时机?

发布于 2024-09-02 07:20:28 字数 1169 浏览 10 评论 0原文

过去几天我一直在设计一个网站,并对水平扩展网站的不同方面进行了一些研究。如果事情按计划进行,几个月(几年?)后我知道我需要担心网站的扩展和扩展,因为它最终消耗的资源将是巨大的。

因此,这让我开始思考,什么时候是开始考虑可扩展性并进行设计的最佳时机?如果你开始得太早,你很容易使你的设计变得过于复杂,并使其无法实际构建。你也可能过于关注细节、架构等等,最终一事无成。另外,如果你确实让它工作了,但网站却从未成功,你可能已经浪费了很多额外的努力。

另一方面,你可能会在以后为自己节省大量的精力。从头开始将其设计得很大,这样以后让它变得更大会更容易,而且几乎不需要重写。

我知道对于我正在做的事情,我决定现在在扩展方面至少做出一些选择,但我不会完全改变想法以使其完全扩展。值得注意的是,我已经将我的数据库从传统的关系设计重新设计为类似于下面链接的 Reddit 网站上建议的数据库,并且我将尝试一下 memcache。

所以,基本问题是,什么时候是开始思考或担心扩展的好时机,以及在这样做时有哪些好的设计、技巧等?

我一直在做的一些事情有兴趣的人请阅读:

http://www.codinghorror.com/blog/2009/06/scaling-up-vs-scaling-out-hidden-costs.html

http://highscalability.com/blog/2010/5 /17/7-lessons-learned-while-building-reddit-to-270-million-page.html

http://developer.yahoo.com/performance/rules.html

I've been designing a site over the past couple days, and been doing some research into different aspects of scaling a site horizontally. If things go as planned, in a few months (years?) I know I'd need to worry about scaling the site up and out, since the resources it would end up consuming would be huge.

So, this got me to thinking, when is the best time to start thinking about, and designing for, scalability? If you start too early on, you could easily over complicate your design, and make it impossible to actually build. You could also get too caught up in the details, the architecture, whatever, and wind up getting nothing done. Also, if you do get it working, but the site never takes off, you may have wasted a good chunk of extra effort.

On the other hand, you could be saving yourself a ton of effort down the road. Designing it from the ground up to be big would make it much easier later on to let it grow big, with very little rewriting going on.

I know for what I'm working on, I've decided to make at least a few choices now on the side of scaling, but I'm not going to do a complete change of thinking to get it to scale completely. Notably, I've redesigned my database from a conventional relational design to one similar to what was suggested on the Reddit site linked below, and I'm going to give memcache a try.

So, the basic question, when is a good time to start thinking or worrying about scaling, and what are some good designs, tips, etc. for when doing so?

A couple of things I've been reading, for those who are interested:

http://www.codinghorror.com/blog/2009/06/scaling-up-vs-scaling-out-hidden-costs.html

http://highscalability.com/blog/2010/5/17/7-lessons-learned-while-building-reddit-to-270-million-page.html

http://developer.yahoo.com/performance/rules.html

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

み零 2024-09-09 07:20:28

从某种角度来看,缩放技术已被相当接受和巩固。因此,在开始该项目之前,我会阅读有关该主题的书籍,而不是依赖网络链接/文章。

我建议:

Under a certain point of view, scaling techniques are quite accepted and consolidated. So instead on relying on web links/articles, I'd read books on the topic before starting the probject.

I suggest:

墨小沫ゞ 2024-09-09 07:20:28

一个经过深思熟虑、合理的架构应该允许您在以后进行扩展,而无需过多的资源来实施。从项目一开始就应该考虑这一点。

如今,您可以借鉴非常好的架构和企业设计模式(Rails、MVC、Spring 等),它们允许您在完善且易于理解的基础上开发软件,并提供必要的扩展机制。

A well-though out, sensible architecture should allow you to scale up later without requiring excessive resources to implement. This should be thought about from the very beginning of the project.

Nowadays there are very good architectures and enterprise design patterns you can draw from (Rails, MVC, Spring, etc.) that allow you to develop software on a well-established and well-understood foundation that provides the necessary mechanisms for scaling up.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文