[
https://issues.apache.org/jira/browse/IOTDB-814?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tan xinyu reassigned IOTDB-814:
-------------------------------
Assignee: Tan xinyu
> Cache and redirect distributed IoTDB's leader for write requests in IoTDB's
> client
> ----------------------------------------------------------------------------------
>
> Key: IOTDB-814
> URL: https://issues.apache.org/jira/browse/IOTDB-814
> Project: Apache IoTDB
> Issue Type: Improvement
> Components: Core/Cluster
> Reporter: Tan xinyu
> Assignee: Tan xinyu
> Priority: Minor
> Labels: pull-request-available
>
> 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.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)