ibexa

Path

ez publish / technical manual / 5.x / features / clustering / cluster configuration settings


Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

  • 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:

    •  FileHandler=eZFSFileHandler
    •  FileHandler=eZDBFileHandler
    •  FileHandler=eZDFSFileHandler

    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:

    •  DBBackend=eZDBFileHandlerMysqliBackend
    •  DBBackend=eZDBFileHandlerOracleBackend

    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:

    •  DBHost=<string>

    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:

    •  DBPort=<integer>

    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:

    •  DBSocket=

    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:

    •  DBName=<string>

    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:

    •  DBUser=<string>

    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:

    •  DBPassword=<string>

    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:

    •  DBChunkSize=<integer>

    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:

    •  DBConnectRetries=<integer>

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

    Default value is:

    DBConnectRetries=3
    

    DBExecuteRetries

    Possible configuration setting:

    •  DBExecuteRetries=<integer>

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

    Default value is:

    DBExecuteRetries=20
    

    NonExistantStaleCacheHandling

    Possible values are:

    •  NonExistantStaleCacheHandling[]=wait
    •  NonExistantStaleCacheHandling[]=generate

    Possible key settings are:

    •  [viewcache]
    •  [cacheblock]
    •  [misc]

    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:

    •  The default value is "wait", which places the process in a wait loop for a limited time until the file is done generating.
    •  The second value is "generate" which lets the requesting process generate its own data without storing the result.

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

    •  viewcache
    •  cacheblock
    •  misc: this is used for any cache that is not viewcache nor cacheblock.

    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:

    •  MountPointPath=<string>

    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:

    • MySQL: DBBackend=eZDFSFileHandlerMySQLiBackend
    • Oracle: DBBackend=eZDFSFileHandlerOracleBackend (requires the Oracle database extension)

    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:

    • dbmysqli: DB cluster, mysqli based (REMOVED as of 5.1, use dfsmysqli)
    • dbmysql: DB cluster, mysql based (DEPRECATED as of 4.7, REMOVED as of 5.0)
    • dfsmysqli: DFS cluster, mysqli based
    • dfsmysql: DFS cluster, mysql based (DEPRECATED as of 4.7, REMOVED as of 5.0)
    • dboracle: DB Oracle (requires the Oracle database extension, DEPRECATED & REMOVED as of 5.1)
    • dfsoracle: DFS with Oracle database (requires the Oracle database extension, DEPRECATED & REMOVED as of 5.1)

    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)

    Deprecated: As Oracle legacy db driver is no longer part of the product as of 5.1, this setting has been deprecated (and is not used by any functionality).

    Default value: false.

    Possible values:

    • true: enable the feature
    • false: disable the feature

    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:

    • true: enable the feature
    • false: disable the feature

    Example:

    define( 'CLUSTER_ENABLE_DEBUG', false );
    

    CLUSTER_ENABLE_HTTP_CACHE

    Controls the HTTP cache feature. If enabled:

    • etag headers will be sent
    • if-modified-since request headers will be checked

    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:

    • true: enable the feature
    • false: disable the feature

    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:

    • true: use the default value (86400)
    • false: disables the Expires header entirely
    • integer: the TTL to use in seconds.

    Example:

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

    CLUSTER_HEADER_X_POWERED_BY (optional)

    Controls the X-Powered-By header for cluster binary requests.

    Possible values are:

    • false: disables the custom header definition. The default header generated by PHP will be used instead
    • "any string": set the header to "any string".

    Example:

    define( 'CLUSTER_HEADER_X_POWERED_BY', 'dfsmysqli' );
    

    Note: Please be aware that the value true shouldn't be used, as it will only return "1" in your header.

    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' );
    

    Ester Heylen (14/09/2010 12:35 pm)

    André R. (05/08/2013 11:51 am)

    Geir Arne Waaler, Bertrand Dunogier, Andrea Melo, André R., Ricardo Correia


    Comments

    There are no comments.