Uploaded image for project: 'MariaDB Connector/node.js'
  1. MariaDB Connector/node.js
  2. CONJS-169

Support failover and/or high-availability/load-balancing from Node.JS connector

Details

    • New Feature
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Incomplete
    • None
    • N/A
    • configuration
    • None

    Description

      Due to recent changes in MaxScale v2.5, the connector must provide failover functionality rather than Keepalived/F5/etc. See rationale for why MXS-3591 was refused.

      Until a customer can specify multiple endpoints for a connection via Connector/node.js, there is no supported mechanism for customers to leverage Cooperative Monitoring while using Connector/node.js.

      Note that Connector/J provides a robust feature set which could make sense to copy or draw inspiration from-
      https://mariadb.com/kb/en/failover-and-high-availability-with-mariadb-connector-j/

      Attachments

        Issue Links

          Activity

            diego dupin Diego Dupin added a comment -

            There is already some multiple host functionality: see https://github.com/mariadb-corporation/mariadb-connector-nodejs/blob/master/documentation/promise-api.md#pool-cluster-api

            example :

            const mariadb = require('mariadb');
            const cluster = mariadb.createPoolCluster();
            cluster.add("maxscale1", { host: 'MXS1', user: 'myUser', connectionLimit: 5 });
            cluster.add("maxscale2", { host: 'MXS2', user: 'myUser', connectionLimit: 5 });
             
            const conn = await cluster.getConnection("*");
            const res = await conn.query('SELECT * FROM myTable');
            conn.release();
            

            This permit to use multiple maxscales, using the actives ones. Do you thing there is something else missing ?

            diego dupin Diego Dupin added a comment - There is already some multiple host functionality: see https://github.com/mariadb-corporation/mariadb-connector-nodejs/blob/master/documentation/promise-api.md#pool-cluster-api example : const mariadb = require( 'mariadb' ); const cluster = mariadb.createPoolCluster(); cluster.add( "maxscale1" , { host: 'MXS1' , user: 'myUser' , connectionLimit: 5 }); cluster.add( "maxscale2" , { host: 'MXS2' , user: 'myUser' , connectionLimit: 5 });   const conn = await cluster.getConnection( "*" ); const res = await conn.query( 'SELECT * FROM myTable' ); conn.release(); This permit to use multiple maxscales, using the actives ones. Do you thing there is something else missing ?

            I am very sorry, I missed this on first check. This looks great and should work very well! Thank you very much!

            rob.schwyzer@mariadb.com Rob Schwyzer (Inactive) added a comment - I am very sorry, I missed this on first check. This looks great and should work very well! Thank you very much!
            diego dupin Diego Dupin added a comment -

            rob.schwyzer@mariadb.com closing it now, please create a new task / reopen this if thinking there is still something missing

            diego dupin Diego Dupin added a comment - rob.schwyzer@mariadb.com closing it now, please create a new task / reopen this if thinking there is still something missing

            People

              diego dupin Diego Dupin
              rob.schwyzer@mariadb.com Rob Schwyzer (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.