More Nextcloud instance on one DB

Hi,
I am trying to use two Nextcloud instance (2 servers) which are connected one DB. Is possible that two Nextcloud have one common database? As database server I am using Percona DB cluster. Also I am using common storage system for both instances via CEPH.

But every time when I am trying to use 2 Nextcloud suddenly, the load time of main page with storage is something about 20 - 50s, which is really much. I think it is caused because two Nextclouds are trying write to DB at the same time.

Is there any solution how to repair it?
Maybe if I am using one DB for more Nextcloud it is needed to use tools like Corosync, Pacemaker?

Thank you very much for help!


Nextcloud version 12
Operating system Debian 8:
Apache 2.4.25:
PHP version 5.6:

Check out Help me test this 3 node cluster

I had similar issues and while I go about sync differently, the same principles apply I think.

There’s a lot more to think about than just replicating /data/

OK thank you,
so the solution is SyncThing between both Nextcloud?
And combination with S3 primary external storage, DB Percona cluster is OK ?

How you replicate is up to you, I wanted to try SyncThing out of interest.

There are also deployment recommendations documented, I believe I’ve linked to them in the above topic