Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,075 of 9,075 pages
About the help in other languages
All help pages

Clustering and shared storage

Run Exponential on several web servers - the cluster file handlers (eZFSFileHandler, eZDFSFileHandler) in file.ini, the DFS mount and its database, sessions, cron and queue workers, and how application code stays…

Download as PDF

Address: https://doc.exponential.earth/exphelp/viewer/help/creators/app-creators/clustering-and-shared-storage.md

On this page

Clustering and shared storage

This page is for application creators and administrators whose site runs on more than one web server. All servers must see the same files and the same database; Exponential's cluster file handlers make the storage shared.

Contents

  1. The file handlers
  2. Setting up DFS
  3. What else must be shared
  4. Cluster-safe application code

The file handlers

settings/file.ini [ClusteringSettings] FileHandler:

HandlerUse
eZFSFileHandler (shipped)one server, files on the local disk
eZDFSFileHandlerseveral servers: files on a shared mount (NFS) with a database table that knows each file's state

Setting up DFS

file.ini [eZDFSClusteringSettings] names the shared mount (MountPointPath), the database backend (DBBackend, for example eZDFSFileHandlerMySQLiBackend), the DFS backend and the cluster database's host, name and user (retries: DBConnectRetries, DBExecuteRetries). Put the password in settings/override/. Then move existing files into the cluster with the kernel's tools (bin/php/clusterize.php) and purge with clusterpurge in cron (see doc/eng-us/examples/commands/ for the commands).

What else must be shared

Shared thingHow
The databaseone server or a database cluster
Code and settingsthe same release deployed to every server
Sessionsthe database session handler, so any server can read them (Sessions)
Content jobsthe job directory shared (Content jobs)
Cronon one server, or with locks
Queue workersany number of servers; expqueue leases jobs to one worker
Velocity response cachesper server; clear on every server after a deploy
The proxythe load balancer's address in TrustedProxies[]

Cluster-safe application code

  • Write and read files through eZClusterFileHandler::instance( $path ) (storeContents(), fetchContents(), processCache()), never with file_put_contents() into var/ (Caching in applications).
  • Store uploads through the datatypes, which use the cluster handler.
  • Do not keep state on one server's disk or in one process's memory.
  • Make background work idempotent and locked, so two servers do not do it twice.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x