You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the client is constructed, a random node is selected as the node to access the data.
The fetch request is sent to the selected node, and the server node receives the request to process the get entry request.
Determine whether the node currently requested is the Leader, if the Leader uses the existing fetch logic directly
If it is Follower, the user checks whether the requested index is greater than or equal to endIndex. If the requested index is smaller than or equal to endIndex, the user obtains an Entry corresponding to the index from the node and returns it to the client
If the index is less than the endIndex, a request is sent to the Leader to obtain the endIndex of the Leader. The leader's endIndex is then compared to the index requested by the client
If the index is greater than the leader endIndex, the empty entry of the client is returned directly.
Index less than or equal to leader endIndex The current request waits for a certain period of time until the endIndex of the current node changes to greater than or equal to index, and then returns the corresponding Entry to the index to the client
If the wait times out, return the code waiting to update the endIndex timeout to the client. (If the follower data lags too much behind the Leader, synchronization may not be completed within the specified wait time.)
If the client receives the code to update the endIndex timeout, it directly goes to the Leader to obtain the data corresponding to the index.
we can get entry from leader and follower instead of from leader only. Optimize read performance and Realize the ability to read from the replica node
The text was updated successfully, but these errors were encountered:
mxsm
added a commit
to mxsm/dledger
that referenced
this issue
Jul 10, 2022
Overall structure as follows
Detail as follows
explain as follow
we can get entry from leader and follower instead of from leader only. Optimize read performance and Realize the ability to read from the replica node
The text was updated successfully, but these errors were encountered: