为每天 20,000 名访问者的多站点 Drupal 安装扩展 MYSQL 数据库
我有一个多站点 Drupal 安装,大约有 20 个 url 指向相同的代码库和一个公共数据库。每天大约有 20,000 名访客访问所有网站,我希望这个数字能够增加。
我目前使用 2 台服务器 - 一台是 Linux 平台上的网络服务器 Apache 2,另一台是数据库服务器 - MYSQL。
Offlate 我的 MYSQL 服务器无法处理负载并开始表现不稳定 - 有时发出警告,有时不返回数据,有时超时。我已经尝试了所有优化技术,但问题似乎有所增加。
如果有人能给我建议解决问题的方法,我将非常感激。将服务器容量加倍会有帮助吗?还是我应该使用集群或云?另外,带有负载均衡器的集群 Web 层是否有用,或者仅使用带有优化的集群数据库是一个可行的解决方案?
我遇到了这个网站 http ://www.johnandcailin.com/blog/john/scaling-drupal-open-source-infrastruct-high-traffic-drupal-sites。但是我对选择哪种架构感到困惑
I have a multisite Drupal installation with about 20 urls pointing to the same code base and a common database. I have around 20,000 visitors visiting all sites daily which I hope would increase.
I am using 2 servers currently- one being the webserver Apache 2 on Linux Platform and the other is the database server- MYSQL.
Offlate my MYSQL server is being unable to handle the load and starts behaving erratically - sometimes issuing warnings, sometimes not returning data, sometimes timing out. I have tried all optimizing techniques but the problem has seemed to increase.
I would be very thankful if someone could suggest me a solution to the problem. Would doubling the capacity of server help or should I head towards using a cluster or cloud? Also would a clustered web tier with load balancer be useful or just using a clustered db with optimization is a viable solution?
I came across this site http://www.johnandcailin.com/blog/john/scaling-drupal-open-source-infrastructure-high-traffic-drupal-sites . However I am confused about which architecture to choose
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
缓存!缓存!缓存!
如果您有一个不太频繁且相对静态的网站,其中大部分是匿名用户,Boost 将显着提高性能。 Boost 是静态页面缓存,因此对缓存的任何命中都将完全绕过 Drupal。
如果你有较多的登录用户,你应该设置Memcache,这也避免了数据库。
安装 APC 始终是一个好主意,但如果您的瓶颈是数据库,那么它不会真正帮助您。
此外,您可以使用 Devel 模块检查 Drupal 生成的查询,并尝试优化其中的一些内容,例如禁用低效或行为不当的模块。
Caching! Caching! Caching!
If you have a not so frequently and relatively static website with mostly anonymous users, Boost will dramatically increase performance. Boost is a static page cache, so any hits on the cache will completely bypass Drupal.
If you have more logged in users, you should set up Memcache, which also avoids the database.
Installing APC is always a good idea, but it won't really help you here, if your bottleneck is the database.
Additionally you can use the Devel module to check the queries generated by Drupal and try to optimize some stuff there, e.g. disabling inefficient or misbehaving modules.