Traffic Director in Google Cloud: A Managed Control Plane for Service Mesh Traffic
A deep, plain-English guide to Traffic Director: how it configures proxies, how it routes, balances and secures service-to-service traffic, and the patterns that keep a mesh reliable at scale.
Picture a huge airport where hundreds of flights land and take off every hour. The pilots do not decide for themselves which runway to use, which gate is free, or which route avoids a storm. A control tower makes those decisions and radios instructions to every aircraft, while the planes do the actual flying. Traffic Director is the control tower for the traffic between your services. It does not carry any of your data itself. It tells a fleet of small proxies, sitting next to your applications, exactly where each request should go, how many times to retry, and which connections to trust.
1What Traffic Director Is and Why It Exists
Traffic Director is Google Cloud’s fully managed control plane for service mesh and application networking.
Modern applications are rarely a single program. They are made of many small services that call each other over the network: a checkout service calls an inventory service, which calls a pricing service, which calls a database. Every one of those calls can fail, slow down, or land on an unhealthy server. Each team could write its own code to handle retries, timeouts, load balancing and encryption, but then every service would solve the same problems differently, in different languages, with different bugs.
A service mesh moves those chores out of application code and into the infrastructure. Small proxies run beside each service and handle every network call on its behalf. But a fleet of proxies needs a brain that tells all of them what the rules are. That brain is called a control plane, and running one yourself is hard work. Traffic Director is that brain, run by Google, so you configure the rules once and the proxies everywhere receive them.
Imagine a delivery company where every driver has a personal GPS. Someone must keep the maps current, mark closed roads, and tell drivers which warehouse is nearest and open. Traffic Director is the team that keeps all the GPS devices updated, so no driver has to carry out-of-date directions.
A note on the name
Google’s service mesh offerings have been reorganized over time. Traffic Director now sits inside the broader Cloud Service Mesh product family, where it acts as one of the control planes. The ideas in this guide, proxies receiving configuration from a managed control plane, remain the same, but product names, setup paths and recommended configuration styles change. Always confirm current naming and instructions in the official documentation before building.
Traffic Director is about traffic between services inside your own environment, often called east-west traffic. Traffic arriving from the internet, called north-south traffic, is usually handled by Cloud Load Balancing. The two often work together.
2Core Concepts You Must Know Cold
A compact vocabulary explains nearly every conversation about Traffic Director.
Each term below is explained by what it is, why it exists and where you meet it. Read them slowly, because mesh discussions use these words constantly.
Service mesh
A layer of infrastructure that manages communication between services, handling routing, resilience, security and observability outside application code.
Control plane
The management brain that holds the rules and distributes them to proxies. Traffic Director is a control plane.
Data plane
The proxies and clients that actually carry requests between services, following the rules the control plane sends.
Envoy
A popular open source proxy used as the data plane in many meshes, including with Traffic Director.
xDS
The family of discovery protocols proxies use to fetch configuration: listeners, routes, clusters and endpoints.
Sidecar proxy
A proxy running next to an application instance that intercepts its inbound and outbound network calls.
Proxyless gRPC
A model where the gRPC library inside the application speaks xDS directly, so no separate proxy is needed.
Backend and endpoint
A backend is a group serving a service. An endpoint is one address and port inside it that can receive traffic.
If the mesh is a city’s road system, the control plane is the traffic management center, the data plane is the cars and traffic lights following instructions, and xDS is the radio channel that carries the instructions to every light.
Configuration versus traffic
Understanding the difference between configuration traffic and application traffic is the single most important mental model. Configuration flows from Traffic Director down to proxies, a small amount of data at moments of change. Application traffic flows between proxies and never passes through Traffic Director. This explains both its scalability and its failure behavior, which later chapters explore.
Many beginners picture Traffic Director as a load balancer that requests flow through. It is not. It is the planner that tells your proxies how to balance. Requests go straight from one proxy to the destination service.
3Architecture: Control Plane and Data Plane
The design separates deciding from doing, and that separation is what makes it scale.
A Traffic Director system has two halves. The first half is Google’s managed control plane, a global service that stores your configuration, tracks the health and location of backends, and serves configuration to proxies. The second half is the data plane, made of proxies deployed with your workloads on Compute Engine virtual machines, Google Kubernetes Engine pods, or hybrid locations. Each proxy opens a long-lived connection to the control plane, receives its configuration, and keeps receiving updates as things change.
flowchart TD
CFG["Your configuration: routes, policies, backends"] --> TD["Traffic Director Control Plane"]
HC["Health information about backends"] --> TD
TD -- "xDS config streams" --> P1["Proxy beside Service A"]
TD -- "xDS config streams" --> P2["Proxy beside Service B"]
TD -- "xDS config streams" --> P3["Proxy beside Service C"]
P1 -- "Application traffic" --> P2
P2 -- "Application traffic" --> P3
Why separating the planes matters
Because application traffic never passes through the control plane, a surge in requests does not load Traffic Director, and the control plane can serve many thousands of proxies without being in the request path. Equally, if the control plane is briefly unreachable, proxies keep operating with the last configuration they received. They simply cannot receive new updates, and new proxies cannot fetch an initial configuration until the connection returns.
Control plane
Stores rules and backend information, computes configuration for each proxy and pushes updates. Managed by Google.
Data plane
Proxies and proxyless clients that route and protect real requests. Deployed and updated by you.
xDS connection
The long-lived stream from each proxy to the control plane carrying configuration updates.
Backends and health
Information about which endpoints exist and which are healthy, feeding the routing decisions.
If the radio at the control tower goes silent for a moment, planes already in the air keep following their last instructions and land safely. What they cannot do is receive new changes. A proxy that loses its control plane connection behaves the same way.
Design with the failure behavior in mind. Existing traffic keeps flowing without the control plane, but deployments, scaling and new proxies depend on it, so avoid big rollouts during a control plane incident.
4xDS: How Proxies Receive Their Instructions
The discovery protocols are the language between the control plane and every proxy.
Envoy and proxyless gRPC clients learn what to do through a family of discovery services, known together as xDS. Instead of reading a static configuration file, the proxy subscribes to updates, and the control plane streams new versions whenever something changes. This is what lets you shift traffic, add backends or change timeouts across a fleet in seconds, with no restarts.
| Discovery service | What it tells the proxy | Everyday meaning |
|---|---|---|
| Listener discovery | Which ports and addresses to accept traffic on | Where the proxy listens |
| Route discovery | How to match requests to destinations | The rules: path, header and host matching |
| Cluster discovery | Which logical services exist and how to treat them | The list of services and their policies |
| Endpoint discovery | The actual addresses behind each service and their health | Which servers are available right now |
| Secret discovery | The certificates and keys for secure connections | Identity credentials, rotated automatically |
sequenceDiagram
participant Op as Operator
participant TD as Traffic Director
participant PX as Proxy
participant App as Local Application
PX->>TD: Connect with bootstrap identity
TD-->>PX: Listeners, routes, clusters, endpoints
App->>PX: Outgoing request to a service name
PX->>PX: Match route, pick healthy endpoint
Op->>TD: Change traffic split to 90 and 10
TD-->>PX: Updated route configuration
Note over PX: New rule applies without restart
The bootstrap step
A proxy must know how to find Traffic Director and how to identify itself. This starting information, the bootstrap, carries details such as which project and network the proxy belongs to, and it points to Traffic Director’s address. It also provides an identity so the control plane knows which configuration to send. On Kubernetes this is commonly handled by an injector that adds the proxy and its bootstrap to each pod automatically. On virtual machines, instance templates and startup configuration install and start the proxy.
Proxy starts with a bootstrap
It reads where Traffic Director lives and what identity and network it belongs to.
Authentication and authorization
The proxy proves who it is using the service account of its host. The service account needs permission to receive configuration.
Initial configuration arrives
The control plane sends listeners, routes, clusters and endpoints relevant to that proxy.
The proxy serves traffic
Requests from the local application are matched against routes and sent to chosen endpoints.
Updates stream continuously
As backends scale, fail or rules change, the control plane pushes new versions that apply with no restart.
A new employee gets a badge, an address for headquarters and a login, and then receives daily updates on policies by message. The bootstrap is the starter pack, and xDS is the stream of daily memos.
A wrong network name or project number in the bootstrap. The proxy connects but receives an empty or incorrect configuration, and traffic fails in confusing ways. Check bootstrap values first when a new proxy misbehaves.
5Deployment Models: Sidecars, Proxyless gRPC and Gateways
The control plane can steer several kinds of data plane, and each fits different needs.
Traffic Director is not tied to one way of running proxies. The same control plane can configure sidecar proxies next to applications, gRPC clients that need no proxy at all, and standalone proxies acting as gateways. Choosing the right model per workload is an important design decision.
flowchart LR
subgraph Sidecar["Sidecar model"]
A1["App"] --> E1["Envoy sidecar"]
end
subgraph Proxyless["Proxyless gRPC model"]
A2["App with gRPC library speaking xDS"]
end
subgraph Gateway["Gateway or middle proxy model"]
G1["Standalone Envoy"] --> S1["Backend services"]
end
TD["Traffic Director"] -.-> E1
TD -.-> A2
TD -.-> G1
| Model | How it works | Strengths | Trade-offs |
|---|---|---|---|
| Sidecar proxy | An Envoy runs beside each application instance and intercepts its traffic | Works with any language and protocol, no code change | Extra CPU and memory per instance, added hop of latency |
| Proxyless gRPC | The gRPC library in the application fetches xDS configuration directly | No proxy overhead, lowest latency | Only for supported gRPC languages and features |
| Gateway or edge proxy | A standalone proxy routes traffic entering the mesh or leaving it | Central place for ingress rules and policy | Must be scaled and secured as a shared component |
| Middle proxy | A shared proxy tier sits between clients and a service, fronted by an internal load balancer | Serves clients that cannot run a sidecar | Extra hop and a tier to operate |
Choosing between sidecar and proxyless
Sidecars are the universal answer. They work for any language and any protocol, and they can add encryption and rich traffic policy to applications that know nothing about the mesh. Their cost is resource overhead and a small added delay, since every call passes through two local proxies. Proxyless gRPC removes that overhead for services that already use gRPC with an xDS-capable library, which suits latency-sensitive internal calls. Many organizations use both: proxyless for high-volume gRPC services and sidecars for everything else.
Sidecars when
Services use mixed languages or protocols, and you want zero application changes.
Proxyless gRPC when
Services already use supported gRPC libraries and latency or resource use matters most.
Gateways when
You need controlled entry or exit points for traffic crossing mesh boundaries.
Middle proxies when
Clients cannot run a proxy of their own, for example legacy or third-party callers.
A sidecar is a personal assistant sitting beside every employee. Proxyless gRPC is training the employee to read the company memos directly. A gateway is the reception desk at the building entrance. Each approach suits a different kind of office.
Measure the resource cost of sidecars on your real workloads before rolling out widely. Thousands of small proxies add up, and right-sizing their CPU and memory can save significant money.
6Configuration Models: Two Ways to Describe the Rules
You can express mesh rules using older load balancing resources or newer service routing resources.
Traffic Director has supported more than one set of APIs for describing routing. Understanding both helps when reading documentation, because examples from different years use different resource names. The recommended path and available features change over time, so confirm which model your current documentation favors.
The load balancing resource model
The original model reused the building blocks of Google Cloud load balancing. A forwarding rule with a special internal self-managed scheme represents the service address. A target proxy and a URL map hold the routing rules. A backend service groups the endpoints and carries policies such as health checks, balancing mode and timeouts. Backends are managed instance groups or network endpoint groups. This model is powerful and familiar to people who know Google Cloud load balancers.
The service routing resource model
The newer approach uses resources shaped after the Kubernetes Gateway API. A mesh resource represents the logical mesh that proxies join. Route resources for HTTP, gRPC, TCP and TLS traffic describe how requests are matched and where they go, and they refer to backend services. This model is more consistent with the Kubernetes world and expresses common routing intent more directly.
| Aspect | Load balancing resources | Service routing resources |
|---|---|---|
| Origin | Reuses Google Cloud load balancer building blocks | Modeled after the Kubernetes Gateway API |
| Mesh identity | Implied by the network and forwarding rule | An explicit mesh resource proxies attach to |
| Routing rules | URL maps with host and path matchers | Dedicated HTTP, gRPC, TCP and TLS route resources |
| Familiar to | Teams with Google Cloud load balancing experience | Teams with Kubernetes Gateway API experience |
| Backends | Backend services with groups or endpoint groups | Same backend services referenced by routes |
Backend service
The heart of both models: a logical service with its endpoints, health checks and traffic policies.
Health check
Defines how the platform tests whether an endpoint is healthy.
Mesh
In the newer model, the named scope that proxies join to receive configuration.
Routes
Rules that match requests by host, path, header or method and choose destinations.
Two languages can describe the same road map: one uses the vocabulary of shipping companies, the other uses the vocabulary of city planners. Both lead to the same deliveries. Traffic Director understands both vocabularies for describing your mesh.
Mixing instructions from tutorials written for different configuration models. Pick one model for a given mesh, follow current documentation for it, and avoid copying fragments between them.
7Service Discovery and Backends
Before traffic can be routed, the control plane must know where each service actually lives.
Service discovery answers a simple question: for the name of a service, which servers can currently handle it? In a dynamic cloud, the answer changes constantly as servers are added, removed, replaced and moved. Traffic Director tracks this by watching the backends you attach to each service, and it streams the current list of endpoints to proxies.
Managed instance groups
Groups of identical virtual machines. Endpoints follow the group as it scales and heals.
Network endpoint groups
Collections of individual addresses and ports, including container pods in Kubernetes, giving fine-grained, per-endpoint balancing.
Hybrid connectivity endpoint groups
Endpoints outside Google Cloud, such as servers on-premises or in other clouds, reachable through private connections.
Kubernetes integration
On Google Kubernetes Engine, endpoint groups can be created and kept in sync with Kubernetes services automatically.
Why endpoint groups improve balancing
Balancing at the level of instance groups treats each virtual machine as one unit. Balancing at the level of individual endpoints is more precise, because several containers can run on one machine, and each deserves its own share of traffic. Endpoint-level balancing is also what lets the mesh make good decisions about containers that start and stop frequently.
Define the service
Create a logical backend service with a name, protocol, health check and policies.
Attach backends
Add instance groups or endpoint groups that actually run the service.
Control plane tracks membership
As instances come and go, the control plane updates its view of available endpoints.
Proxies receive endpoint updates
Each interested proxy gets the current list and begins using new endpoints right away.
A restaurant host keeps a live list of which tables are open and which waiters are on shift. Service discovery is that live list, kept up to date for every proxy so they never send customers to a closed table.
Use consistent service naming from the start. Clear, stable names make routing rules readable and make it much easier to reason about traffic during incidents.
8Health Checking and Endpoint Selection
Routing to a broken server is worse than routing slowly, so health information is central.
A health check is a periodic test that decides whether an endpoint is ready for traffic. If an endpoint fails the test, the control plane marks it unhealthy and tells proxies to stop sending it requests. When it recovers, it is added back. In Traffic Director’s model, health checking is done as a managed, centralized function, and the resulting health states are distributed to all proxies, instead of every proxy independently probing every endpoint.
Protocol-level probes
Checks that connect over HTTP, HTTPS, TCP or gRPC and look for a successful answer.
Interval and timeout
How often to test and how long to wait. Shorter intervals detect failure faster but add load.
Healthy and unhealthy thresholds
How many successes or failures change an endpoint’s state, which avoids flapping on a single blip.
Firewall access for probes
Health check traffic comes from specific Google ranges. Firewall rules must allow it, or healthy servers will look dead.
Beyond the basic check: passive detection
Active health checks run on a schedule, so they can miss a server that starts failing between probes. Proxies can add passive detection, called outlier detection, by noticing real failures in live traffic and temporarily ejecting an endpoint that returns repeated errors. Combining active and passive detection gives fast and accurate removal of bad endpoints.
| Detection style | How it works | Strength | Weakness |
|---|---|---|---|
| Active health checks | Scheduled probes test each endpoint | Detects dead servers even with no traffic | Slow between probes, tests only what the probe exercises |
| Passive outlier detection | Proxies watch real request failures | Reacts to real user-visible errors quickly | Needs live traffic to notice problems |
The depth of the health endpoint also matters. A shallow check that only confirms the process is running can miss a service that is running but cannot reach its database. A deep check that tests every dependency can cause the opposite problem: when a shared dependency hiccups, every instance fails its check at once and the whole service looks dead. A good health endpoint tests what the instance itself needs to serve, without failing for reasons it cannot fix.
A restaurant manager checks each cook is present each hour, which is an active check. A waiter who notices a dish keeps coming back wrong and tells the manager is a passive check. You want both to catch trouble early.
Forgetting the firewall rule for health check source ranges. Backends then appear unhealthy even though they are running perfectly, and traffic is not routed to them.
9Global Load Balancing and Locality Failover
Because the control plane sees every backend in every zone, it can steer traffic with global awareness.
Ordinary client-side balancing picks any available server. Traffic Director adds location awareness. Proxies prefer endpoints in the same zone as the client, because keeping traffic local is faster and avoids cross-zone network charges. If local endpoints become unhealthy or overloaded, traffic overflows to the next nearest zone, then to other regions, according to configurable rules.
flowchart TD
C["Client proxy in Zone A"] --> Q{"Healthy and spare capacity in Zone A?"}
Q -- Yes --> A["Send to Zone A endpoints"]
Q -- No --> R{"Capacity in nearby Zone B?"}
R -- Yes --> B["Spill over to Zone B"]
R -- No --> F["Fail over to another region"]
Balancing algorithms
Within the chosen location, a balancing algorithm picks the specific endpoint. Different algorithms suit different workloads, and the available options depend on configuration, so check current documentation.
| Algorithm style | Behavior | Good for |
|---|---|---|
| Round robin | Takes turns across endpoints | Simple, similar-sized requests |
| Least request | Prefers the endpoint with the fewest active requests | Requests of uneven duration |
| Consistent hashing styles | Sends the same key, such as a user or session, to the same endpoint | Caches and session affinity |
| Random | Picks an endpoint at random | Large fleets where simplicity is enough |
Capacity and overflow
For overflow decisions to work, the control plane needs to know how much each group can handle. You describe capacity through settings that express maximum rates or connections per endpoint or group. When a zone nears its stated capacity, the mesh begins shifting traffic away, avoiding overload before errors start. Underestimating capacity wastes resources, and overestimating it delays overflow until the group is already struggling.
Imagine a chain of coffee shops. Customers go to the nearest one. If it is packed, staff direct them to the next nearest shop, and if a whole area is closed, they go further. Locality failover is the same polite redirecting, done automatically.
Test locality failover on purpose. Remove a zone’s backends in a safe environment and watch where the traffic goes and whether the remaining zones can handle it. Surprises are cheaper in testing.
10Traffic Management: Splitting, Canaries and Routing Rules
Traffic Director lets you steer requests by rules, which makes releases safer and experiments easier.
Because proxies make routing decisions from configuration, you can change where traffic goes without redeploying any application. This capability turns releases from a risky all-or-nothing moment into a gradual, observable process.
flowchart LR
REQ["Incoming requests"] --> PX["Proxy applies route rules"]
PX -- "90 percent" --> V1["Service version 1"]
PX -- "9 percent" --> V2["Service version 2 canary"]
PX -- "Header marks test users" --> V3["Service version 3 experiment"]
PX -. "Copy of traffic" .-> M["Shadow mirror for testing"]
Weighted traffic splitting
Send a chosen percentage of requests to each version. Ideal for canary releases that grow from a few percent upward.
Header and path matching
Route based on request details, such as a header, path, host or method, to reach different backends.
Traffic mirroring
Copy live requests to a test version without affecting users, whose answers are ignored.
Request redirects and rewrites
Change paths or hosts so callers and services can evolve independently.
Fault injection
Deliberately add delays or errors for a share of traffic to test how callers cope with failure.
A safe canary release in steps
Deploy the new version with no traffic
Run it beside the old version, healthy but unused, and test it directly.
Send a small share of traffic
Route a few percent of requests to the new version, or only requests from internal testers.
Watch the signals
Compare error rate and latency between versions, using mesh metrics for each backend.
Increase gradually or roll back
If healthy, step up the share. If not, set the weight back to zero immediately, with no redeployment.
A restaurant testing a new recipe serves a few tables first and asks for feedback, before putting it on every table. Weighted routing is that cautious tasting, controlled by a dial that you can turn up or back to zero.
Splitting traffic without comparing metrics per version. If error rates are measured only for the combined service, a failing canary can hide inside healthy totals. Always measure versions separately.
11Resilience: Timeouts, Retries and Circuit Breaking
Failures between services are normal, so the mesh must contain them instead of spreading them.
Resilience policies are the safety equipment of a mesh. They are easy to configure and easy to misconfigure, and the wrong settings can turn a small problem into an outage. Understanding how they interact is a core advanced skill.
Timeouts
The longest a caller waits for an answer. Without timeouts, slow calls pile up and exhaust resources.
Retries
Automatically repeating a failed call, ideally on a different endpoint. Helps with transient errors, dangerous without limits.
Circuit breaking
Capping concurrent connections and requests to a service so one slow dependency cannot absorb every resource.
Outlier detection
Temporarily removing endpoints that return repeated errors so traffic flows to healthy ones.
The retry storm
Retries seem harmless, but they multiply load. Imagine service A calls B, which calls C, and each layer retries three times. One failing call to C can become twenty-seven attempts, hitting an already struggling service with many times its normal traffic. This amplification can turn a brief slowdown into a prolonged outage. Defenses include limiting retries to a small number, adding a retry budget that caps retries as a share of total traffic, retrying only safe, repeatable requests, and spacing retries with delays.
| Situation | Risky setting | Safer approach |
|---|---|---|
| Slow dependency | No timeout, callers wait forever | Set a timeout shorter than the caller’s own deadline |
| Chain of services | Retries at every layer | Retry at one layer, with a small cap and retry budget |
| Non-repeatable operation | Automatic retries on payments or writes | Retry only idempotent requests or use idempotency keys |
| Overloaded backend | Unlimited concurrent requests | Use circuit breaking to cap load and fail fast |
Timeout hierarchy
Timeouts should shrink as you go deeper into a call chain. If the outer service allows five seconds, the inner calls should allow less, so that the outer service still has time to respond or retry. Inconsistent timeouts cause wasted work: the caller gives up while the callee keeps working on a result nobody wants.
If every employee in a chain who gets no answer asks again three times, one missing document can create a mountain of requests. A sensible office limits how often anyone re-asks and sets shorter patience limits further down the chain.
Enabling generous retries everywhere as a default. In an incident, those retries add the most load exactly when the system is weakest. Treat retries as a scarce resource with a budget.
12Security: Identity, Encryption and Authorization
A mesh can give every service an identity and encrypt every call without changing application code.
Inside a network, traffic is often assumed to be safe, but that assumption fails the moment an attacker gets a foothold. Zero trust thinking says every call must prove who is making it and be checked against a policy. A mesh makes this practical, because the proxies can handle the work consistently for every service.
Workload identity
Each service receives a verifiable identity, so receivers know exactly which service is calling.
Mutual TLS
Both sides of a connection present certificates, so traffic is encrypted and both ends are authenticated.
Automated certificate management
Certificates are issued and rotated automatically, often backed by a managed certificate authority, removing manual renewal chores.
Authorization policies
Rules that decide which identities may call which services and methods, denying everything else.
sequenceDiagram
participant A as Service A Proxy
participant B as Service B Proxy
participant CA as Certificate Authority
CA-->>A: Short-lived identity certificate
CA-->>B: Short-lived identity certificate
A->>B: TLS handshake, both present certificates
B->>B: Check caller identity against policy
alt Allowed
B-->>A: Connection accepted, traffic encrypted
else Denied
B-->>A: Connection rejected
end
Why short-lived certificates matter
Certificates that last for years are a liability if stolen. Short-lived certificates, rotated automatically within hours or days, limit the window of misuse. This is only practical because the mesh handles rotation without human involvement. Done manually across hundreds of services, certificate rotation is one of the most common sources of outages from expired certificates.
A gradual path to strict security
Turning on strict encryption everywhere at once can break callers that are not yet part of the mesh. A common path begins in a permissive mode that accepts both encrypted and plain traffic, observes who still uses plain connections, brings them into the mesh, and then switches to strict mode. Authorization policies follow a similar path: first observe, then allow what is needed, then deny the rest.
A secure building gives every employee a badge that expires frequently and renews itself. Doors check the badge and a list of who may enter each room. Mutual TLS is the badge exchange, and authorization policy is the room-by-room guest list.
Start authorization policies in a deliberately narrow area, such as one sensitive service, and learn how they behave before widening. A rushed deny-by-default rollout can block legitimate traffic everywhere.
13Observability: Seeing What the Mesh Is Doing
Because every call passes through a proxy, the mesh is a rich, uniform source of telemetry.
Without a mesh, each service must be instrumented separately, and gaps are common. With proxies in the path of every call, you get consistent data about every service-to-service interaction, whatever language each service is written in. The proxies report metrics, logs and trace information, which flow into Google Cloud’s monitoring, logging and tracing services.
Request rate
How much traffic each service and route receives.
Error rate
The share of calls failing, split by service, version and caller.
Latency distribution
Median and tail latencies, since averages hide slow outliers.
Saturation
How close backends and connections are to their limits.
Access logs and traces
Per-request records and end-to-end timelines across several services.
Service level objectives
A service level objective is a measurable promise, such as ninety-nine point nine percent of requests succeeding over a month. Mesh metrics make these objectives easy to define and track per service, and alerts can warn when an error budget is being consumed too fast. This shifts conversations from “the system feels slow” to specific, shared numbers.
Traces need cooperation from the application
Proxies can generate trace spans for each hop, but joining the hops into one end-to-end trace requires applications to pass tracing headers from incoming calls to outgoing calls. This small piece of application cooperation is often forgotten, resulting in traces that break into disconnected fragments.
| Question | Where to look |
|---|---|
| Which service is failing or slow? | Per-service error rate and latency metrics |
| Is the new version worse than the old? | Metrics split by backend version during a canary |
| Where did a single slow request spend its time? | Distributed traces across hops |
| Who is calling this service? | Access logs and source-labeled metrics |
| Are configuration updates reaching proxies? | Proxy connection status and configuration version indicators |
Road sensors at every junction give a traffic department a complete, uniform picture of the city. A mesh puts a sensor at the junction of every service call, so the picture has no blind spots.
Collecting every possible metric and log at full detail. Volume drives cost and noise. Choose the signals that serve your objectives, and sample heavy ones such as access logs and traces.
14Hybrid, Multi-Cluster and Multi-Region Meshes
Real organizations rarely live in one place, and the mesh can span clusters, regions and data centers.
A single control plane can serve proxies in multiple clusters and regions within one network setup, giving one consistent set of rules across them. It can also include backends outside Google Cloud, using private connectivity such as VPN or dedicated interconnect and hybrid endpoint groups. This lets services in different environments find and call each other as if they were neighbors.
flowchart LR
TD["Traffic Director"] -.-> C1["GKE cluster in Region 1"]
TD -.-> C2["GKE cluster in Region 2"]
TD -.-> VM["Compute Engine VMs"]
TD -.-> OP["On-premises services via hybrid endpoints"]
C1 C2
C1 VM
VM OP
Use cases for spanning environments
Gradual migration from on-premises
Services move to Google Cloud one at a time. The mesh routes calls to wherever each service currently lives, so callers do not change as the backend moves, and traffic can be shifted gradually between the old and new locations.
Multi-region resilience
Replicas of a service run in several regions. Locality-aware routing keeps traffic near, and failover moves it to another region when a region has trouble.
Mixed compute platforms
Some services run on virtual machines and others in containers. The mesh gives both the same routing, security and observability, so they interoperate smoothly.
Challenges that come with scale
Spanning environments adds real concerns. Latency between regions and data centers is higher, so cross-region calls should be an exception, not the default. Network address ranges must not overlap. Failover into another region needs capacity there, and data stores behind services need their own replication plan, because the mesh routes requests but does not replicate data.
A nationwide delivery company uses one dispatch center to coordinate depots across many cities. The dispatch center does not move packages but ensures each driver gets consistent instructions, whichever city they work in.
Capacity-plan for failover. If one region carries half your traffic, the surviving region must absorb it. Test with realistic load, not only with a quick connectivity check.
15Prerequisites: Networking, Permissions and Setup Hygiene
Most early problems come from a short list of setup requirements that are easy to overlook.
API enablement
The relevant Google Cloud APIs must be enabled in the project before any configuration works.
Service account permissions
The identity the proxies run under needs permission to receive configuration from the control plane. Missing permission looks like a silent connection failure.
Firewall rules
Allow health check ranges to reach backends, and allow traffic between services on the ports they use.
Proxy egress to the control plane
Proxies must reach the control plane’s address over the network. Restrictive egress rules or private networks need a route and name resolution that work.
Correct bootstrap values
The project, network and mesh identity in the bootstrap must match your setup exactly.
Proxy version compatibility
Use proxy versions supported by the control plane. Very old or very new versions may behave unexpectedly.
A troubleshooting ladder
Is the proxy connected?
Check whether the proxy has an active connection to the control plane and has received configuration.
Is the configuration what you expect?
Inspect the routes and endpoints the proxy actually holds. Compare them with what you configured.
Are the backends healthy?
Confirm health check results. If endpoints are unhealthy, check firewall rules for probe ranges.
Is the network path open?
Verify that the caller’s proxy can reach the endpoint’s address and port.
Do policies allow it?
Check security and authorization policies for rules that may deny the call.
When a delivery fails, a good dispatcher checks in order: did the driver get the instructions, were the instructions right, was the destination open, was the road clear, and was the driver allowed in. A troubleshooting ladder follows the same logic.
Debugging the application when the real problem is that the proxy never received its configuration. Always confirm the proxy’s connection and configuration state before blaming application code.
16Adopting a Mesh: A Rollout Strategy
Introducing a mesh into a running system is a change management project as much as a technical one.
A mesh touches every service and every call. Rolling it out all at once invites outages, while a gradual rollout lets teams learn and fix problems at small scale. The best programs begin with clear goals, such as consistent encryption, safer releases or better visibility, and measure progress against them.
Set goals and choose a pilot
Pick one clear benefit and a small group of low-risk services owned by a willing team.
Add observability first
Bring services into the mesh in a passive mode and just watch. Learn real traffic patterns before changing behavior.
Introduce traffic policy gradually
Add timeouts and retries with conservative values, then canary routing, validating each step.
Enable encryption in permissive mode
Turn on mutual TLS where both sides support it, while still accepting plain connections from stragglers.
Tighten security
Switch to strict mode and introduce authorization policies service by service, starting with the most sensitive.
Scale out and standardize
Roll in more services, publish templates and guidelines, and give teams self-service tools.
People and ownership
Decide early who owns what. A platform team usually owns the mesh itself, the proxies’ versions and the baseline policies, while application teams own the routing and resilience settings for their own services. Without clear ownership, rules accumulate that nobody dares change, and incidents bounce between teams.
Platform team
Runs the mesh, manages proxy upgrades, sets defaults and guardrails, and provides support and documentation.
Application teams
Define routes, canaries and resilience settings for their services within the platform’s guardrails.
Security team
Defines identity, encryption and authorization standards, and reviews exceptions.
Adding a new traffic system to a city starts with one neighborhood, not the whole city. You watch how it behaves, fix issues, and expand once it works smoothly. Mesh adoption deserves the same patience.
Plan proxy upgrades from the beginning. Proxies are software that needs regular patching, and an upgrade process that is rehearsed and automated keeps security fixes flowing.
17The Cost Model
The control plane is only one part of what a mesh costs, and often not the largest part.
Pricing for Traffic Director, and for the Cloud Service Mesh family it belongs to, has been based on usage tied to the number of connected clients or proxies, and the details and discounts have changed over time. Confirm the current pricing model on the official pricing page before budgeting. Beyond the service charge, a mesh adds several real costs that should be counted from the start.
Control plane charges
Usage-based fees tied to the number of proxies or clients connected.
Proxy resources
Extra CPU and memory for sidecars on every instance, which grows with fleet size.
Network traffic
Cross-zone and cross-region calls may add charges, which locality-aware routing helps reduce.
Telemetry volume
Logs, metrics and traces stored in monitoring services add up with high detail.
Certificate authority usage
Issuing many short-lived certificates through a managed authority can carry its own charges.
People and process
Platform engineering time, training and ongoing operations.
Where a mesh saves money
The savings come from avoided work and avoided outages. Teams no longer write and maintain retry, timeout and encryption code in each service. Locality-aware routing reduces cross-zone traffic charges. Safer releases and faster incident diagnosis reduce the cost of downtime. For organizations with many services, these savings usually exceed the mesh’s direct costs. For a handful of services, a mesh may be more machinery than the problem justifies.
Where a Mesh Saves Money
- Less duplicated resilience and security code across teams
- Lower cross-zone traffic through locality-aware routing
- Fewer and shorter outages from safer rollouts
- Faster diagnosis through uniform telemetry
Where a Mesh Costs Money
- Per-proxy control plane and resource overhead
- Telemetry volume if left unchecked
- Platform team effort for upgrades and support
- Learning curve and migration effort
A traffic control system costs money to build and run, but a big city saves more through fewer jams and accidents. For a tiny village with two roads, the system is overkill. A mesh pays off as the number of services grows.
Right-size proxy resource requests using observed usage. Default settings are often generous, and trimming them across a large fleet can save a meaningful amount.
18Design Patterns and Anti-Patterns
A few patterns recur in healthy meshes, and a few traps recur in troubled ones.
Patterns that work well
Progressive delivery
Every release goes out as a canary with weighted routing and automated comparison of metrics. Promotion is a dial turned in steps, and rollback is setting a weight to zero.
Secure by default mesh
Encryption is on for all service-to-service calls, identities are automatic, and authorization policies deny everything not explicitly allowed. New services inherit the baseline.
Platform defaults with team overrides
The platform team sets safe default timeouts, retry budgets and circuit limits. Application teams override them only with justification, which keeps behavior consistent.
Locality-first routing with tested failover
Traffic stays in the nearest zone by default to save latency and cost, and failover paths are exercised regularly so they are trusted in a real incident.
Gateway at the boundaries
Controlled gateways handle traffic entering and leaving the mesh, so policy for external access lives in one reviewed place.
Anti-patterns to avoid
Problem
Retries are enabled with generous counts at every hop of a multi-service call chain.
Why It’s Harmful
Retries multiply across layers, turning a small failure into a retry storm that overwhelms struggling services and prolongs outages.
Correct Approach
Retry at one well-chosen layer, cap attempts, use a retry budget, retry only safe operations, and pair with circuit breaking.
Problem
The team treats the control plane as a single point of success, performing large rollouts and scaling events without considering control plane health.
Why It’s Harmful
During a control plane disruption, existing proxies continue but new proxies and updates cannot be configured, so changes made at that moment can fail in confusing ways.
Correct Approach
Monitor control plane connectivity, avoid risky changes during incidents, and keep proxies resilient to temporary loss of updates.
Problem
Strict mutual TLS and deny-by-default policies are switched on for the entire mesh in one step.
Why It’s Harmful
Services not yet in the mesh, or missing identity, are suddenly blocked, causing wide outages that are hard to attribute.
Correct Approach
Move through permissive mode first, observe real callers, fix gaps, then tighten service by service.
Problem
A mesh is introduced for a small system of a few services without a clear problem to solve.
Why It’s Harmful
The added complexity, resource overhead and operations burden outweigh the benefits, and the team spends more time running the mesh than the product.
Correct Approach
Adopt a mesh when service count and requirements justify it, and start with the specific pain point you want to remove.
19Traffic Director Compared with Other Options
Several tools overlap with Traffic Director, and each is strongest in a different place.
| Option | What it is | Strength | Limitation |
|---|---|---|---|
| Traffic Director | Managed control plane for Envoy and proxyless gRPC, spanning VMs, containers and hybrid | Fully managed, global awareness, mixed environments | Tied to Google Cloud’s control plane and configuration models |
| Cloud Service Mesh managed Istio-style control plane | Managed service mesh using Istio-compatible APIs, primarily for Kubernetes | Familiar Istio configuration, Kubernetes-centered | Best suited to Kubernetes-focused estates |
| Self-managed Istio or Linkerd | Open source meshes you operate yourself | Full control, portable across clouds | You operate and upgrade the control plane |
| Cloud Load Balancing | Managed load balancers for external and internal client traffic | Simple, strong for traffic entering from clients | Not a per-service mesh with sidecar policy and identity |
| Kubernetes Services and Ingress or Gateway | Built-in cluster networking and routing | Simple, native to Kubernetes | Limited advanced traffic policy and cross-environment reach |
| Client libraries in application code | Each language implements retries, timeouts and discovery itself | No extra infrastructure | Inconsistent across languages, hard to update everywhere |
How to choose
Start with the shape of your estate. If everything runs in Kubernetes and your team knows Istio, a Kubernetes-focused managed mesh may be the most natural path. If you have virtual machines and containers together, or want proxyless gRPC, or need to bridge on-premises services, Traffic Director’s flexibility is attractive. If your main need is balancing client traffic into your applications, Cloud Load Balancing is the simpler answer. Because product lines have shifted, consult the current Google Cloud guidance on which control plane to choose for new projects.
Mixed VM and container estates
A single control plane for both, with consistent policy.
gRPC-heavy microservices
Proxyless operation removes proxy overhead for supported libraries.
Hybrid and migration projects
Route to services wherever they live while moving them gradually.
Tiny systems with few services
The mesh may add more overhead than value.
A bicycle, a bus and a metro system all move people. A small town needs a bicycle lane, a mid-size city needs buses, and a huge metropolis needs a metro. The right tool depends on the scale and complexity of the movement.
20Best Practices and Common Mistakes
A short checklist separates calm meshes from chaotic ones.
Best practices
Start with a pilot and clear goals
Pick one benefit and a small set of services before expanding.
Set explicit timeouts everywhere
Make them shorter deeper in call chains so work is never done for callers who gave up.
Budget your retries
Cap attempts and retry only repeatable operations, ideally at one layer.
Use gradual security tightening
Permissive first, strict later, and deny-by-default introduced service by service.
Measure per version
Compare metrics for canary and baseline separately, never just the combined total.
Practice failover
Test zone and region loss regularly, and confirm spare capacity exists.
Automate proxy upgrades
Treat proxies as patched software with a rehearsed rollout process.
Define ownership
Platform, application and security teams should each know what they control.
Common mistakes
Believing the mesh makes applications reliable on its own. It contains and reports failures, but applications still need sensible design, idempotent operations and graceful degradation.
Ignoring the cost and latency of sidecars. Measure the overhead on real workloads and use proxyless options where they fit.
Configuring health checks that are too shallow or too deep. Shallow checks miss broken dependencies, deep checks cause mass failure when a shared dependency blips.
Letting configuration sprawl without review. Hundreds of unreviewed routing rules become a hidden risk. Store configuration as code, review changes and keep history.
Forgetting that application tracing headers must be propagated. Without them, traces break into fragments and the mesh’s visibility is much weaker.
Run regular game days where you inject failures into a test mesh and watch how routing, retries and failover behave. Confidence in a mesh comes from rehearsed failure, not from hope.
21Real-World and Industry Scenarios
Concrete stories show how the pieces fit together under real conditions.
Retail platform with safer releases
An online retailer with dozens of microservices releases several times a day. Every release is a weighted canary. Mesh metrics compare error rate and latency between versions, and an automated rule sets the canary weight to zero if the numbers worsen, so bad releases affect only a few percent of users for minutes.
Bank adopting zero trust internally
A bank requires encryption and identity for all internal calls. It enables mutual TLS in permissive mode, finds and onboards the remaining plain-text callers, then moves to strict mode and adds authorization policies so only named services may call payment systems. Audit teams can show exactly which service may call which.
Gradual migration from a data center
A manufacturing company moves services from its data center to Google Cloud over eighteen months. Hybrid endpoints let the mesh route calls to either location. Traffic for each service is shifted gradually from the on-premises copy to the cloud copy, with instant rollback available at every stage.
gRPC-heavy streaming platform
A media company runs thousands of internal gRPC calls per second between recommendation, catalog and playback services. It uses proxyless gRPC for the highest-volume paths to avoid sidecar latency and CPU cost, and sidecars for services in languages without xDS support.
Multi-region resilience for a SaaS product
A software company runs its core services in three regions. Locality-aware routing keeps requests near, and when a zone fails during a drill the traffic spills to neighboring zones without errors. The team uses these drills to prove capacity and to tune circuit breaker limits.
Mixed VM and container estate
A logistics firm has older services on virtual machines and newer ones in containers. One control plane gives both the same routing rules, timeouts and telemetry, so engineers can reason about the whole system with one set of dashboards.
In every story, the mesh did not replace good engineering. It gave teams a consistent, controllable network layer on which gradual, observable change became routine.
22Frequently Asked Questions
Short answers to the questions engineers ask most when evaluating Traffic Director.
No. Traffic Director is a control plane. It sends configuration to proxies, and your requests flow directly between proxies and services.
Existing proxies generally keep working with the last configuration they received. They cannot get updates, and new proxies cannot fetch an initial configuration until the connection returns.
No. Services using supported gRPC libraries can run proxyless, receiving configuration directly. Others use sidecars, and some clients can reach services through shared gateway or middle proxies.
No. Cloud Load Balancing mainly handles traffic coming into your applications from clients. Traffic Director configures service-to-service traffic inside your environment. They are often used together.
Yes, through hybrid connectivity endpoint groups and private connections such as VPN or dedicated interconnect, so on-premises and other cloud services can take part. Check current support and networking requirements.
Deploy the new version beside the old, use weighted routing to send a small share of traffic to it, compare metrics for each version, then increase the weight or set it back to zero. No redeployment is needed to change the split.
The most common cause is a firewall rule that blocks health check traffic from Google’s probe ranges. Other causes are a wrong port or path in the health check, or an endpoint that returns errors to probes.
It can, using mutual TLS with automatically issued and rotated certificates, once you enable and configure the relevant security features. A gradual rollout from permissive to strict mode is recommended.
Traffic Director is now part of the Cloud Service Mesh family, serving as a control plane for proxies across environments. Names and recommended setups change over time, so follow the latest Google Cloud documentation for new projects.
Pick a clear goal, such as safer releases or consistent encryption, choose a small pilot set of low-risk services, bring them into the mesh in observe-only mode, and add policy gradually while measuring results.
23Summary and Key Takeaways
Traffic Director is a managed control plane that tells a fleet of proxies, or proxyless gRPC clients, how to route, balance, protect and observe service-to-service traffic. It keeps decision making separate from traffic carrying, which lets it scale and lets existing traffic continue even if the control plane is briefly unreachable. It works across virtual machines, containers and hybrid environments, giving them one consistent set of rules.
Its real power appears in how it changes engineering habits. Releases become gradual dials instead of leaps, security becomes automatic identity and encryption instead of manual certificates, and failures are contained by timeouts, retry budgets and circuit breakers instead of spreading. Used with discipline, a gradual rollout and clear ownership, it removes whole categories of repetitive work and risk. Used carelessly, it adds complexity and amplifies failures. As product names and configuration styles evolve under the Cloud Service Mesh umbrella, keep the current documentation close.
Key Takeaways
- Control plane, not a traffic path — Traffic Director sends configuration over xDS to proxies, while requests flow directly between proxies and services.
- Pick the right data plane per workload — sidecars for any language and protocol, proxyless gRPC for low-overhead supported services, and gateways or middle proxies for boundaries and clients without proxies.
- Global awareness drives smart routing — locality-aware balancing keeps traffic near, and capacity-based overflow and failover move it away from trouble, but both must be tested.
- Release safely with traffic rules — weighted splits, header routing and mirroring make canaries routine, and measuring each version separately keeps failures visible.
- Treat resilience settings as scarce resources — explicit shrinking timeouts, capped and budgeted retries, circuit breaking and outlier detection prevent retry storms and cascading failure.
- Secure gradually — workload identity, mutual TLS and authorization policies tighten safely when rolled out from permissive to strict, service by service.
- Adopt with a plan — start with a pilot, add observability first, define ownership, automate proxy upgrades, and confirm current product naming and configuration guidance in the official documentation.