Rationale
Lease backs split-brain resolution (LeaseMajority), singleton handover and shard-coordination safety — but only InMemory and Kubernetes implementations exist. Deployments outside K8s (bare VMs, Docker Compose, Nomad) currently have no production lease.
Scope
- New
Lease implementations with fencing tokens, following the KubernetesLease contract:
- etcd (v3 HTTP/JSON gateway) — SDK-free via the built-in HttpClient,
- Consul (sessions + KV acquire) — SDK-free via HttpClient,
- Redis (SET NX PX + Lua renew) — via the existing optional
ioredis peer; document the weaker guarantees (single-instance Redis, no Redlock claims),
- Postgres advisory locks — via the existing optional
pg peer.
- HOCON selection under
actor-ts.coordination.lease:
actor-ts.coordination.lease {
backend = "etcd" # in-memory | kubernetes | etcd | consul | redis | postgres
etcd { endpoints = ["http://etcd:2379"] }
}
- Per-backend caveats documented (failure modes, clock assumptions, fencing semantics).
Documentation
Coordination docs: backend matrix + per-backend page (EN + DE); config reference; CHANGELOG.
Acceptance
- Contract test suite (acquire/renew/release/steal/fencing monotonicity) green per backend (containerized); LeaseMajority e2e passes with the etcd backend.
Non-goals
Distributed semaphores/counters (separate concern); multi-key transactions.
Relates
#160 (ServiceDiscovery Consul/AWS — the discovery half), #51/LeaseMajority (shipped). Dependency policy #419 (etcd/Consul SDK-free). Improvement program M8.
Rationale
Leasebacks split-brain resolution (LeaseMajority), singleton handover and shard-coordination safety — but only InMemory and Kubernetes implementations exist. Deployments outside K8s (bare VMs, Docker Compose, Nomad) currently have no production lease.Scope
Leaseimplementations with fencing tokens, following the KubernetesLease contract:ioredispeer; document the weaker guarantees (single-instance Redis, no Redlock claims),pgpeer.actor-ts.coordination.lease:Documentation
Coordination docs: backend matrix + per-backend page (EN + DE); config reference; CHANGELOG.
Acceptance
Non-goals
Distributed semaphores/counters (separate concern); multi-key transactions.
Relates
#160 (ServiceDiscovery Consul/AWS — the discovery half), #51/LeaseMajority (shipped). Dependency policy #419 (etcd/Consul SDK-free). Improvement program M8.