Using target proxies for Traffic Director

Traffic Director provides a Google Cloud-managed control plane for service meshes and global load balancing for internal microservices running in the service mesh. The target proxy is one of the load balancing components that you create when you configure Traffic Director.

The target proxy routes incoming requests to a URL map and terminates the connection to the user.

Target proxies serve several purposes:

  1. They associate a forwarding rule with a URL map.
  2. They have a specific type that indicates the type of traffic for which the configuration is relevant.
  3. They terminate connections to the user.

When Traffic Director is configured with proxies, traffic sent to the forwarding rule's IP address is intercepted by the sidecar proxy, which reads configuration information from the target proxy and URL map.

With proxyless gRPC services, Traffic Director looks up the URL maps referenced by all the forwarding rules whose port matches the port specified in the URI that a proxyless gRPC client uses to connect to a service. The hostname[:port] specified in the URI is matched against the host rules in all the URL maps. The path rules of the matching host rules are used to direct traffic to backend services.

Traffic Director forwarding rule highlighted (click to enlarge)
Traffic Director target proxy highlighted (click to enlarge)

The diagram shows how a target proxy fits into the Traffic Director architecture. Depending on your use of Traffic Director, you create either a target HTTP proxy or a target gRPC proxy. Any backend service referenced in the URL map of target gRPC proxy must have its protocol set to GRPC.

Target proxy resources

For adding, deleting, listing, and getting information about target proxies, you can use the REST API or the gcloud SDK.

When you create a routing rule map using the Google Cloud Console, the forwarding rule, target proxy and URL map are automatically created for you. You must explicit provide information about the forwarding rule. Because the Cloud Console doesn't require you to explicitly configure the target proxy, there is no page on which you can obtain information about a target proxy configured for Traffic Director.

You can, however, use the following gcloud commands to get information about a target proxy:

gcloud compute [target-http-proxies | target-grpc-proxies ] list
gcloud compute [target-http-proxies | target-grpc-proxies ] describe target-proxy-name


For descriptions of the properties and methods available to you when working with target proxies through the REST API, see the following pages:

gcloud SDK

For the gcloud command-line tool, see the following pages:

What's next

For more information, see: