Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Topology refresh mechanisms #1394

Closed
SushmaReddyLoka opened this issue Aug 18, 2020 · 2 comments
Closed

Topology refresh mechanisms #1394

SushmaReddyLoka opened this issue Aug 18, 2020 · 2 comments
Labels
status: waiting-for-feedback We need additional information before we can continue

Comments

@SushmaReddyLoka
Copy link

In this issue @ #339 (comment) its mentioned that,

  1. Adaptive refreshing only works in the scope of the data/nodes a client accesses. If you never experience a disconnect or a redirection, the client is not able to discover a change. That's ok for slot changes but in a case of a master/slave failover, that happens before the client opens a connection, there's currently no chance to discover that. I think lettuce could improve here by checking the cluster node role after connecting.
    Can you please elaborate on, failover case you are mentioning. Why lettuce has to determine role after connecting ?

  2. Periodic refresh is a generic attempt to catch 'em all. It comes at the cost of scheduling and cluster utilization. The connection is established in a blocking fashion (again something lettuce could improve). Refreshing in a large cluster (say 200 nodes) previously opened up to 200 additional connections. Refreshing is now configurable to open only connections to the initially specified seed nodes. Because of the scheduling nature, it's not possible to obtain changes in real time, but they are seen always delayed – by the scheduling intervals.

  • Can you please elaborate on cluster utilization, why does cluster utilization comes into picture.
  • The connection is established in a blocking fashion (again something lettuce could improve).
    What does blocking mean here. are commands on the client blocked ?
    As you said there is a scope of improvement, was it done, if yes , is it available n 5.3.0 version.
@SushmaReddyLoka SushmaReddyLoka changed the title Questions on topology refresh mechanisms Topology refresh mechanisms Aug 18, 2020
@mp911de
Copy link
Collaborator

mp911de commented Sep 4, 2020

checking the cluster node role after connecting.

This is only a momentarily check that doesn't cover changes when the connection is already connected.

established in a blocking fashion

That's already changed.

again something lettuce could improve

Happy to review a pull request.

The connection is established in a blocking fashion (again something lettuce could improve).
What does blocking mean here. are commands on the client blocked ?

This means that a worker thread is blocked for the entire duration of a topology refresh run. This means, that other work (such as processing command timeouts) gets delayed until the topology refresh has completed. Lettuce 6 uses non-blocking refresh which improves on efficiency and removes the delay.

Let me know if this helps.

@mp911de mp911de added the status: waiting-for-feedback We need additional information before we can continue label Sep 4, 2020
@mp911de
Copy link
Collaborator

mp911de commented Sep 10, 2020

Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.

@mp911de mp911de closed this as completed Sep 10, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: waiting-for-feedback We need additional information before we can continue
Projects
None yet
Development

No branches or pull requests

2 participants