Problem
Clients calling remote or legacy services each need connection handling, retries, TLS, circuit breaking and metrics. Embedding this in every client duplicates code and cannot be applied to software you cannot modify.
Also known as: ambassador-proxy, outbound-proxy
Place a helper process next to a client that handles outbound network concerns such as retries, routing, monitoring and security on its behalf.
Clients calling remote or legacy services each need connection handling, retries, TLS, circuit breaking and metrics. Embedding this in every client duplicates code and cannot be applied to software you cannot modify.
The ambassador pattern represents a client to the outside world. The application talks to a local proxy; the proxy deals with the messy realities of the network. It is the egress-focused sibling of the sidecar.
The proxy listens on a local port. The client connects to it with plain protocol and no resilience logic. The ambassador resolves the destination, picks a healthy instance, opens a pooled TLS connection, attaches credentials, enforces a timeout and retries safe requests.
client --> localhost:6379 --> ambassador --TLS--> redis shard 2
|
+-- metrics, logs, retries, auth
A classic case is a legacy application using a single database address while the ambassador routes keys to shards or reads to replicas.
Low - lightweight proxy per host or pod
Medium - policy distribution and upgrades
Low - client sees a simple endpoint
Ambassador retries multiply load on an already failing service
Misrouted traffic because stale discovery data
Client treats localhost as reliable and has no fallback when the proxy dies