Skip to content

Runtime boundary

Why etcd, S3 and Redis keep separate gateways instead of one shared runtime.
Note

Condensed from Design 0004 (accepted 2026-10-08).

Decision

Within Mimus, pgetcd implements the etcd v3 gRPC gateway and pg_etcd C extension, alongside pgsilo / pgs3 for S3 object storage and pgredis for Redis. Although an earlier parent plan (“WOK”) considered combining the Go gateways for etcd, S3, and Redis into a single multi-protocol Go daemon, Design 0004 keeps the current pgetcd binary, module name, pg_etcd extension, and internal pg_kvcore boundary separate until shared runtime integration is explicitly designed and verified.

Why gateways stay separate

Each protocol gateway has distinct network framing, concurrency patterns, and PostgreSQL failure semantics:

  • etcd (pgetcd) requires HTTP/2 gRPC with tenant mTLS, per-request etcd.meta serialization, read certification barriers, synchronous COMMIT before response publication, and a preloaded C background worker for Lease expiration.
  • S3 (pgsilo) streams large binary object payloads over HTTP/1.1 with SigV4 authentication and chunked transfer encoding.
  • Redis (pgredis) serves RESP2/RESP3 commands over persistent TCP connections with pub/sub and blocking list semantics.

Merging these listeners into one process without unified admission control would allow a memory spike or slow stream in one protocol to starve Lease keepalives or Watch delivery in pgetcd.

Requirements for future integration

Before any shared gateway runtime or cross-protocol extension layer is adopted, it must define and test:

  • Process lifecycle, configuration reload, and per-protocol memory/connection admission limits.
  • Tenant isolation and credential mapping across protocols.
  • Explicit rules for whether protocols share a database, schema, or transaction boundary.

In the current architecture, each protocol installs its own schema and keeps its acceptance and release regression evidence independent. Passing an etcd regression suite does not certify another protocol or cross-protocol table access. See Architecture and Status.

Scan to open this page
https://mimus.pgsty.com/docs/etcd/design/runtime-boundary/