3 ms·
No bashing against etcd from me, but can you point me to a reason why a regular database wouldn't work for this type of thing? High availability, throughput an
by uniclaude 13y ago
No bashing against etcd from me, but can you point me to a reason why a regular database wouldn't work for this type of thing?
High availability, throughput and data storage seem to fit into what a database is made for.
- nl 13y agoThe HTTP based interface[1] is designed specifically for configuration data and is easily callable from shell scripts as well as form programs. Something like CouchDB is roughly comparable in that sense, but that has pretty different design goals. [1] https://github.com/coreos/etcd/blob/master/Documentation/api.md https://github.com/coreos/etcd/blob/master/Documentation/api...
- vidarh 13y agoYou'd think so, but most RDBMS's are a lot of work to set up in a way that provides the kind of consistency guarantees and availability that a configuration store like this does. E.g. take Postgres. You can't connect to the slaves and write, so your client will need to know how to identify which server is currently the master. And if the master fails, you need to implement a leadership election method, promote the chosen slave, and resync your other slaves from the new master. Before you know it you've reimplemented the configuration store with a different data storage mechanism. There's very little intersection between the typical RDBMS and a configuration store like this.
- uniclaude 13y agoWell, even with your point there are a couple reasons why I could imagine databases making sense here. One is that you might already have people used to deal with them in a highly available manner in your team. HA with Postgres is not exactly an area of research anymore. Most people already using Postgres in their stack know about tools like pgbouncer. Another one is that there are other databases, like Riak, that can talk http and have those problems solved. I am here more trying to understand the features that would make one pick etcd over an higly available database. Thanks for taking the time to explain.
- nl 13y agoThey solve different problems. In CAP theorem[1] terms, etcd provides Consistency and Partition-Tolerance, while databases generally provide Consistency and Availability. That's important, because it shows the kind of problem each is trying to solve. [1] http://en.wikipedia.org/wiki/CAP_theorem http://en.wikipedia.org/wiki/CAP_theorem
- uniclaude 13y agoGreat, that's exactly the answer I was looking for. Now everything makes sense.