15

Etcd, or, why modern software makes me sad

 3 years ago
source link: https://www.roguelazer.com/2020/07/etcd-or-why-modern-software-makes-me-sad/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

QnqU3eR.png!web

Once upon a time in 2013, there was a tool called etcd which was a really lightweight database written around the Raft consensus algorithm. This tool was originally written in 2013 for a

bullshit unsuccessful project called CoreOS Container Linux

that was EOL'd several years ago, but that doesn't really matter — etcd was greater than its original use-case. Etcd provided a convenient and simple set of primitives (set a key, get a key, set-only-if-unchanged, watch-for-changes) with a drop-dead simple HTTP API on top of them. I have built a number of tools using etcd as a lightweight consensus store behind them and it's absolutely a pleasure to work with.

In 2015, an unrelated tool called Kubernetes was released by Google (but, really, by Xooglers). I would go so far as to say that Kubernetes (or, as the "cool kids" say, k8s ) is the worst thing to happen to system administration sincesystemd. It's a comprehensive suite that promises to simplify operating clusters of software and give something like the experience of Google's borg cluster manager. What it really does is:

  1. Add hundreds of new failure modes to your software
  2. Move you from writing portable software configuration to writing thousands of lines of k8s-specific YAML
  3. Ensnare you in a mesh of questionably-goodpatterns like containerization and software defined networking

If you are running a truly enormous system and want to have off-the-shelf orchestration for it, Kubernetes may be the tool for you. For 99.9% of people out there, it's just an extra layer of complexity that adds almost nothing of value.

I digress, though; this is a story about etcd. And, unfortunately, our stories come together because Kubernetes was quickly changed to use etcd as its state store. Thus began the rapid decline of etcd.

With the massive influx of Kubernetes users came, of course, a large number of Xooglers who decided to infect etcd with Google technologies, as is their way. Etcd's simple HTTP API was replaced by a "gRPC"version; the simple internal data model was replaced by a dense and non-orthogonal data model with different types for leases, locks, transactions, and plain-old-keys. etcd 3.2 added back a tiny subset of the HTTP API through the "gRPC Gateway" , but not enough to implement any of the rich applications built on top of the original API. The v2 API lives on for now, but upstream threatens to remove it in every new version and there will surely come a time when it'll be removed entirely.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK