Repository navigation
chore(registry)!: drop AWS Cloud Map backend support - #150
Merged
Merged
Conversation
Cloud Map is measurably the worst registry backend for the mesh and nothing consumes its DNS/service-discovery integration. Identical svc-roll e2e on talos-main (2026-06-11): cloudmap 164 failed requests (145 of them a 6s 503 burst at last-old-pod exit) vs dynamodb 0 and etcd 4. The burst is structural: Cloud Map has no watch API and its convergence chain stacks write-behind landing latency (2-32s measured), AWS-side eventual consistency, a 10s client cache TTL (throttling defense), and the 5s sync poll — so a lagging registrar replica can see new pods as UNHEALTHY after the old pods are gone. talos-main now runs the dynamodb backend (validated by the full e2e suite: 5min steady-state 0 drops, proxy hot-restart roll 0, svc rolls 6-7 connection blips, zero 503s). Removes: registry/internal/cloudmap + public wrapper, the registrar cloudmap case and --cloudmap-namespace flag, chart values, the integration-cloudmap workflow, DefaultCloudMapNamespace constants, the aws servicediscovery SDK dependency, and doc references. BREAKING CHANGE: --registry-backend=cloudmap is no longer accepted; supported backends are kubernetes, dynamodb, etcd. Co-Authored-By: Claude Opus 4.8 <[email protected]>
bpalermo
added a commit
that referenced
this pull request
Jun 11, 2026
…drop stale comments (#151) - The dynamodb backend no longer hardcodes us-east-1: region resolves via the standard AWS chain (AWS_REGION env — which the chart already exports from aws.region — shared config, IMDS), falling back to us-east-1 so bare runs keep the historical default. The values.yaml note claiming the binary forces us-east-1 is updated accordingly. - Remove leftover Cloud Map references from the ReadyWaiter doc comment and three backend-parity test comments (#150 follow-up). Co-authored-by: Claude Opus 4.8 <[email protected]>
bpalermo
added a commit
that referenced
this pull request
Jun 13, 2026
…175) * docs: registry backend evolution — Kubernetes → Cloud Map → DynamoDB → etcd Watch Decision-rationale record for how the registry backend got to etcd watch-driven sync. Frames every backend choice as a propagation-channel decision against the recurring cross-replica last-old-exit skew: Cloud Map dropped (#150) for the async-register health race (lost control of state transitions); DynamoDB chosen for managed/multi-region durability but its Streams CDC can't close the skew (2-reader cap, gated on write-behind); etcd native Watch closes it. Covers why agents stay behind the registrar (apiserver analogy), the multi-cluster tiering / decision axis, and the three-way e2e (DDB-poll 3 / etcd-poll 1 / etcd-watch 0 drops). Co-Authored-By: Claude Opus 4.8 <[email protected]> * docs: multi-region = etcd via per-region clusters + async replication Update the backend decision doc per directive: keep etcd for multi-region (don't adopt DynamoDB solely for global tables). Per-region etcd + async origin-partitioned cross-region replication, eventual consistency accepted — which dissolves the region-locality/blast-radius/CP-partition objections to a single shared etcd. Documents the prerequisite key-schema change (cluster in the key), the etcd<->etcd replicator (region-local registrar, lease-managed foreign keys for no-unilateral-GC self-heal), and scopes it as proposal 006. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]>
This was referenced Sep 12, 2026
bpalermo
added a commit
that referenced
this pull request
Sep 12, 2026
The dynamodb backend only ever implemented the base registry.Registry interface. Everything the registrar gained since June is etcd-only: watch-driven sync (ChangeNotifier, #174), the cross-cluster config plane (ConfigExporter/ConfigImporter, proposal 026), ServiceExporter, and the multi-region mirror (proposal 006). On DynamoDB the registrar fell back to the 5 s poll and config propagation did not work at all. The 2026-06-13 directive already ruled out global tables for multi-region, talos-main has been on etcd since rev 47, and the chart default is the zero-infra kubernetes backend. Supported backends are now kubernetes and etcd — the same shape as the Cloud Map removal (#150). Backend + Go code - Delete registry/internal/ddb/ (dynamodb.go, dynamodb_test.go, BUILD.bazel). - registry/backend/backend.go: drop the dynamodb case and the AWS config loading; error text is now "supported: kubernetes, etcd". ctx is unused by the two remaining constructors, so the parameter is kept but blanked. - registrar/internal/cmd: flag help + comments -> "kubernetes or etcd"; config_test's round-trip case switches to etcd. - common/constants: remove DefaultDynamoDBServiceTableName. registry.go held only the package doc afterwards, so it is renamed to doc.go. - Comment-only rewording: registry/registry.go, registry/registrytest, registry/registrarclient, registrar/internal/server/{server,sync}.go, agent/internal/cmd/root.go. Codegen - api/aether/registry/v1/service.proto: drop the proto/dynamo/v1 import and the (dynamo.v1.msg).key option. Edition stays 2023 (gRPC still caps there; never lower an edition). - api/aether/registry/v1/BUILD.bazel: drop the protoc-gen-dynamo proto dep and //bazel/go:go_dynamo from compilers. - Delete bazel/go:go_dynamo, the two root gazelle:resolve directives for proto/dynamo/v1, the go_dynamo entry in gazelle:go_proto_compilers, and the .pb.dynamo.go exclusion in bazel/lint/gocognit.bzl. - The api/aether/{agent,config}/v1 BUILD comments explaining why those packages avoid go_dynamo are moot; the per-package gazelle:go_proto_compilers directives they carried are now the root default, so both go with them. Dependencies - Removed direct: aws-sdk-go-v2, /config, /credentials, /feature/dynamodb/attributevalue, /service/dynamodb, pquerna/protoc-gen-dynamo, testcontainers-go/modules/dynamodb. - Removed indirect: aws-sdk-go-v2/{feature/ec2/imds, internal/configsources, internal/endpoints/v2, internal/ini, internal/v4a, service/dynamodbstreams, service/internal/accept-encoding, service/internal/endpoint-discovery, service/internal/presigned-url, service/signin, service/sso, service/ssooidc, service/sts}, aws/smithy-go, dave/jennifer, lyft/protoc-gen-star/v2 — and with it the pquerna protoc-gen-star fork replace directive. - klauspost/compress is KEPT (moby/go-archive needs it) but demoted to indirect. The Masterminds/sprig chain (semver, sprig, aokoli/goutils, huandu/xstrings, imdario/mergo) is KEPT: pseudomuto/protoc-gen-doc, the website API-doc generator, needs it. - bazel mod tidy dropped 8 use_repo(go_deps, ...) entries: the five AWS repos, com_github_klauspost_compress, com_github_pquerna_protoc_gen_dynamo, com_github_testcontainers_testcontainers_go_modules_dynamodb. - go.mod 251 -> 209 lines. go.sum is unchanged: pruning it needs `go mod tidy`, which is forbidden here and would additionally strip the repo's Bazel-only direct requires (protoc-gen-doc, protokit). The stale entries are inert. - The cel.dev/expr gazelle_override is unrelated (cel-go#1184) and stays. Chart (0.92.14 -> 0.92.16) - values.yaml: backend enum comment -> "kubernetes, etcd"; delete the registrar.aws block; reword the agent's AWS-credentials note. - registrar-serviceaccount.yaml: drop the IRSA eks.amazonaws.com/role-arn annotation block. - registrar-deployment.yaml: drop the AWS_REGION env block. Docs - docs/registry-backend-evolution.md: status line now lists kubernetes + etcd, section 3 is marked dropped, and a new dated section 5 records the removal and its rationale in the style of the Cloud Map entry. - docs/{runbook,getting-started,configuration}.md, README.md, AGENTS.md, CLAUDE.md: backend lists, AWS values, and protoc-gen-dynamo mentions. - docs/proposals/* left untouched (historical). Verification - bazel build //... green; bazel test //... 98/98 pass, including the etcd testcontainers integration test and the chart lint/template tests. - make format-check clean; bazel build --config=lint //... clean. - make gazelle idempotent (diff hash identical across two runs); bazel mod tidy idempotent. - scripts/check-chart-version-bump.sh origin/upgrade/go-1.27: 0.92.15 -> 0.92.16 OK. - The issue's grep gate returns only explainable hits: "writeRawState" and "withdraws" (substring false positives) and the edge Gateway TLS SECRET_PROVIDER_AWS_SECRETS_MANAGER enum, a reserved, not-implemented provider unrelated to the registry backend. Out of scope per the issue: the registrar's write-behind pending-shield and the out-of-repo AetherService table / IAM role cleanup. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
bpalermo
added a commit
that referenced
this pull request
Sep 12, 2026
The dynamodb backend only ever implemented the base registry.Registry interface. Everything the registrar gained since June is etcd-only: watch-driven sync (ChangeNotifier, #174), the cross-cluster config plane (ConfigExporter/ConfigImporter, proposal 026), ServiceExporter, and the multi-region mirror (proposal 006). On DynamoDB the registrar fell back to the 5 s poll and config propagation did not work at all. The 2026-06-13 directive already ruled out global tables for multi-region, talos-main has been on etcd since rev 47, and the chart default is the zero-infra kubernetes backend. Supported backends are now kubernetes and etcd — the same shape as the Cloud Map removal (#150). Backend + Go code - Delete registry/internal/ddb/ (dynamodb.go, dynamodb_test.go, BUILD.bazel). - registry/backend/backend.go: drop the dynamodb case and the AWS config loading; error text is now "supported: kubernetes, etcd". ctx is unused by the two remaining constructors, so the parameter is kept but blanked. - registrar/internal/cmd: flag help + comments -> "kubernetes or etcd"; config_test's round-trip case switches to etcd. - common/constants: remove DefaultDynamoDBServiceTableName. registry.go held only the package doc afterwards, so it is renamed to doc.go. - Comment-only rewording: registry/registry.go, registry/registrytest, registry/registrarclient, registrar/internal/server/{server,sync}.go, agent/internal/cmd/root.go. Codegen - api/aether/registry/v1/service.proto: drop the proto/dynamo/v1 import and the (dynamo.v1.msg).key option. Edition stays 2023 (gRPC still caps there; never lower an edition). - api/aether/registry/v1/BUILD.bazel: drop the protoc-gen-dynamo proto dep and //bazel/go:go_dynamo from compilers. - Delete bazel/go:go_dynamo, the two root gazelle:resolve directives for proto/dynamo/v1, the go_dynamo entry in gazelle:go_proto_compilers, and the .pb.dynamo.go exclusion in bazel/lint/gocognit.bzl. - The api/aether/{agent,config}/v1 BUILD comments explaining why those packages avoid go_dynamo are moot; the per-package gazelle:go_proto_compilers directives they carried are now the root default, so both go with them. Dependencies - Removed direct: aws-sdk-go-v2, /config, /credentials, /feature/dynamodb/attributevalue, /service/dynamodb, pquerna/protoc-gen-dynamo, testcontainers-go/modules/dynamodb. - Removed indirect: aws-sdk-go-v2/{feature/ec2/imds, internal/configsources, internal/endpoints/v2, internal/ini, internal/v4a, service/dynamodbstreams, service/internal/accept-encoding, service/internal/endpoint-discovery, service/internal/presigned-url, service/signin, service/sso, service/ssooidc, service/sts}, aws/smithy-go, dave/jennifer, lyft/protoc-gen-star/v2 — and with it the pquerna protoc-gen-star fork replace directive. - klauspost/compress is KEPT (moby/go-archive needs it) but demoted to indirect. The Masterminds/sprig chain (semver, sprig, aokoli/goutils, huandu/xstrings, imdario/mergo) is KEPT: pseudomuto/protoc-gen-doc, the website API-doc generator, needs it. - bazel mod tidy dropped 8 use_repo(go_deps, ...) entries: the five AWS repos, com_github_klauspost_compress, com_github_pquerna_protoc_gen_dynamo, com_github_testcontainers_testcontainers_go_modules_dynamodb. - go.mod 251 -> 209 lines. go.sum is unchanged: pruning it needs `go mod tidy`, which is forbidden here and would additionally strip the repo's Bazel-only direct requires (protoc-gen-doc, protokit). The stale entries are inert. - The cel.dev/expr gazelle_override is unrelated (cel-go#1184) and stays. Chart (0.92.14 -> 0.92.16) - values.yaml: backend enum comment -> "kubernetes, etcd"; delete the registrar.aws block; reword the agent's AWS-credentials note. - registrar-serviceaccount.yaml: drop the IRSA eks.amazonaws.com/role-arn annotation block. - registrar-deployment.yaml: drop the AWS_REGION env block. Docs - docs/registry-backend-evolution.md: status line now lists kubernetes + etcd, section 3 is marked dropped, and a new dated section 5 records the removal and its rationale in the style of the Cloud Map entry. - docs/{runbook,getting-started,configuration}.md, README.md, AGENTS.md, CLAUDE.md: backend lists, AWS values, and protoc-gen-dynamo mentions. - docs/proposals/* left untouched (historical). Verification - bazel build //... green; bazel test //... 98/98 pass, including the etcd testcontainers integration test and the chart lint/template tests. - make format-check clean; bazel build --config=lint //... clean. - make gazelle idempotent (diff hash identical across two runs); bazel mod tidy idempotent. - scripts/check-chart-version-bump.sh origin/upgrade/go-1.27: 0.92.15 -> 0.92.16 OK. - The issue's grep gate returns only explainable hits: "writeRawState" and "withdraws" (substring false positives) and the edge Gateway TLS SECRET_PROVIDER_AWS_SECRETS_MANAGER enum, a reserved, not-implemented provider unrelated to the registry backend. Out of scope per the issue: the registrar's write-behind pending-shield and the out-of-repo AetherService table / IAM role cleanup. Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why (measured, not vibes)
Identical svc-1 rolls under full load on talos-main (2026-06-11), same tally method:
The burst is structural, not tunable: Cloud Map has no watch API (poll-only, billed + throttled reads) and its convergence chain stacks four latencies — write-behind landing (2–32s measured), AWS-side eventual consistency, the 10s client cache TTL (throttling defense), and the 5s sync poll. A lagging registrar replica can therefore still show new pods UNHEALTHY after the old pods are gone → zero healthy capacity with panic routing at 0. Both alternative backends eliminate this entirely because writes land in milliseconds and polls read fresh, strongly consistent data.
Nothing in or around the mesh consumes Cloud Map's DNS/service-discovery integration — we were paying its eventual-consistency tax for integration value with no consumer.
State of the cluster
talos-main has been running
--registry-backend=dynamodb(registrar rev 33,AetherServicetable) since 23:05Z, validated by the full e2e suite:code=000connection blips, zero 503sRemoves
registry/internal/cloudmap/+ the publicregistry/cloudmap.gowrappercloudmapbackend case +--cloudmap-namespaceflag (+ config/tests)cloudMapchart values + deployment flag wiring.github/workflows/integration-cloudmap.yamlDefaultCloudMapNamespaceconstants, doc references (README/CLAUDE.md/AGENTS.md)aws-sdk-go-v2/service/servicediscoverydependencyBREAKING CHANGE:
--registry-backend=cloudmapis no longer accepted; supported backends arekubernetes,dynamodb,etcd.All 37 test targets pass; format/lint clean.
🤖 Generated with Claude Code