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

    Does FusionAuth support high availability database configurations?

    Scheduled Pinned Locked Moved
    Q&A
    database availability faq
    2
    7
    6.8k
    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.
    • danD
      dan
      last edited by

      With a primary/secondary and replication, to ensure availability of the user identity management service?

      --
      FusionAuth - Auth for devs, built by devs.
      https://fusionauth.io

      1 Reply Last reply Reply Quote 0
      • danD
        dan
        last edited by

        Yes. We don't have any specific guidance around using MySQL and PostgreSQL in an high availability configuration. However, it should work. This document discusses the various possible architectures at a high level: https://fusionauth.io/docs/v1/tech/installation-guide/server-layout

        It is worth noting that MySQL group replication will not work. It requires a primary key on each table. We do not meet this requirement and have no plans to adjust the schema for this style of replication to work. Other types of replication that do not require a PK on every table should work.

        The particulars of DB clustering are outside of the scope of what we can assist with, however.

        --
        FusionAuth - Auth for devs, built by devs.
        https://fusionauth.io

        1 Reply Last reply Reply Quote 0
        • K
          kevin.mahoney
          last edited by

          @dan there's one important case not covered in those docs - a high-availability database configuration with a single write-instance and one (or many) read-instances (or replicas.)

          Does FusionAuth support this? Typically support means that read-only queries are routed to this read-replica by the application, in order to reduce querying load on the primary write instance.

          danD 1 Reply Last reply Reply Quote 0
          • danD
            dan @kevin.mahoney
            last edited by

            @kevin-mahoney

            Hi Kevin.

            FusionAuth does not support one read instances and many read replicas at this time.

            We've done some load testing and if you scale your database vertically enough, and have enough servers in front of it, FusionAuth can handle 2000 registrations/second. This is with one primary database and a standby for failover.

            Since most of the traffic to an auth server is login events, and most of the work of a login is a password hash, which is designed to be idempotent and slow enough to prevent credential stuffing, it would make sense that the typical weak link would be CPU power, not the database.

            This is in contrast this with a more typical web application, in which the database is probably the limiting factor.

            All that said, if you are interested in seeing FusionAuth have built in support for separating out reads and writes, feel free to open a github issue: https://github.com/fusionauth/fusionauth-issues/issues with more details.

            --
            FusionAuth - Auth for devs, built by devs.
            https://fusionauth.io

            K 1 Reply Last reply Reply Quote 0
            • K
              kevin.mahoney @dan
              last edited by

              @dan thanks for the response - yeah we are performing load testing currently and FusionAuth is performing excellently. For reference we've got it running containerized on 1 core of an amazon c6a.large instance, with about 1700mb memory, and getting 60 registrations per second, p50 response time of 65ms.

              danD 1 Reply Last reply Reply Quote 1
              • danD
                dan @kevin.mahoney
                last edited by

                @kevin-mahoney Awesome, thanks for sharing the numbers, that's great to hear!

                If I may ask, what is the p95 response time for that load test?

                --
                FusionAuth - Auth for devs, built by devs.
                https://fusionauth.io

                K 1 Reply Last reply Reply Quote 0
                • K
                  kevin.mahoney @dan
                  last edited by

                  @dan 160ms

                  1 Reply Last reply Reply Quote 0
                  • W wesley referenced this topic on
                  • First post
                    Last post