Cluster Configuration Settings

The cluster settings are located in an override of your "settings/file.ini" file (most likely "settings/override/file.ini.append.php"or "settings/siteaccess/<SITE_ACCESS>/file.ini.append.php")
When using the eZDB file handler the settings must be configured in the [ClusteringSettings] block. When using the eZDFS file handler, the settings in the [eZDFSClusteringSettings] block must also be configured along with setting "FileHandler=eZDFSFileHandler" in [ClusterSettings] in the same file.

Note: It is recommended to use a distinct database server if you are clustering for a high traffic website

[ClusteringSettings]

FileHandler

Possible configuration settings are:

This setting sets the cluster file handler. For more information regarding the cluster file handlers visit chapter "cluster file handlers". Since eZ Publish 4.1 the names of the file handlers have changed. For instance 'ezdb' is no longer recognised, the correct setting here would be 'eZDBFileHandler'. When using an eZ DFS File Handler please refer to the settings in [eZDFSClusteringSettings].

DBBackend

Possible configuration settings are:

Use this setting to define the database backend used by the eZDB file handler. When using an eZDFSFileHandler please refer to the settings in [eZDFSClusteringSettings].
For the database backend setting (DBBackend=) the previously used value "mysql" is deprecated. Possible values are "eZDBFileHandlerMysqliBackend" when using MySQL or "eZDBFileHandlerOracleBackend" when using Oracle (this will require the ezoracle extension)

DBHost

Possible configuration setting is:

Use the actual host name as value. In most cases this value will be the same as the "Server" setting specified under the [DatabaseSettings] block of your "site.ini.append.php" configuration file. When using an eZ DFS File Handler please refer to the settings in [eZDFSClusteringSettings].

Note: It is recommended to use a distinct database server if you are clustering for a high traffic website.

Default value is:

DBHost=localhost

DBPort

Possible configuration setting is:

This setting sets which port to use. When using an eZ DFS File Handler please refer to the settings in [eZDFSClusteringSettings].

Default value is:

DBPort=3306

DBSocket

Possible configuration setting:

Make sure that the "DBSocket" setting is correct. Leave it empty if you have "Socket=disabled" under the [DatabaseSettings] block in "site.ini.append.php". When using and eZDFSFileHandler please refer to the settings in [eZDFSClusteringSettings].

Default value is:

DBSocket=

DBName

Possible configuration setting:

Use the actual database name as value. In most cases this value will be the same as the "Database" setting specified under the [DatabaseSettings] block of your "site.ini.append.php" configuration file. When using an eZ DFS File Handler please refer to the settings in [eZDFSClusteringSettings].

Default value is:

DBName=cluster

DBUser

Possible configuration setting:

Use the user name as value. In most cases this value will be the same as the "User" setting specified under the [DatabaseSettings] block of your "site.ini.append.php" configuration file. When using an eZ DFS File Handler please refer to the settings in [eZDFSClusteringSettings].

Default value is:

DBUser=root

DBPassword

Possible configuration setting:

Use the actual password as value. In most cases this value will be the same as the "Password" setting specified under the [DatabaseSettings] block of your "site.ini.append.php" configuration file. When using an eZ DFS File Handler please refer to the settings in [eZDFSClusteringSettings].

Default value is:

DBPassword=

DBChunkSize

Possible configuration setting:

This setting determines the size of the blocks (in bytes) into which files are split when they are fetched and inserted from the database. This setting is only valid when using eZDB.

Default value is:

DBChunkSize=65535

DBConnectRetries

Possible configuration setting:

When using an eZ DFS File Handler please refer to the settings in [eZDFSClusteringSettings].

Default value is:

DBConnectRetries=3

DBExecuteRetries

Possible configuration setting:

When using an eZ DFS File Handler please refer to the settings in [eZDFSClusteringSettings].

Default value is:

DBExecuteRetries=20

NonExistantStaleCacheHandling

Possible values are:

Possible key settings are:

This is an advanced setting and should only be customized if it is specifically required. This setting defines what happens when a requested cache file is already being generated and no expired cache file exists (for instance if the content is new).
 There are two possible values:

Use the [key] to define the type of cache that is impacted by the setting. The following three cache types are allowed ar key:

Example configuration setting is:

NonExistantStaleCacheHandling[viewcache]=wait

 [eZDFSClusteringSettings]

Specific configuration settings when using the eZ DFS File Handler. Most are similar to the ones mentioned in [ClusteringSettings], except "MountPointPath", "DBBackend" and "DBSocket".

MountPointPath

Possible configuration setting:

Since the eZ DFS File Handler is based on NFS, each eZ Publish installation sharing the same relational database must use the same cluster database and each should have a local mount point to the same NFS export. The location of the local mount point must be set here.

Example setting is:

MountPointPath=/media/nfs

DBBackend

Possible configuration setting:

Use this setting to define the database backend used by the eZ DB File Handler.

Default value is:

DBBackend=eZDFSFileHandlerMySQLiBackend

config.php / config.cluster.php

Since eZ Publish 4.7, the way images & other binary files are served from the var folder has changed. Instead of being done in a custom index_cluster.php file, settings now go in config.php OR config.cluster.php, and index_cluster.php is common to all clusters, and provided in the distribution. Documentation for all these settings can be found in the config.php-RECOMMENDED file you will find at the root of your eZ Publish setup.

All these directives are set as PHP constants, using the define keyword.

CLUSTER_STORAGE_BACKEND

Required setting. Defines the storage backend, e.g. cluster driver, that must be used. Possible values are:

Example:

define( 'CLUSTER_STORAGE_BACKEND', 'dfsmysqli' );

CLUSTER_STORAGE_HOST

Cluster database host. Required.

Example:

define( 'CLUSTER_STORAGE_BACKEND', 'dfsmysqli' );

CLUSTER_STORAGE_PORT

Cluster database port. Optional: the default RDBMS port will be used if set to false.

Example:

define( 'CLUSTER_STORAGE_PORT', 3306 );

CLUSTER_STORAGE_USER

Cluster database user. Required.

Example:

define( 'CLUSTER_STORAGE_USER', 'mydatabaseuser' );

CLUSTER_STORAGE_PASS

Cluster database password. Required.

Example:

define( 'CLUSTER_STORAGE_PASS', 'mypassword' );

CLUSTER_STORAGE_DB

Cluster database name. Required.

Example:

define( 'CLUSTER_STORAGE_DB', 'ezclusterdatabase' );

CLUSTER_STORAGE_CHARSET

Charset to use when communicating with the database. Must match the value in file.ini.

Example:

define( 'CLUSTER_STORAGE_CHARSET', 'utf8' );

CLUSTER_MOUNT_POINT_PATH

Required for DFS. Doesn't apply to DB.

Controls the path to the NFS share mount point on the local server.

Example:

define( 'CLUSTER_MOUNT_POINT_PATH', '/media/nfs' );

CLUSTER_PERSISTENT_CONNECTION (optional)

Enables/disables persistent database connections, for backends with support (currently: Oracle, with appropriate extension)

Default value: false.

Possible values:

Example:

define( 'CLUSTER_PERSISTENT_CONNECTION', true );

CLUSTER_ENABLE_DEBUG

Enables/disables debug mode. When debug is enabled, errors will be visible in the generated page. Do not use this in production as it might reveal informations about your setup and database.

Default value: false.

Possible values:

Example:

define( 'CLUSTER_ENABLE_DEBUG', false );

CLUSTER_ENABLE_HTTP_CACHE

Controls the HTTP cache feature. If enabled:

Default value: true.

Example:

define( 'CLUSTER_ENABLE_HTTP_CACHE', true );

CLUSTER_ENABLE_HTTP_RANGE (optional)

Controls the HTTP range (partial download) feature. If enabled, it will be possible to request only parts of a file.

Possible values:

Important note: this feature is NOT available on DB based cluster (dbmysqli, dboracle), only for DFS. Thus, if using DB based cluster, this constant should be set to false.

Example:

define( 'CLUSTER_ENABLE_HTTP_RANGE', 'dfsmysqli' );

CLUSTER_EXPIRY_TIMEOUT (optional)

Controls usage of the Expires header.

Default value: 86400 (one day).

Possible values:

Example:

define( 'CLUSTER_EXPIRY_TIMEOUT', 315532800 ); // 10 years

CLUSTER_HEADER_X_POWERED_BY (optional)

Controls the X-Powered-By header.

Possible values are:

Example:

define( 'CLUSTER_HEADER_X_POWERED_BY', 'dfsmysqli' );

CLUSTER_STORAGE_GATEWAY_PATH (optional)

Used to specify the path to a custom cluster gateway implementation. More data about the gateway system can be found in the feature document. The value is the path to a custom clustering gateway PHP file. When provided, the gateway filename won't be built based on the default path + CLUSTER_STORAGE_BACKEND, but used as provided.

Example:

define( 'CLUSTER_STORAGE_GATEWAY_PATH', 'extension/ezoracle/clusterfilehandlers/gateway/dfs.php' );
Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.