Drupal性能:单个主机上的单独站点与多站点配置?

时间:2009-12-20 18:31:49

标签: drupal

是否有人在使用Drupal的多站点配置时运行几个单独的Drupal站点(在单个主机上)有性能数据?

我面临一个选择:使用完全独立的代码库配置几个Apache虚拟主机,与Drupal核心的共享多站点实例配合站点目录sites / www.example.com,sites / www.example1.com等。[在多站点配置,仍然有Apache虚拟主机,但是它们的所有DocumentRoot条目都指向多站点Drupal目录。]我假设多站点方法使用Drupal代码来执行虚拟主机调度,我认为这比让Apache这样做要慢。另一方面,我认为多站点配置可能存在缓存优势。

任何人的绩效比较数据?

1 个答案:

答案 0 :(得分:2)

基思,

如果你有一个网站设置,你很可能在/ sites / default下。从settings.php的文档中,我们看到drupal在默认为sites / default / settings.php之前在9个地方查找settings.php,如下面的代码段所示:

 * The configuration directory will be discovered by stripping the
 * website's hostname from left to right and pathname from right to
 * left. The first configuration file found will be used and any
 * others will be ignored. If no other configuration file is found
 * then the default configuration file at 'sites/default' will be used.
 *
 * For example, for a fictitious site installed at
 * http://www.drupal.org/mysite/test/, the 'settings.php'
 * is searched in the following directories:
 *
 *  1. sites/www.drupal.org.mysite.test
 *  2. sites/drupal.org.mysite.test
 *  3. sites/org.mysite.test
 *
 *  4. sites/www.drupal.org.mysite
 *  5. sites/drupal.org.mysite
 *  6. sites/org.mysite
 *
 *  7. sites/www.drupal.org
 *  8. sites/drupal.org
 *  9. sites/org
 *
 * 10. sites/default

添加另一个单一站点设置仍将保留这9个检查,并将在其上添加虚拟虚拟机,所以我不知道这可能会更快。

另外,如果你最终需要管理很多站点,那么有几个drupal实例会不必要地增加你的管理开销。如果你计划有很多drupal网站,我建议你看hosting project,这是aegir hosting system的一部分。维护该项目的人们花了很多精力来维护和部署大量的drupal站点。

相关问题