Skip to content

[PostgreSQL] Direct select and read-only operations to RO replicas #339

@Pivert

Description

@Pivert

Hi,

I'm running minetestserver on Kubernetes with CloudnativePG as PostgreSQL operator on 3 nodes with DAS.
This gives 3 DB ClusterIP services for the minetestdb:

  • minetestdb-r (for any node)
  • minetestdb-ro (for replias only)
  • minetestdb-rw (for the active RW node)

In world.mt, the pgsql_mapserver_connection is of course set to the rw Service:

pgsql_mapserver_connection = host=minetestdb-rw port=5432 user=minetest password=...

Would it be possible for mapserver to read an extra entry if exists such as:

pgsql_mapserver_connection_ro = host=minetestdb-ro port=5432 user=minetest password=...

to redirect all SELECT queries to the read-only nodes instead of loading the main DB used by the minetestserver ?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions