Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-147

Automatically routing of queries to non-master nodes (if slave_ok set)

    • Type: Icon: New Feature New Feature
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 2.2
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None

      Add support to control how operations are handled when slave_ok is used. Extend the connection to include two pools of ports; one for the master node and one for non-master nodes. Create a configuration option to allow using non-master nodes for non-write operations (queries basically).

      Maybe something like this:

      class QueryOptions {
      boolean masterOnly = true;
      String[] excludedReplicas = null;
      String[] includedReplicas = null;
      }

      By setting excluded/includedReplicas you can filter certain replicas in/out of the pools. By default the master will be only server used; this keeps compatibility with the existing driver.

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            scotthernandez Scott Hernandez (Inactive)
            Votes:
            10 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: