Live data from Hacker News

Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

coreos.com

11–20 of 50 posts

Re: Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

#11
Discovery looks interesting. Can it be used for a client to discover a cluster?

I've been digging into Docker link containers a bit.

I'm not entirely comfortable with how they work,and I'm not really sure why. The only thing I can put my finger on is that I feel like discovery is a separate concern to deployment. But at the same time they are so closely linked o can understand why Docker needs to tackle it.

Is there a way etcd can work better with Docker links? Maybe it could automatically read/write Docker published ENV variables or something? Though I don't think that will quite work across physical machines without some additional work.

Re: Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

#12
post #4

I can't figure out what etcd is. Any help?

It can mean different things to different people. I will try to explain how I came to understand how etcd could be valuable for me, which may not be indicative of anyone else's use.

We have lots of configuration automation tools: Chef, Puppet, Ansible, SaltStack, etc. These tools make it easier to orchestrate the modification of configuration files on a node. That is well and good.

However, what is my "source of truth" for how things should be configured? Does the fact that node593958.my.co is my primary database server for app foo belong inside Chef, or another tool, or is it more suited for a "directory" of sorts?

No one can answer that but you. But, if you decide that it shouldn't be embedded in your configuration orchestration tool, you may decide to put it in a key value store like etcd. etcd could expose (via REST), something like:

.../apps/foo/primary_db = node593958.my.co

Configuration management could then key off of that source of truth to configure the application appropriately.

etcd exposes an easy to use REST interface to arbitrary storage of hierarchical keys and values.

Nothing is new under the sun. During the first five minutes I was playing around with etcd, I realized I was effectively reinventing LDAP. This is neither wrong nor right, it's simply a different tool for the job. If you like REST and simple interfaces, it's probably a good tool.

Re: Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

#13
post #11

Discovery looks interesting. Can it be used for a client to discover a cluster? I've been digging into Docker link containers a bit. I'm not entirely comfortable with how they work,and I'm not really sure why. The only thing I can put my finger on is that I feel like discovery is a separate concern to deployment. But at the same time they are so closely linked o can understand why Docker needs to tackle it. Is there…

> Discovery looks interesting. Can it be used for a client to discover a cluster?

It certainly could be extended for that. We haven't done anything with discovery to help with that process yet though.

> Is there a way etcd can work better with Docker links?

There is a lot of room to explore here. Including:

- Automatically registering exposed ports from running containers into etcd for service discovery.

- Using information in etcd to manage a smart proxy that would proxy requests. This would be the "Link via an Ambassador" but etcd would help coordinate.

Both of these would be good things to build and see how they work and feel in practice.

There are also some interesting alternatives to doing the links thing such as using some network namespace tricks to avoid passing metadata around via environment variables and simply expose services directly into a container: https://coreos.com/blog/Jumpers-and-the-software-defined-loc...

Re: Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

#14
post #9

I'm curious to know more about the garbage collection of stale peers. - AFAIK, etcd is built on RAFT, which relies on a 'joint majority' method of transitioning cluster membership. Are there any issues forming agreement on what the new membership should be when it's unclear what nodes are still supposed to be part of the cluster? - In the land of ZooKeeper, cluster configurations are typically very very stable, so tr…

etcd isn't designed for significantly dynamic environments but we certainly want to make it easy for people to add and remove machines at runtime. We have basic support for runtime cluster configuration but are building out a more complete API. The current proposal that is being built can be found over here: http://thread.gmane.org/gmane.comp.distributed.etcd/168

As you point out there is no magic garbage collection of stale peers. You have to explicitly delete nodes that you don't expect to be participating any longer.

Re: Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

#15
post #7
post #6

Earlier quoted context omitted.

It is a distributed configuration management clustering product like zookeeper. It simplifies the creation and sharing of mostly configuration data in clustered or distributed systems.

I don't know what that means or what zookeeper is... Can you explain the problem it solves?

Your web app needs to know what IP address, username and password to connect to the database on.

If it's all one the same box, that's trivial.

But imagine you have several app serves, and several other systems that all needs to talk to the database. Then one day you need to change details of the database server. Now you can either use a tool to update all the configurations (or do it by hand), or you can have all of these apps pull the database config from a distributed directory of some sort.

Etcd is such a directory. Similar to LDAP, but simpler (LDAP requires you to write schemas, and decide which attributes to index on and in set up replication hierarchies). Some people also use DNS for this (you can put arbitrary data in a private DNS server).

Re: Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

#17
post #5
post #4

I can't figure out what etcd is. Any help?

"A highly-available key value store for shared configuration and service discovery. etcd is inspired by zookeeper and doozer..." -- https://github.com/coreos/etcd

Except that it's not. Zookeeper was a major pain to get where it is.

Re: Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

#18
post #7
post #6

Earlier quoted context omitted.

It is a distributed configuration management clustering product like zookeeper. It simplifies the creation and sharing of mostly configuration data in clustered or distributed systems.

I don't know what that means or what zookeeper is... Can you explain the problem it solves?

Zookeeper is a very specialized distributed filesystem for saving and delivering important details for very large systems. Getting concurrent distributed systems like this right is the equivalent of summited Mount Everest starting by walking from Paris. It was mostly developed at Yahoo and spun off as an Apache project under Hadoop and commercialized by Cloudera. Netflix uses ZK for example.

Re: Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

#19
post #17
post #5

Earlier quoted context omitted.

"A highly-available key value store for shared configuration and service discovery. etcd is inspired by zookeeper and doozer..." -- https://github.com/coreos/etcd

Except that it's not. Zookeeper was a major pain to get where it is.

[deleted]

Re: Etcd 0.3.0 – Improved Cluster Discovery, API Enhancements and Windows Support

#20
post #16

This is a pure marketing story pushing a bad solution. Hiera, a simple hierarchal property distribution system using a backend of Zookeeper plus puppet or chef is far superior. Etcd is the PHP of configuration management.

Wow. I know neither etcd or Hiera. But please provide some arguments against etcd if you think it is bad, rather than just bashing it.

It would be interesting to know the cons and pros of both solutions.

Post reply on HN