Multi Database Setup
# support
o
Hi all, I’m exploring deployment options for Medplum in cases where strict data residency laws apply (e.g., certain countries require local storage). Since Medplum uses a single database model, how would one approach re-architecting to support multiple regional databases while still enabling cross-border collaboration? For example, a patient might need a local provider in their country while also consulting remotely with a provider elsewhere. Has anyone run into this challenge, and what strategies or patterns did you use to address it?
f
Hi @OG , given Medplum's current optimizations for single-region clusters, I would recommend setting up a dedicated Medplum cluster in each region where you need to comply with data residency laws, then leveraging FHIR APIs for interoperability between your different Medplum clusters. Using [FHIR identifiers](https://www.medplum.com/docs/fhir-basics#naming-data-identifiers) effectively can help you maintain maintain source of truth IDs when importing/exporting data between clusters. We have seen Medplum used in this way as a synchronizer of EHR data between multiple systems. It could be helpful to designate one primary region as your "master" for global patient and provider identities, where you could use [Subscriptions](https://www.medplum.com/docs/subscriptions) to trigger event based updates between your different Medplum clusters to keep data in sync. I will note that deploying Medplum across multiple regions to satisfy data residency laws and then keeping those clusters in sync is not something that we have worked on before, so you are in relatively untested territory here.
97 Views