Support separate DB endpoint for read and write operations
Alexander
TL;DR;
Add support for specifying separate read-write and read-only database endpoint when configuring strapi instance.
Details
Modern web apps often deployed on cloud platforms like AWS or GCP or Azure.
These platform offers very powerful Managed Database Services like RDS, Aurora (on AWS) or CloudSQL (Google cloud).
These services are built to scale and offer separate database replicas for read and write operations to help distributing the load on the Database.
Here: (https://cloud.google.com/sql/docs/postgres/replication/create-replica) and here (https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_ReadRepl.html)
Currently, Strapi only supports specifying a single DB endpoint that is used for all operations.
This request is to add support for separate endpoints
for write operations and one or many endpoints (could be round-robin balanced under the hood) for read-only operations.C
Christian Probst
We are using CloudNativePG Operator to run our Postgres Database on k8s. It deployes a primary and n standby Pods. One Feature is a read-only DB k8s-Service for round-robin usage of all Instances. Unfortunately STRAPI writes data to strapi_core_store_settings at Startup, which is not possible through the read-only Service. So +1 for this feature request.
Niklas Funke
In case of mysql you can use proxySQL (https://github.com/sysown/proxysql) or something similar to achieve read/write splitting. So no need for a build-in solution.
S
Samuel Hodges
This would be a super handy feature for projects of scale