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

Fix inactivity callback in clustered setup #35

Open
tailhook opened this issue Jul 4, 2017 · 2 comments
Open

Fix inactivity callback in clustered setup #35

tailhook opened this issue Jul 4, 2017 · 2 comments
Assignees
Milestone

Comments

@tailhook
Copy link
Collaborator

tailhook commented Jul 4, 2017

No description provided.

@tailhook tailhook added this to the v0.5.6 milestone Jul 4, 2017
@tailhook
Copy link
Collaborator Author

tailhook commented Jul 5, 2017

Well, I don't understand how 2dfe91a fixes the issue.

@tailhook tailhook reopened this Jul 5, 2017
@tailhook tailhook modified the milestones: v0.5.7, v0.6.1 Jul 21, 2017
@tailhook
Copy link
Collaborator Author

The proposed strategy is:

  1. Sync all inactivity timers across all the replicating nodes. Probably by grouping them in bulks with 100ms - 1s latency.
  2. Split session namespace into buckets using consistent hashing. Assign 1/nth share of sessions for every node
  3. Notify about inactivity callbacks sent using technique similar to (1)
  4. Assign buckets to the next servers with the delay, i.e.:
  • buckets of server2 to server1 with the delay of 10 seconds
  • buckets of server3 to server2 with the delay of 10 seconds
  • buckets of server3 to server1 with the delay of 20 seconds, and so on
  1. Cancel calling handler if other server reports it already sent

This means: if one of the servers fails or lags too much we will delay its messages by just 10 seconds, but all inactivity callbacks are sent anyway (though, in complex failure scenarios ones can be duplicated, that's fine). And also this doesn't introduce any complex failure detection and leader election algorithms.

@popravich ?

@tailhook tailhook modified the milestones: v0.6.3, v0.6.4 Aug 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants