Logical service identity should outlive machine addresses#
Autoscaling may create Payment Service at 10.0.1.4, remove it, and add replacements at new addresses. Hardcoding those addresses couples every caller to deployment churn.
Registration, health, lookup, and routing#
Instances or an orchestrator register endpoints and refresh health. Callers resolve the logical service name. In client-side discovery, the client selects an instance. In server-side discovery, a proxy or load balancer resolves and selects on the client's behalf.
DNS can expose stable service names; Kubernetes Services are a common example of workloads contacting a consistent DNS name instead of Pod IPs. DNS is one discovery mechanism, not the definition of service discovery.
Use these prompts to extend the design. The useful answer is a reasoned change, not a memorized sentence.
- Who registers instances and removes stale ones?
- How quickly does health propagate?
- What happens when the registry is unavailable?
- Does the client or a server-side component select the target?
Related practice problems
Use the manifest-backed prompts below to apply this lesson in a complete design.
- DNS for Services and PodsKubernetes Documentation