【问题标题】:Drupal performance: separate sites vs multisite configuration on single host?Drupal 性能:单独的站点与单个主机上的多站点配置?
【发布时间】:2009-12-20 18:31:49
【问题描述】:

有没有人有关于运行多个单独的 Drupal 站点(在单个主机上)与使用 Drupal 的多站点配置的性能数据?

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

任何人的性能比较数据?

【问题讨论】:

  • 我认为这是一个非常有趣的问题。不幸的是,我没有答案。你问过 drupal.org 的好人了吗?
  • 我查看了 drupal.org 上的一堆帖子。很多很好的信息,但不幸的是没有找到这个问题的答案。

标签: drupal


【解决方案1】:

基思,

如果您有单个站点设置,则很可能在 /sites/default 下有它。从 settings.php 的文档中,我们看到 drupal 在默认为 sites/default/settings.php 之前在 9 个位置查找 settings.php,如下面的 sn-p:

 * 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 个检查,并将在其上添加 apache 虚拟,所以我看不出这怎么可能更快。

此外,如果您最终需要管理大量站点,那么拥有多个 drupal 实例会不必要地增加您的管理开销。如果您打算拥有很多 drupal 站点,我建议您查看 hosting project,它是 aegir hosting system 的一部分。维护该项目的人付出了很多努力来简单地维护和部署大量的 drupal 站点。

【讨论】:

    猜你喜欢
    • 2011-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-02-11
    • 2017-09-02
    • 1970-01-01
    • 2018-12-13
    • 1970-01-01
    相关资源
    最近更新 更多