Dynamic Service Discovery
Treat every cached address as a lease, not identity.
- Identify the authoritative service name/registry, resolver, TTL, health authority, and failure semantics.
- Resolve at request time or refresh before expiry; never bind service identity permanently to a startup-time address.
- Separate discovery from health. A resolvable endpoint may still be unready or unauthorized.
- Bound caches, negative caches, retries, backoff, failover, and connection-pool lifetime.
- Invalidate endpoints on authoritative change, repeated transport failure, or lease expiry.
- Preserve identity/authentication checks after re-resolution so discovery cannot redirect trust silently.
- Test address rotation, restart, scale-out/in, DNS failure, stale pools, partial registry failure, and recovery.
- Record the discovery contract in the integration registry.
For NGINX in a dynamic container network, a resolver plus variable-based upstream can force re-resolution. Verify URI handling, resolver scope, TTL, and health behavior rather than copying a configuration blindly. Use scripts/audit_service_discovery.py for a conservative static warning pass.
When selecting a backend stack, use the vendor-neutral model in runtime.backend_capabilities. Cover data, authentication, storage, functions, hosting, model gateways, observability, and payments; route each neutral domain through an explicit provider adapter; prefer the least-effect candidate inside the allowed authority. Metadata discovery never hydrates provider bodies or grants network or mutation authority.