-
Notifications
You must be signed in to change notification settings - Fork 1
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
Auto-drain #6
base: master
Are you sure you want to change the base?
Auto-drain #6
Conversation
* master: fix drain test do not check tempfile on head fix docker setup fix fid path parsing add rabbitmq addon check tempfile on patch
@BatuAksoy made some changes after your review. @muraty PR is ready now. |
func (s *Server) autoDrain() { | ||
defer close(s.autoDrainStopped) | ||
|
||
// Drainer is written for "efes drain" command but can be reused here because we need same functionality here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we won't need this comment anymore.
@@ -204,34 +202,6 @@ func main() { | |||
return nil | |||
}, | |||
}, | |||
{ | |||
Name: "drain", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we delete this, we won't need Run
function of Drainer
struct anymore, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except drain_test.go
file.
// Auto-drain period is a window that only certain number of servers are allowed to run auto-drain operations. | ||
// When the period advances to the next one, servers currently running auto-drain will stop and some other | ||
// servers are going to run auto-drain. | ||
AutoDrainRunPeriod Duration `toml:"auto_drain_run_period"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@cenkalti how to find appropriate value for this config?
Let's say;
- We have 100 servers
- 50 of them exceeds
AutoDrainThreshold
AutoDrainDeviceRatio
is set to10
In this case, if we set AutoDrainRunPeriod
as 1 hour
, 5
servers will be drained every 1 hour. So, auto-drain will be finished in 10 hours for 50
servers. Is the calculation correct?
If there is small difference for the servers those exceeds AutoDrainThreshold
and those don't, 1 hour might be a high value. Maybe we should use less than that? Or should we find appropriate AutoDrainRunPeriod
config with run & monitor method?
No description provided.