Free forever, no credit card.Get Started for Free →
← All posts
November 30, 2026 · 5 min read

Does etcd Remember Between Runs? Raft Keeps Every Value. Compaction Still Erases the Trail.

Does etcd Remember Between Runs? Raft Keeps Every Value. Compaction Still Erases the Trail. etcd remembers between runs by design, and it remembers harder than almost any other store in the stack. It is the distributed key-value store that holds the most critical coordination data a system has: configuration, service membership, leader identity, and the entire state of every Kubernetes cluster. Nothing about it is in-memory-only. Every write is agreed by a cluster, written to disk before it cou

Does etcd Remember Between Runs? Raft Keeps Every Value. Compaction Still Erases the Trail.

etcd remembers between runs by design, and it remembers harder than almost any other store in the stack. It is the distributed key-value store that holds the most critical coordination data a system has: configuration, service membership, leader identity, and the entire state of every Kubernetes cluster. Nothing about it is in-memory-only. Every write is agreed by a cluster, written to disk before it counts, and kept as part of a versioned history. The interesting question is not whether etcd remembers. It is what kind of memory it keeps, because etcd's history has an expiry mechanism built into normal operations, and one whole category of its keys is designed to delete itself.

Layer one: the WAL and the bbolt file survive everything

A write to etcd goes through Raft first. The leader appends the proposal to a write-ahead log on disk under member/wal/, replicates it to the other members, and the write commits once a majority has persisted it. Committed entries are then applied to the actual store: a single bbolt database file at member/snap/db, a B+tree that holds every key, plus membership and authorization data. Neither piece is a cache. Restart a member, replace the machine, restore from the data directory, and the values come back, because they were fsynced to disk before any client was told the write succeeded. Periodic snapshots let the WAL stay bounded (etcd keeps the last few snapshot and WAL files), and etcdctl snapshot save produces a complete, self-contained backup of the whole keyspace at a moment in time. As plain durability, this is close to the strongest answer any store gives.

Layer two: MVCC keeps every version, numbered

etcd does not overwrite. Its storage engine uses multi-version concurrency control: one global revision counter for the whole keyspace, incremented by every write or transaction. Updating a key creates a new version stamped with the new revision, and the old version stays readable. Each key carries its create_revision, its mod_revision, and a version count of how many times it has changed. A reader can ask for a key as of an older revision and get the value it held then. A watcher can open a stream starting at a past revision and receive every change since, in order. For an automation, this looks like a run journal written by the store itself: not just the current state, but the sequence of states that led to it, each one addressable.

Layer three: compaction deletes the trail on schedule

That history is not permanent, and it is not meant to be. Because every version of every key accumulates, the keyspace history must be compacted: compaction drops all information about keys superseded before a given revision. Ask for a revision older than the compaction point and etcd refuses with "required revision has been compacted." Compaction can run automatically, either on a time window (keep one hour of history, for example) or by revision count, and in Kubernetes the API server compacts roughly every five minutes up to a recent revision. Compaction frees logical space inside the database file; a separate defragmentation step is needed to actually shrink the file on disk. The practical result: the deeper past in etcd has a retention window measured in minutes or hours, not months. A run that wants to know why a value was set three weeks ago is asking for revisions that normal maintenance has already thrown away.

Layer four: leases are memory built to disappear

etcd also offers leases: a lease is granted with a time-to-live in seconds, keys attach to it, and the holder keeps it alive with a stream of keep-alive requests. Stop renewing and the lease expires, and every attached key is deleted, each one generating a delete event for watchers. Revoking a lease does the same thing immediately. This is exactly right for its purpose: ephemeral membership, leader election, locks that must not outlive a crashed holder. It is also a reminder of what etcd memory is for. The store is engineered around small, current, coordination-sized facts, with a default storage quota of 2 GiB and requests capped at 1.5 MiB by default. It is a place for the present state of a system, kept consistent at all costs, not a place for a growing record of everything an agent ever discussed or decided.

What etcd never holds: the reasoning

So the full answer has four parts. Values persist across restarts, replicated and durable. Versions persist too, until routine compaction erases them. Leased keys persist only while a client actively renews them. And the reasoning behind any of it (the conversation where an operator or an agent weighed options, rejected one, and chose the value that got written) is never in etcd at all. An automation can read the winning value at the current revision. It cannot read the deliberation, because a key-value store has no slot for it. Scheduled agents that store their checkpoints in etcd start each run with the last conclusion and none of the context that produced it.

That gap is the one Vilix AI is built to close. Vilix AI is a cloud-hosted memory layer for AI agents: zero infrastructure to run, no cluster to size, back up, or defragment. Every tool and agent connects to the same memory over MCP, so a scheduled workflow, a coding assistant, and a chat session all read and write one shared record instead of separate stores. It keeps the full conversation history, not just extracted facts or final values, so the reasoning behind a decision is still there when the next run goes looking for it. A run starts by reading what previous runs actually said and did, and ends by saving its own work into the same record.

The practical split is simple. Keep coordination state in etcd, where Raft, revisions, and leases are the right tools for small values that must agree everywhere. Keep agent memory in Vilix AI, where the full history is the point and nothing compacts it away. Vilix AI has a free plan that stays free forever, a 7-day Pro trial that needs no card, and export and delete controls available anytime, so the record an agent builds stays portable. etcd will keep remembering your cluster's state between runs, revision by revision. Give your agents a memory that keeps the rest of the story too.

Get Started for Free

Persistent memory across ChatGPT, Claude, and the AI tools you already use in Vilix AI.

Get Started for Free

Free forever, no credit card.

Keep reading
Does Softr Remember Between Runs?

Does Softr Remember Between Runs? No. A Softr workflow or scheduled agent remembers nothing from one run to the next on its own. Inside a single run, workflow variables carry data from step to step, and an app agent remembers details about a user during that conversation. Between runs, the only things that survive are what you wrote into a database record, and the run log Softr keeps for you to read. What does a Softr workflow remember inside one run? Quite a lot, while the run is alive. Var

Does Promtail Remember Between Runs? Its Positions File Resumes the Log. Nothing Resumes the Reasoning.

Does Promtail Remember Between Runs? Its Positions File Resumes the Log. Nothing Resumes the Reasoning. Promtail is the agent that ships local logs to Grafana Loki. It tails files, reads the systemd journal, discovers container logs, runs each line through pipeline stages, and pushes batches to Loki. It also restarts constantly in real deployments: config reloads, package upgrades, container recreations, host reboots. So the practical question matters. What does Promtail still know when it come

Markdown Files Are Everyone's Agent Memory Now. Here's Where They Break.

Markdown Files Are Everyone's Agent Memory Now. Here's Where They Break. Ask a room of people who run coding agents how their agent remembers anything between sessions, and you will hear the same answer in different fonts. A CLAUDE.md. A PLAN.md. A notes file in the repo. Somebody always says some version of: it's just markdown, it works, why would I pay for anything else. They are not wrong. That is exactly why the pattern won. A text file needs no account, no API key, no migration. It sits i