Uploaded image for project: 'Apache IoTDB'
  1. Apache IoTDB
  2. IOTDB-814

[Distributed] Cache and redirect distributed IoTDB's leader for write requests in IoTDB's client

Log workAgile BoardRank to TopRank to BottomAttach filesAttach ScreenshotBulk Copy AttachmentsBulk Move AttachmentsVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Done
    • None
    • None
    • Core/Cluster

    Description

      For raft based data management systems, the client typically supports the ability for caching leaders to redirect. This eliminates the need to consume internal resources and additional Round-Trip time to forward these requests within the cluster.

      For a write request, the coordinator can handle this request without any RPCs besides a raft broadcast if it finds that the data group's leader corresponding to the data is itself, otherwise, it can make a request to get the leader address of the data group and return the result to the client instead of forwarding it. The client then caches this new leader to re-establish the session, and subsequent requests can be sent directly to the correct node.

      For cluster, we should change the forwarding logic to a return-new-leader-address logic for write requests if we finds that the data group's leader corresponding to the data isn't coordinator.

      For client, we should wrap these change such as caching leader address in session and jdbc rather than exposing to the user to implement.

      To some extent, this issue wants to reduce the resource consumption within the cluster and the delay of single request.

      Any problems can be discussed below.

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            LebronAl Tan xinyu Assign to me
            LebronAl Tan xinyu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment