Sharding PostgresQL with HAPI FHIR

61 views
Skip to first unread message

Rico Aarntzen

unread,
Feb 5, 2025, 9:35:13 AM2/5/25
to HAPI FHIR
Hello all,

For improving scalability and performance we would like to shard our database across nodes. Ive searched the HAPI FHIR documentation but could only find information about partitioning.

So my question is: Is sharding possible with HAPI FHIR (7.6.0) and PostgresQL? 
And if so, how?

Thanks in advance for your answer(s).

Best regards,
Rico

Arne Van Eycken

unread,
Feb 5, 2025, 9:44:11 AM2/5/25
to Rico Aarntzen, HAPI FHIR

I will follow this as we have the same question


--
You received this message because you are subscribed to the Google Groups "HAPI FHIR" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hapi-fhir+...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/hapi-fhir/74db93c1-ae07-46ae-8b8c-443114bb79bbn%40googlegroups.com.

James Agnew

unread,
Feb 5, 2025, 10:28:10 AM2/5/25
to Arne Van Eycken, Rico Aarntzen, HAPI FHIR
By sharding, are you referring to support for Postgresql Table Partitioning?

If so, I guess the answer is that it's not yet supported, but this is coming as a part of our Feb release which is out this month. We will be writing a bunch more about how to do this in the next few weeks, but the next release introduces a feature called Database Partitioning Mode which will enable support for native database partitioning:


Cheers,
James

Rico Aarntzen

unread,
Feb 5, 2025, 10:50:55 AM2/5/25
to HAPI FHIR
Hi James,

Thank you for your answer. I was referring to sharding data and not partitioning. Like this: (https://wiki.postgresql.org/wiki/WIP_PostgreSQL_Sharding)
I see some PostgresQL extensions like Citus (https://docs.citusdata.com/en/stable/get_started/what_is_citus.html) I can try to use with HAPI FHIR.
Not sure if anyone else already tried this with success? Do you know if this works/doesn't work James?

Thanks in advance,
Rico
Op woensdag 5 februari 2025 om 16:28:10 UTC+1 schreef james...@gmail.com:

Muhammad

unread,
9:33 AM (5 hours ago) 9:33 AM
to HAPI FHIR
Hello Rico,

Did you find any working solution for Sharding? 

We have attempted CitusData migrated the Hapi_r4 tables but the Hapi_Fhir_JPS_Server is so strict that it is every time checking the schema and refuses to start. We have tried many application configurations, but non of them seems to work.

Any help or guidance is appreciated.

Best Regards,
M

James Agnew

unread,
9:39 AM (5 hours ago) 9:39 AM
to Muhammad, HAPI FHIR
Hi Muhammad,

Supporting Citus Sharding requires a bunch of schema tweaks and changes to specific query strings. Support is currently only available as an option with our commercial package (Smile CDR / OmniVera).

Cheers,
James

Reply all
Reply to author
Forward
0 new messages