Canary API pools in DNS
Weighted answers send a fraction of resolvers to a new API stack.
Choose a TTL and routing policy for the API hostname. Check new resolutions separately from clients that reuse open connections or cached addresses.
Put api.example.com on Cloud DNS. Steer with GeoDNS or weights, health-check every pool, and use low TTLs so canaries and failovers work.
Weighted answers send a fraction of resolvers to a new API stack.
Health checks remove non-responsive endpoints from eligible answers.
GeoDNS sends resolvers toward the nearest live API hostname or address.
api, auth and webhook hostnames.
Even if 100% of weights start on a single pool.
Probe the API the way clients use it, over HTTPS.
Clients will cache. Give yourself a way to move them.
Cacheable GET APIs often should. See CDN for APIs. Cloud DNS still steers the hostname.
DNS is agnostic to the application protocol. Health checks should match how you determine liveness.
GeoDNS can steer, but tenancy is an application concern. Do not rely on DNS alone for residency.
Most OS resolvers do, with clamping. Document expected TTL behaviour for long-lived mobile clients.