How to config database server in cluster setup?

hi.all,

I don’t know how to config database server in DHIS2 cluster mode, every node using different or same database server?

Thanks.

1 Like

Hi @linxd,

I read in the docs:

When DHIS 2 is set up in a cluster configuration, it is useful to know which node in the cluster acts as the leader of the cluster. The following API can be used to get the details of the leader node instance. The API supports both JSON and XML formats.

GET /api/36/cluster/leader

(source)

There new features with this, you can see the video:

1 Like

Hi
in a project in Ecuador we tried to use Pgpool to config a postgres cluster data base, we had a problem to save the instance data of tracker program in exec time.
if you find a solution please document the configs.
we used watchdog as pgpool strategy

1 Like

that’s to say, different node using different database which maybe a multi-master database cluster?

Why use different databases when it’s possible to use one database?

Thanks.
I just want to confirm it .

That’s to say, all cluster tomcat web DHIS2 Web node using same config parameter to refer to same shared dir (include dhis2.conf and files) ?
Is there no problem for all node writing the same database (which has been controlled correctly )?

I keep getting this error message Job aborted: ‘Leader election in cluster’, job of type: ‘LEADER_ELECTION’ is already running which seems to imply that one of the cluster nodes is attempting to become a leader after the configured leader time to leave expires. Am I missing something or is this normal behavior?