Uploaded image for project: 'ZooKeeper'
  1. ZooKeeper
  2. ZOOKEEPER-1788

Support clientID field on connection requests

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • None
    • None

    Description

      I suspect it's very common for deployments to have a wide variety of client libraries (different versions/languages) connecting to a given cluster.

      It would be handy to have a way to identify clients via a clientID (akin to HTTP's User-Agent header). This could be implemented in ZooKeeperServer#processConnectRequest [1] and be fully backwards compatible.

      The clientID could then be kept with the corresponding ServerCnxn instance and be used for better logging (or stats expose through 4-letter commands).

      The corresponding client side change would be to expose API to set the clientID on each connection handler (and by default it could be something like "zk java $version", "zk c $version", etc).

      Thoughts?

      [1] https://github.com/apache/zookeeper/blob/trunk/src/java/main/org/apache/zookeeper/server/ZooKeeperServer.java#L797

      Attachments

        Activity

          People

            Unassigned Unassigned
            rgs Raúl Gutiérrez Segalés
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: