Open kevinvalk opened 1 month ago
That would be awesome @mdecimus as it would make it much much easier to implement replication multi read only replica is easy
The world is not ready for multi write replicas at all. And may never be. FoundationDB seems to be ready for this
Which feature or improvement would you like to request?
When deploying Postgres, Mariadb or Mysql clusters they are often deployed with a single leader instance that supports read & write queries and one or more follow instances that can be used for read-only queries.
Example from typical Zalando postgres deployment (credits: https://github.com/zalando/postgres-operator):![image](https://github.com/stalwartlabs/mail-server/assets/3524694/3a4061a5-5c19-45ea-8b48-001a75b38835)
It would be great if we can configure a second connection for read-only queries, something like this for postgres (full reuse of the normal configuration):
I can than imagine that the code is structured in such a way that the readonly connection object simply uses the main connection object if NO "readonly" configuration is provided. Else, it creates a second connection object for read-only queries. All read-only queries should always use this secondary read-only connection object. That way if this is not configured will use the same connection object else will use secondary read-only pool.
Is your feature request related to a problem?
No response
Code of Conduct