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

value for bootstrap_expect - autoscaling #120

Closed
discointheair opened this issue Sep 18, 2017 · 4 comments
Closed

value for bootstrap_expect - autoscaling #120

discointheair opened this issue Sep 18, 2017 · 4 comments

Comments

@discointheair
Copy link

Hi

ATM the config looks like this:
"bootstrap_expect": {{ _consul_lan_servers | length }},

I think there is no need to set this value to the current number of server instances.
In some time I will try to implement autoscaling for the servers and so i need a fix value for the bootstramp (3 or 5) that will not be changed if new server instances will be added or removed - at least I think so.
There is no benefit to set "bootstrap_expect": "6" when the only usefull values are 5 (or 3).

Could you implement a integer key which overides bootstrap_expect if it is set?
Something like that:
"bootstrap_expect": {{ consul_static_bootstramp | default(_consul_lan_servers | length) }},

Maybe I am wrong and this role will only be used to deploy the first "core" of servers and scaling servers have to be deployed with a customized role.
Is some one of you using auto or manuel scaling of an existing consul server environment (up and down scaling)?

@groggemans
Copy link

groggemans commented Sep 20, 2017

Not making a difference between even and odd numbers of servers makes to code less complex. But it's true that having an even number of servers has no benefit at all (it's even worse, cause you'll have an increased risk on failures)

Your use case might be out of scope for this role, but if not too complex, it would be nice to support it.

Not entirely sure, but normally, the bootstrap_expect parameter is only used when initially bootstrapping the cluster. Once the cluster is bootstrapped, you can auto scale without the need to update the value. It just makes sure nodes don't start bootstrapping too early, once the system is running, the raft subsystem keeps a list of servers, and should be able to elect a leader in case of a network separation/failure.

But you should run some tests (especially if your going to use this in production).

@discointheair
Copy link
Author

Thank you. I will report my experiences here, when I work on auto scaling. But that can take a few months.

@groggemans
Copy link

@discointheair Can we close this issue?

@discointheair
Copy link
Author

@groggemans
Yes please close it. ATM I have no time to think about auto scaling.

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