Running multiple replicas of Joplin server for HA?

Operating system

Linux

Joplin version

3.5.2

Desktop version info

n/a

Sync target

Joplin Server

What issue do you have?

Hello community!

I was wondering whether Joplin Server with a PostGreSQL backend would allow for running with multiple instances/ replicas in parallel. I find nothing towards that end in any of the forums or documentation I searched (may be a search issue still).

Not that I depend on it, it is only my notes at stake.
Still I would like to have the replica count in my deployment on my homelab kubernetes equal two, merely because this is the purpose of deployments ... and I am scared this would potentially create havoc with my notes if I tried.

I found nothing regarding the server being either stateful or stateless ... so I am at a loss.

Any advise?
Any thoughts?
Any insights?

Thanks in advance and greetings,
—Thomas

Three layers could potentially be replicated:

  1. the joplin server docker container itself would be the easiest I guess, you could put a load balancer in front of its many instances
  2. postgre database replication could be tricky for your data consistency if you have several masters, but safe if you have one master and one read only slave for easy disaster recovery
  3. note attachment file storage: similar comment to 2. Also the risk that db and files get randomly slightly out of sync.

What risk are you concerned of for you to consider server side replication?

Personally I focus on client side replication only. Zero db/file out of sync risk here. I have Kopia backup my whole joplin folder every 10 minutes from my local Mac Joplin Desktop client to a remote server. Worst case scenario I lose 10 minutes of changes. Full disaster recovery might take ages (resyncing everything from scratch from a backup) but I don't really care.

Joplin Server supports read replica using these env variables:

Is that what you mean?