Traffic Director in Google Cloud: A Managed Control Plane for Service Mesh Traffic

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.

Simple Analogy

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.

Control plane
It configures proxies; it never carries your traffic
Managed
Google runs, scales and updates the control plane
Global
One set of rules across zones, regions and environments
i
Good to Know

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.

Term 1

Service mesh

A layer of infrastructure that manages communication between services, handling routing, resilience, security and observability outside application code.

Term 2

Control plane

The management brain that holds the rules and distributes them to proxies. Traffic Director is a control plane.

Term 3

Data plane

The proxies and clients that actually carry requests between services, following the rules the control plane sends.

Term 4

Envoy

A popular open source proxy used as the data plane in many meshes, including with Traffic Director.

Term 5

xDS

The family of discovery protocols proxies use to fetch configuration: listeners, routes, clusters and endpoints.

Term 6

Sidecar proxy

A proxy running next to an application instance that intercepts its inbound and outbound network calls.

Term 7

Proxyless gRPC

A model where the gRPC library inside the application speaks xDS directly, so no separate proxy is needed.

Term 8

Backend and endpoint

A backend is a group serving a service. An endpoint is one address and port inside it that can receive traffic.

Simple Analogy

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.

!
Common Misconception

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
        
FIG 1 — Configuration flows down; application traffic flows sideways

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.

Plane

Control plane

Stores rules and backend information, computes configuration for each proxy and pushes updates. Managed by Google.

Plane

Data plane

Proxies and proxyless clients that route and protect real requests. Deployed and updated by you.

Link

xDS connection

The long-lived stream from each proxy to the control plane carrying configuration updates.

Input

Backends and health

Information about which endpoints exist and which are healthy, feeding the routing decisions.

Simple Analogy

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.

i
Practical Tip

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 serviceWhat it tells the proxyEveryday meaning
Listener discoveryWhich ports and addresses to accept traffic onWhere the proxy listens
Route discoveryHow to match requests to destinationsThe rules: path, header and host matching
Cluster discoveryWhich logical services exist and how to treat themThe list of services and their policies
Endpoint discoveryThe actual addresses behind each service and their healthWhich servers are available right now
Secret discoveryThe certificates and keys for secure connectionsIdentity 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
        
FIG 2 — Bootstrap once, then receive live updates

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.

1

Proxy starts with a bootstrap

It reads where Traffic Director lives and what identity and network it belongs to.

2

Authentication and authorization

The proxy proves who it is using the service account of its host. The service account needs permission to receive configuration.

3

Initial configuration arrives

The control plane sends listeners, routes, clusters and endpoints relevant to that proxy.

4

The proxy serves traffic

Requests from the local application are matched against routes and sent to chosen endpoints.

5

Updates stream continuously

As backends scale, fail or rules change, the control plane pushes new versions that apply with no restart.

Simple Analogy

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.

!
Common Mistake

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
        
FIG 3 — One control plane, three data plane styles
ModelHow it worksStrengthsTrade-offs
Sidecar proxyAn Envoy runs beside each application instance and intercepts its trafficWorks with any language and protocol, no code changeExtra CPU and memory per instance, added hop of latency
Proxyless gRPCThe gRPC library in the application fetches xDS configuration directlyNo proxy overhead, lowest latencyOnly for supported gRPC languages and features
Gateway or edge proxyA standalone proxy routes traffic entering the mesh or leaving itCentral place for ingress rules and policyMust be scaled and secured as a shared component
Middle proxyA shared proxy tier sits between clients and a service, fronted by an internal load balancerServes clients that cannot run a sidecarExtra 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.

Choose

Sidecars when

Services use mixed languages or protocols, and you want zero application changes.

Choose

Proxyless gRPC when

Services already use supported gRPC libraries and latency or resource use matters most.

Choose

Gateways when

You need controlled entry or exit points for traffic crossing mesh boundaries.

Choose

Middle proxies when

Clients cannot run a proxy of their own, for example legacy or third-party callers.

Simple Analogy

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.

i
Practical Tip

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.

AspectLoad balancing resourcesService routing resources
OriginReuses Google Cloud load balancer building blocksModeled after the Kubernetes Gateway API
Mesh identityImplied by the network and forwarding ruleAn explicit mesh resource proxies attach to
Routing rulesURL maps with host and path matchersDedicated HTTP, gRPC, TCP and TLS route resources
Familiar toTeams with Google Cloud load balancing experienceTeams with Kubernetes Gateway API experience
BackendsBackend services with groups or endpoint groupsSame backend services referenced by routes
Resource

Backend service

The heart of both models: a logical service with its endpoints, health checks and traffic policies.

Resource

Health check

Defines how the platform tests whether an endpoint is healthy.

Resource

Mesh

In the newer model, the named scope that proxies join to receive configuration.

Resource

Routes

Rules that match requests by host, path, header or method and choose destinations.

Simple Analogy

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.

!
Common Mistake

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.

Backend type

Managed instance groups

Groups of identical virtual machines. Endpoints follow the group as it scales and heals.

Backend type

Network endpoint groups

Collections of individual addresses and ports, including container pods in Kubernetes, giving fine-grained, per-endpoint balancing.

Backend type

Hybrid connectivity endpoint groups

Endpoints outside Google Cloud, such as servers on-premises or in other clouds, reachable through private connections.

Automation

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.

1

Define the service

Create a logical backend service with a name, protocol, health check and policies.

2

Attach backends

Add instance groups or endpoint groups that actually run the service.

3

Control plane tracks membership

As instances come and go, the control plane updates its view of available endpoints.

4

Proxies receive endpoint updates

Each interested proxy gets the current list and begins using new endpoints right away.

Simple Analogy

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.

i
Practical Tip

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.

Check type

Protocol-level probes

Checks that connect over HTTP, HTTPS, TCP or gRPC and look for a successful answer.

Setting

Interval and timeout

How often to test and how long to wait. Shorter intervals detect failure faster but add load.

Setting

Healthy and unhealthy thresholds

How many successes or failures change an endpoint’s state, which avoids flapping on a single blip.

Requirement

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 styleHow it worksStrengthWeakness
Active health checksScheduled probes test each endpointDetects dead servers even with no trafficSlow between probes, tests only what the probe exercises
Passive outlier detectionProxies watch real request failuresReacts to real user-visible errors quicklyNeeds 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.

Simple Analogy

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.

!
Common Mistake

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"]
        
FIG 4 — Prefer local, spill over to nearby, then fail over farther

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 styleBehaviorGood for
Round robinTakes turns across endpointsSimple, similar-sized requests
Least requestPrefers the endpoint with the fewest active requestsRequests of uneven duration
Consistent hashing stylesSends the same key, such as a user or session, to the same endpointCaches and session affinity
RandomPicks an endpoint at randomLarge 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.

Simple Analogy

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.

i
Practical Tip

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"]
        
FIG 5 — Weighted, header-based and mirrored routing
Capability

Weighted traffic splitting

Send a chosen percentage of requests to each version. Ideal for canary releases that grow from a few percent upward.

Capability

Header and path matching

Route based on request details, such as a header, path, host or method, to reach different backends.

Capability

Traffic mirroring

Copy live requests to a test version without affecting users, whose answers are ignored.

Capability

Request redirects and rewrites

Change paths or hosts so callers and services can evolve independently.

Capability

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

1

Deploy the new version with no traffic

Run it beside the old version, healthy but unused, and test it directly.

2

Send a small share of traffic

Route a few percent of requests to the new version, or only requests from internal testers.

3

Watch the signals

Compare error rate and latency between versions, using mesh metrics for each backend.

4

Increase gradually or roll back

If healthy, step up the share. If not, set the weight back to zero immediately, with no redeployment.

Simple Analogy

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.

!
Common Mistake

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.

Policy

Timeouts

The longest a caller waits for an answer. Without timeouts, slow calls pile up and exhaust resources.

Policy

Retries

Automatically repeating a failed call, ideally on a different endpoint. Helps with transient errors, dangerous without limits.

Policy

Circuit breaking

Capping concurrent connections and requests to a service so one slow dependency cannot absorb every resource.

Policy

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.

SituationRisky settingSafer approach
Slow dependencyNo timeout, callers wait foreverSet a timeout shorter than the caller’s own deadline
Chain of servicesRetries at every layerRetry at one layer, with a small cap and retry budget
Non-repeatable operationAutomatic retries on payments or writesRetry only idempotent requests or use idempotency keys
Overloaded backendUnlimited concurrent requestsUse 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.

Simple Analogy

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.

!
Common Mistake

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.

Layer 1

Workload identity

Each service receives a verifiable identity, so receivers know exactly which service is calling.

Layer 2

Mutual TLS

Both sides of a connection present certificates, so traffic is encrypted and both ends are authenticated.

Layer 3

Automated certificate management

Certificates are issued and rotated automatically, often backed by a managed certificate authority, removing manual renewal chores.

Layer 4

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
        
FIG 6 — Mutual TLS with a policy check

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.

Simple Analogy

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.

i
Practical Tip

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.

Signal

Request rate

How much traffic each service and route receives.

Signal

Error rate

The share of calls failing, split by service, version and caller.

Signal

Latency distribution

Median and tail latencies, since averages hide slow outliers.

Signal

Saturation

How close backends and connections are to their limits.

Signal

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.

QuestionWhere 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
Simple Analogy

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.

!
Common Mistake

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
        
FIG 7 — One set of rules across environments

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.

Simple Analogy

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.

i
Practical Tip

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.

Check 1

API enablement

The relevant Google Cloud APIs must be enabled in the project before any configuration works.

Check 2

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.

Check 3

Firewall rules

Allow health check ranges to reach backends, and allow traffic between services on the ports they use.

Check 4

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.

Check 5

Correct bootstrap values

The project, network and mesh identity in the bootstrap must match your setup exactly.

Check 6

Proxy version compatibility

Use proxy versions supported by the control plane. Very old or very new versions may behave unexpectedly.

A troubleshooting ladder

1

Is the proxy connected?

Check whether the proxy has an active connection to the control plane and has received configuration.

2

Is the configuration what you expect?

Inspect the routes and endpoints the proxy actually holds. Compare them with what you configured.

3

Are the backends healthy?

Confirm health check results. If endpoints are unhealthy, check firewall rules for probe ranges.

4

Is the network path open?

Verify that the caller’s proxy can reach the endpoint’s address and port.

5

Do policies allow it?

Check security and authorization policies for rules that may deny the call.

Simple Analogy

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.

!
Common Mistake

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.

1

Set goals and choose a pilot

Pick one clear benefit and a small group of low-risk services owned by a willing team.

2

Add observability first

Bring services into the mesh in a passive mode and just watch. Learn real traffic patterns before changing behavior.

3

Introduce traffic policy gradually

Add timeouts and retries with conservative values, then canary routing, validating each step.

4

Enable encryption in permissive mode

Turn on mutual TLS where both sides support it, while still accepting plain connections from stragglers.

5

Tighten security

Switch to strict mode and introduce authorization policies service by service, starting with the most sensitive.

6

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.

Owner

Platform team

Runs the mesh, manages proxy upgrades, sets defaults and guardrails, and provides support and documentation.

Owner

Application teams

Define routes, canaries and resilience settings for their services within the platform’s guardrails.

Owner

Security team

Defines identity, encryption and authorization standards, and reviews exceptions.

Simple Analogy

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.

i
Practical Tip

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.

Per client
Control plane usage is typically tied to connected proxies
Proxy overhead
Sidecars consume CPU and memory beside every workload
Operations
Upgrades, policy reviews and platform staffing
Cost

Control plane charges

Usage-based fees tied to the number of proxies or clients connected.

Cost

Proxy resources

Extra CPU and memory for sidecars on every instance, which grows with fleet size.

Cost

Network traffic

Cross-zone and cross-region calls may add charges, which locality-aware routing helps reduce.

Cost

Telemetry volume

Logs, metrics and traces stored in monitoring services add up with high detail.

Cost

Certificate authority usage

Issuing many short-lived certificates through a managed authority can carry its own charges.

Cost

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
Simple Analogy

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.

i
Practical Tip

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

ANTI-PATTERN-01 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.

ANTI-PATTERN-02 Avoid
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.

ANTI-PATTERN-03 Avoid
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.

ANTI-PATTERN-04 Avoid
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.

OptionWhat it isStrengthLimitation
Traffic DirectorManaged control plane for Envoy and proxyless gRPC, spanning VMs, containers and hybridFully managed, global awareness, mixed environmentsTied to Google Cloud’s control plane and configuration models
Cloud Service Mesh managed Istio-style control planeManaged service mesh using Istio-compatible APIs, primarily for KubernetesFamiliar Istio configuration, Kubernetes-centeredBest suited to Kubernetes-focused estates
Self-managed Istio or LinkerdOpen source meshes you operate yourselfFull control, portable across cloudsYou operate and upgrade the control plane
Cloud Load BalancingManaged load balancers for external and internal client trafficSimple, strong for traffic entering from clientsNot a per-service mesh with sidecar policy and identity
Kubernetes Services and Ingress or GatewayBuilt-in cluster networking and routingSimple, native to KubernetesLimited advanced traffic policy and cross-environment reach
Client libraries in application codeEach language implements retries, timeouts and discovery itselfNo extra infrastructureInconsistent 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.

Fit

Mixed VM and container estates

A single control plane for both, with consistent policy.

Fit

gRPC-heavy microservices

Proxyless operation removes proxy overhead for supported libraries.

Fit

Hybrid and migration projects

Route to services wherever they live while moving them gradually.

Less fit

Tiny systems with few services

The mesh may add more overhead than value.

Simple Analogy

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

Practice 1

Start with a pilot and clear goals

Pick one benefit and a small set of services before expanding.

Practice 2

Set explicit timeouts everywhere

Make them shorter deeper in call chains so work is never done for callers who gave up.

Practice 3

Budget your retries

Cap attempts and retry only repeatable operations, ideally at one layer.

Practice 4

Use gradual security tightening

Permissive first, strict later, and deny-by-default introduced service by service.

Practice 5

Measure per version

Compare metrics for canary and baseline separately, never just the combined total.

Practice 6

Practice failover

Test zone and region loss regularly, and confirm spare capacity exists.

Practice 7

Automate proxy upgrades

Treat proxies as patched software with a rehearsed rollout process.

Practice 8

Define ownership

Platform, application and security teams should each know what they control.

Common mistakes

!
Mistake 1

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.

!
Mistake 2

Ignoring the cost and latency of sidecars. Measure the overhead on real workloads and use proxyless options where they fit.

!
Mistake 3

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.

!
Mistake 4

Letting configuration sprawl without review. Hundreds of unreviewed routing rules become a hidden risk. Store configuration as code, review changes and keep history.

!
Mistake 5

Forgetting that application tracing headers must be propagated. Without them, traces break into fragments and the mesh’s visibility is much weaker.

i
Habit Worth Building

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.

i
Pattern to Notice

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.

Q1Does my application traffic pass through Traffic Director?

No. Traffic Director is a control plane. It sends configuration to proxies, and your requests flow directly between proxies and services.

Q2What happens if the control plane becomes unreachable?

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.

Q3Do I need sidecar proxies for every service?

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.

Q4Is Traffic Director the same as Cloud Load Balancing?

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.

Q5Can it include services outside Google Cloud?

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.

Q6How do I do a canary release with it?

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.

Q7Why do my backends show as unhealthy when they are running?

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.

Q8Does the mesh encrypt traffic automatically?

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.

Q9How does Traffic Director relate to Cloud Service Mesh?

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.

Q10What is the best first step for adopting it?

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.