1

我正在寻找一种设置服务器的方法,以使 boost 模块创建的静态缓存可以轻松地镜像到其他几个服务器。

4

2 回答 2

3

您可以使用 rsync 来执行此操作,但它很脆弱并且容易损坏。使用以下任一方法会更好:

  • 单个共享网络文件系统
  • 或者我推荐的解决方案,使用集群分布式文件系统,例如 glusterFS。这通常用于 Web 服务器集群,用于自动跨节点分发 Web 应用程序。
于 2011-01-28T15:33:26.860 回答
0

here are some ideas...

If you want to prevent getting stabbed in the back by your hosting provider wouldn't be better to use a solution that doesn't rely on the hosting provider?

My choice would be to use a third party dns provider which supports Round Robin [ http://en.wikipedia.org/wiki/Round_robin_DNS ] -or your own server configured to support round robin- (which you can also use for auto-load-balancing).

Round robin should allow you to have several A addresses and, every time someone goes to your domain, it checks whether the servers are up or down, and redirects to the servers that are up.

For the static caches I think you could use rsync, but that's involving your hosting provider. Maybe a better way (but I think not resource-efficient) would be to have clones of your drupal installation in each server, then syncing the DBs using MySql Mirroring (and cron to create the boost static cache)... then you would not depend on any server because all of them would have the whole site and use Round Robin to redirect your domain to the working server.

于 2011-02-26T20:12:14.043 回答