I was wondering if we could optimize installation scripts and update scripts, so that using the true power of PHP-FPM by splitting the load from the static frontend to a dedicated backend, and maybe even load balance only the PHP? It is waste of resources to have full statics and full webservers on each nc cluster nodes in a loadbalanced setup, while in truth then all you needs is load balancing the computing. I COULD achieve this by simply unzipping the entire NC packages both places (the webserver and the nodes), but this is a little waste I think.
Alternatively: Unpack the archive on a mounted share and have alle the servers use that one. But I am afraid of file locks if more than one stream reads the same file. This might be solveable by OPCaching, but what is your thoughts?
Oh and to avoid the file and database collisions when balancing, then each session will have to use the same PHP-FPM backend node. But this will probably still be a challenge for shared files, right?
Sorry. I do not really understand your problem and i can not really post you a solution.
But maybe you like to read this PDF. But i think it is from 2017. Maybe it helps you in your architecture.
An insiders look into scaling Nextcloud - Matthias Wobben PDF
Also you can read this introduced with Nextcloud 21:
Nextcloud faster than ever! Introducing Files High Performance Back-end - Nextcloud
It is not really a problem, but more a little bit brainstorming.
I anm trying to brainstorm a possible setup, load balancing the PHP load, without the need of Galea clusters and filesync.
Most of the recommended Nextcloud installation guides that I read, makes use of PHP-FPM, but only to a PFP-FPM instance on same host. The power PHP-FPM is that you can offload the execution of the PHP to another server, or with an ultra lightweight tcp loadbalancer, a cluster of PHP servers. As long as those servers connects to the same database, and using the same filepath for nextcloud files (possibly mounted), then what is the issues of doing this? Persistence? Race conditions?