Has anyone implemented Master/Slave (Primary/Read Replica) PostgreSQL setup with Mendix Private Cloud?
0
Hi Everyone, We are running our Mendix application on Mendix Private Cloud, and our database is PostgreSQL. Currently, the app connects to the database via the Mendix-recommended JDBC connection string. Since JDBC points to a single endpoint, all read/write operations go to one primary database instance. To improve performance and reduce load on the primary DB, we are exploring whether read/write splitting or a master/replica (primary → read replica) database architecture can be implemented with Mendix. Has anyone successfully configured Mendix to use PostgreSQL read replicas for read-only queries?If yes, what approach or architecture did you follow? Is it possible via JDBC configuration? Does Mendix runtime natively support read/write splitting? Are there recommended patterns for using Pgpool-II, HAProxy, or other middleware in front of Mendix? Any insights, experiences, or best practices would be really helpful. Thanks!
asked
Avadhoot Hublikar
1 answers
1
Hi Avadhoot Hublikar
Mendix does not natively support read/write splitting or direct use of PostgreSQL read replicas via JDBC. All queries from the runtime go through the single JDBC endpoint, so reads and writes hit the primary database. To leverage replicas, you need to introduce middleware (like Pgpool‑II or HAProxy) or external reporting connections.
Multi‑host JDBC failover strings (e.g., listing primary and replicas) are not supported in Mendix Private Cloud according to community discussions[CommunityDiscussion].