Discourse synchronisation for multiple instances

I have a master server and I will be having more than 100-200 slave instance. Slave instance can be online/offline but will be used by users. But whenever an offline instance comes online it should be able to sync with master server without creating conflicts and all update all the latest data. I do not want to create any code related changes as discourse keeps updating itself quite often and don’t want to break instance due to code changes.

I am thinking of tweaking postgresql to some extent. Other files related data can be synced using syncthing. But updating postgresql data is something which worries me because if i directly sync master data then the work done by offline user will get erased after the sync.

I am thinking to try changing auto-increment sequence of every table to UUID in database.

Is there any possible easy solution for the same ?

Discourse is not designed for an application like this. It is extremely unlikely you will be able to get two-way postgres synchronisation working in a way that doesn’t break Discourse.

Changing this would require some significant changes in the Discourse code.

If you make the slaves read-only, and synchronise postgres one-way, then it might be possible to make this work… but it will be difficult


Hi, I plan to have similar kind of usage as you. I found an article about merging 2 discourse site. If the merging steps can be automated, maybe we can setup a cron job to constantly merge the database between the master server and slave instances?