Hi guys,I went over the bootstrap guide in the documentation, as well as some of the bootstrap-related discussions here, but still have a few questions I hope you can help with.1. You mention in the documentation that bootstrapping consul with a single node is not recommended and error-prone. How is bootstrap-expect=N different, and why is it better? The reason I'm asking is that in the old bootstrap flow, we could start using the key/value store even when only one node was up, before more nodes started joining the cluster. With the new flow, we basically have to wait for more nodes to join before being able to use the key/value store.
2. According to the documentation, once the N servers started consul with bootstrap-expect=N, one of them must run consul join with the IP addresses of all N nodes. Is there any way for the servers to discover each other and join? Alternatively - is it possible that each server will run "consul join" with an IP of only 1 other server? (i.e. if servers B and C both have A's IP address, can each of them run "consul join server_A"?).
3. If more than 3 nodes join consul with bootstrap-expect=3 and -server - what will be the behavior? Will we only have the first 3 as servers, or will all of them become servers?
On Thu, Apr 16, 2015 at 3:01 AM, Shimshon Zimmerman <shim...@stratoscale.com> wrote:Hi guys,I went over the bootstrap guide in the documentation, as well as some of the bootstrap-related discussions here, but still have a few questions I hope you can help with.1. You mention in the documentation that bootstrapping consul with a single node is not recommended and error-prone. How is bootstrap-expect=N different, and why is it better? The reason I'm asking is that in the old bootstrap flow, we could start using the key/value store even when only one node was up, before more nodes started joining the cluster. With the new flow, we basically have to wait for more nodes to join before being able to use the key/value store.It's recommended to configure at least 3 server nodes and bootstrap them before adding any non-server agents to the cluster. If you set bootstrap-expect to 3, then the cluster will bootstrap on its own. This is to ensure service availability in a real-world configuration where equipment fails from time to time.
2. According to the documentation, once the N servers started consul with bootstrap-expect=N, one of them must run consul join with the IP addresses of all N nodes. Is there any way for the servers to discover each other and join? Alternatively - is it possible that each server will run "consul join" with an IP of only 1 other server? (i.e. if servers B and C both have A's IP address, can each of them run "consul join server_A"?).I don't think the documentation says this, but it is incorrect if it does. Cluster membership information will propagate automatically, provided the server that is joined to is already a cluster member. An agent need not to specify all servers when joining; one is sufficient. However it is often good to list more than one in case one of them is unavailable.
3. If more than 3 nodes join consul with bootstrap-expect=3 and -server - what will be the behavior? Will we only have the first 3 as servers, or will all of them become servers?Only agents started with the '-server' argument will become servers. They don't promote themselves automatically.--Michael
It's recommended to configure at least 3 server nodes and bootstrap them before adding any non-server agents to the cluster. If you set bootstrap-expect to 3, then the cluster will bootstrap on its own. This is to ensure service availability in a real-world configuration where equipment fails from time to time.Why is this better than bootstrapping the cluster with one server, shortly thereafter joining 2-3 more servers to the bootstrapped server, and then joining more "regular" agents?
In that case - will the following flow work?- node A starts with -bootstrap-expect=3, -server- node B starts with -bootstrap-expect=3, -server, -join=<node A IP address>- node C starts with -bootstrap-expect=3, -server, -join=<node A IP address><cluster bootstraps at this point I guess...>- node D and all the rest of them start consul with -join=<node A IP address> (without -server, as they will be regular agents)
--
You received this message because you are subscribed to the Google Groups "Consul" group.
To unsubscribe from this group and stop receiving emails from it, send an email to consul-tool...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--