← Back to the chapter

Technical detail · Service API Contracts: Durable Device Interfaces

Conditional updates and stable service discovery

A response can carry a version marker called an ETag. A client sends it back in If-Match to make an update conditional on that version still being current. This prevents one editor from silently overwriting another editor’s change.

Discovery belongs behind the stable contract. DNS maps a service hostname to a network address; internal services can use a registry or gateway to find healthy instances. Keep the stable host or gateway in front of that registry so firmware does not need to know which instance is running or where it is deployed.

Kubernetes runs and manages containers, the packaged services. A Kubernetes Service provides a stable address in front of changing service copies called pods. A Pod is its smallest runnable unit and contains one or more containers. Firmware should not depend on Pod addresses. Client-side discovery, server-side discovery, Kubernetes Services and API gateways are approaches to compare while keeping the field-facing promise stable.

Gateway products such as Envoy, Kong, NGINX Ingress, AWS API Gateway or Azure API Management can enforce authentication, quotas, routing and request-size limits before traffic reaches services. Those controls support the contract; internal routing changes must preserve public resource names and behavior.

← Back to the chapter