5 ms·
The discovery mechanism looks clumsy to me. There's no way we'd rely on a public discovery service, for example. If we're going to hardcode configuration infor
by vidarh 13y ago
The discovery mechanism looks clumsy to me.
There's no way we'd rely on a public discovery service, for example. If we're going to hardcode configuration information - such as the URL of a discovery service that may or may not be up or reachable, we might as well hardcode the addresses of a few peers.
And running a second etcd cluster to bring up the main one seems pointless. Either it's turtles all the way down, or you then need to hardcode config information for the second cluster, in which case it serves little purpose.
I'd rather have a mechanism where each peer takes a list of possible peers and tries to connect, with a method for deciding when there is quorum to elect an initial leader and start allowing writes (that's easy enough by introducing a config option to decide if a peer is "blessed" to be part of the initial leadership election, and how many blessed peers must be connected to have quorum - just needs to be enough to form a majority of blessed peers to prevent more than one subset from electing a leader before they manage to connect)
Am I missing something?
- nl 13y agoQuoting the post: In previous releases, a human had to pick a leader, pass a list of -peers to all of the followers and maintain that list going forward. Presumably that method is still there?
- robszumski 13y agoYep, you can still hardcode a list of peers via flag or config file. I think you can even use both a peer list and a discovery token at the same time.
- ballard 13y agoThis is why top-down, single-source of truth is mostly the best way for core infrastructure. No pun intended. It's important for some parts to not be infinitely reconfigurable or dynamic because it would create chaos and service dependency deadlock/DoS. Most people not running bare metal don't know the lessons of how and why things underneath are they way they are and the sensible limits what's possible. It's also more secure because if it's possible to dictate all of the service details, it's much easier to run a lean and locked-down infrastructure. CoreOS by itself looks great. More JEOS distros need to happen. Trying to bundle more unproven things just looks marketing led the product.
- nl 13y agoThis is why top-down, single-source of truth is mostly the best way for core infrastructure. What happens when your single source of truth goes down? etcd attempts to provide a source of truth by using the Raft[1] consensus algorithm to determine that "truth" in an environment when relying on merely one place is too risky. Th Raft and Paxos[2] (as used in Zookeeper & Google Chubby) algorithms give guarantees for consensus in an environment with unreliable hardware. That is better than a single source of truth where you get nothing when that source disappears. [1] http://raftconsensus.github.io/ http://raftconsensus.github.io/ [2] http://en.wikipedia.org/wiki/Paxos_(computer_science) http://en.wikipedia.org/wiki/Paxos_(computer_science)
- vidarh 13y ago> This is why top-down, single-source of truth is mostly the best way for core infrastructure. "Top-down, single-source of truth" needs to deal with failover for resilience in any serious setup. The entire point of consensus algorithms like Raft (and Zab, since you've mentioned ZooKeeper) is that they provide a method of providing a consistent source of truth that is resilient without the management overhead. It's explicitly because top-down solutions are a massive hassle to keep consistent and available in the face of stalled replication (OpenLDAP.... DNS based solutions...) or a failed master. > It's important for some parts to not be infinitely reconfigurable or dynamic because it would create chaos and service dependency deadlock/DoS. That is entirely irrelevant to the algorithm used to replicate the configuration information. > It's also more secure because if it's possible to dictate all of the service details, it's much easier to run a lean and locked-down infrastructure. Why exactly do you believe that it is not "possible to dictate all of the service details" while using Etcd? To me it's an entirely orthogonal issue.
- robszumski 13y agoKeep in mind that Google's Chubby paper describes a nested series of clusters. You basically have one global cluster that stores the location of the cluster running in each DC. If you're on the west coast and need to read info from the east coast, you can travel up the chain and back down again. At some point you have a single source of truth. This method is basically adding another feature to the global cluster, offering a bootstrapping mechanism for other regional clusters.
- garyrichardson 13y ago"Turtles all the way down" made my day. Brought me back to my highschool days of reading all of Hawking's books.