The discussion revolves around deploying a secondary/stand-by Discourse setup. lejeczek is trying to set up a read-only node for both Redis and PostgreSQL but is encountering an error when Discourse attempts to write to the read-only replica.
lejeczek and pfaffman discuss the possibility of achieving high availability (HA) setup through PostgreSQL replication and potentially Redis replication. pfaffman suggests using guides from elsewhere, configuring web-only containers, and utilizing haproxy to handle the switch.
lejeczek notes the lack of official support for multi-master pgSQL and Redis, and proposes the idea of “enhancing” Discourse to allow it to run on read-only data without failing.
Hi guys.
How does one deploy secondary/stand-by Discourse?
I thought that would be rather a common topic but I failed to find anything on that.
Such a stand-by Discourse would be - obviously, in my mind, thus trying to set it up that way - running on a slave/-read-only node(s), read-only both for Redis & pgSQL. But Discourse fails to start with:
Redis::CommandError: ERR Error running script (call to f_bcec1d9b3bbcfb089dc0b7316771be9f011872b6): @user_script:8: @user_script: 8: -READONLY You can’t write against a read only replica.
even with DISCOURSE_SKIP_BOOTSTRAP=yes
How do you guys do that - this is all in/about containers - is it possible to have such a stand-by Discourse - the way I’m trying or any other approach - have aka HA setup?
From what I understand, there is no official non-third-party tech to do multi-master pgSQL & even more so that applies to Redis.
Is it really not possible to tell Discourse about such environment and tell it not to worry about it &| ignore it?
If it’s not and @devel read this, then I suggest - many I’d think will appreciate - to “enhance” Discourse that way - so it does all the necessary checks but does not fail but starts & run on such read-only “data”.