开发者

When is a good time to start thinking about scaling?

开发者 https://www.devze.com 2022-12-31 06:42 出处:网络
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

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开发者_StackOverflow 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


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:

  • "Scalable Internet Architectures" - http://www.amazon.com/Scalable-Internet-Architectures-Theo-Schlossnagle/dp/067232699X/ref=sr_1_1?ie=UTF8&s=books&qid=1274462743&sr=8-1
  • "The Art of Scalability" - http://www.amazon.com/Art-Scalability-Architecture-Organizations-Enterprise/dp/0137030428/ref=sr_1_3?ie=UTF8&s=books&qid=1274462743&sr=8-3
  • "Art of capacity Planning" - http://www.amazon.com/Art-Capacity-Planning-Scaling-Resources/dp/0596518579/ref=pd_bxgy_b_text_b


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消