Load balancing in Dolibarr

In anticipation of a project that involves the use of n web servers (+ a DB server), I would need to understand how Dolibarr is structured to work in this type of situation.
I am specifically referring to the use of the cache and the file system.
Thanks

1 Like

Hey @mgribaudo,

since I “reverse engineered” Dolibarr a little bit, I may give you an answer. As long as you use one central DB server, the situation is as follows:

You should be able to install multiple web servers and point them to the central DB server. The web servers have to sync their dolibarr directory (like drbd/ocfs2) or access a shared medium. If you want to separate the data and the software, you should share/sync the directory dolibarr/documents at least, as there are the attached files, etc. stored.

Your load balancing should be somehow session aware (sticky session for a certain time or based on cookies, etc.), since Dolibarr does not store any session in the DB (only the login time of a user for information). The session handler seems to be PHP. This means that a switch to another server yields into a new login.

Hope that helps.