PostgreSQL read replicas support #7263
linus-ha
started this conversation in
Feature Requests & Ideas
Replies: 1 comment
-
Hello @linus-ha, have you tried implementing a custom solution for this? I am also exploring a solution to implement a replica set like Master-Slave. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
A typical configuration of PostgreSQL is running multiple DB Servers, where one is the main one and others are replicating the main one. The secondary Postgres instances are therefore in read-only. (Not using technical correct terms here)
Allowing access to these replicas allows for better read performance, splitting the work when querying (not mutating). Drizzle seems to have an implementation for this: https://orm.drizzle.team/docs/read-replicas
This should be fairly easy to implement. You should just need to allow the user setting replica pools in the payload config. Then, when replica pools are defined, init drizzle with
withReplicas
, as shown in the doc link I've provided.Beta Was this translation helpful? Give feedback.
All reactions