c2corg / v6_api

REST API for https://www.camptocamp.org
GNU Affero General Public License v3.0
22 stars 26 forks source link

Database read/write splitting or failover #567

Open mfournier opened 7 years ago

mfournier commented 7 years ago

Currently postgresql is a SPOF. We can't reconfigure/resize/move/update it without putting the whole website offline for at least a few seconds.

We'd need either one of these:

In both cases, the app needs to be clever enough to gracefully handle the case where the (single) writeable database is gone. A sort of maintenance mode where everything is read-only, and the feedback to the user is unambiguous about it.

When discussing this with @tsauerwein this afternoon, he mentioned: https://github.com/camptocamp/c2cgeoportal/pull/2223

anayrat commented 7 years ago

How do you deal if the replica server has a lag? IMHO you should use the replica only in case of switchover or failover.