FusionAuth
    • Home
    • Categories
    • Recent
    • Popular
    • Pricing
    • Contact us
    • Docs
    • Login

    Configuring FusionAuth with Primary-Secondary Database Replication

    Scheduled Pinned Locked Moved Solved
    Q&A
    1
    2
    243
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      wesley
      last edited by

      Since master-master replication has proven unstable in our setup, we are exploring a primary-secondary replication approach, where:

      • Write requests are directed to a single primary node.
      • Read requests are distributed across multiple secondary nodes.

      From my understanding, this type of load balancing requires the client application to set a read-only flag for read-only requests.

      Questions:

      1. Does FusionAuth support the read-only flag for directing read operations to secondary nodes?
      2. If not, does FusionAuth offer any similar approach that could facilitate read/load distribution across a database cluster?
      W 1 Reply Last reply Reply Quote 0
      • W
        wesley @wesley
        last edited by

        FusionAuth does not support configuring a read-only database, as most database interactions involve writes, particularly from login events.

        For additional context on high-availability database configurations with FusionAuth, refer to this forum discussion:

        • Does FusionAuth Support High-Availability Database Configurations?

        If read replication is critical for your setup, you may need to handle database routing at the infrastructure level (e.g., using a proxy like Pgpool-II for PostgreSQL or ProxySQL for MySQL) rather than within FusionAuth itself.

        FusionAuth Cloud supports active/passive DR which is further outlined here. This may be helpful to you as you build out your high availability FusionAuth system.

        1 Reply Last reply Reply Quote 0
        • W wesley has marked this topic as solved on
        • First post
          Last post