Hey peeps, I'm building a self-hosted HA and scalable Supabase stack on k8s using StackGres as our postgres controller, how can we split out read and write transactions to the db so that we can balance the read load using our replicas?
n
Needle
05/04/2022, 6:22 PM
Hello @rid!
This thread has been automatically created from your message in #843999948717555735 a few seconds ago.
We have already mentioned the @User so that they can see your message and help you as soon as possible!
Want to unsubscribe from this thread?
Right-click the thread in Discord (or use the ``...`` menu) and select "Leave Thread" to unsubscribe from future updates.
Want to change the title?
Use the ``/title`` command!
We have solved your problem?
Click the button below to archive it.
s
Steve
05/04/2022, 11:04 PM
If you're using supabase-js and postgREST as well - you could load balance based on GETs to read replicas and PATCH/POST/DELETE to the primary instance.
Ok thanks, so I can probably run two Postgrest instances (ro vs rw) and route to them through Kong based on wether they're GET vs PATCH/POST/DELETE etc?