编写可扩展网站的技术 [英] Techniques for writing a scalable website
本文介绍了编写可扩展网站的技术的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我是网站可扩展性领域的新手.您能向我建议一些使网站可扩展到大量用户的技术吗?
I am new in the website scalability realm. Can you suggest to me some the techniques for making a website scalable to a large number of users?
推荐答案
如果您希望站点扩展到单个服务器的能力范围之外,则需要仔细计划.设计以下内容将是可能的:-
If you expect your site to scale beyond the capabilities of a single server you will need to plan carefully. Design so the following will be possible:-
- 进行配置,以便您的数据库可以位于单独的服务器上.通常这并不难.
- 确保可以将所有静态内容移至CDN,因为这通常会减轻服务器的负担.
- 准备在硬件上花很多钱.更多的RAM和更快的磁盘可以帮助很多.
- 当您需要将数据库或php从一台服务器拆分到多台服务器时,要变得困难得多,因此需要对代码,数据库架构,服务器配置以及您能想到的其他任何东西进行优化尽可能长时间地推迟最后一步.
除此之外,您所能做的就是对您的网站进行压力测试,找出瓶颈所在,然后尝试设计它们.
Other than that, all you can do is stress test your site, figure out where the bottlenecks are and try and design them away.
这篇关于编写可扩展网站的技术的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文