Optional. Specifies the proportion of requests forwarded to the backend
referenced by the serviceName field. This is computed as:
weight/Sum(weights in this destination list).
For non-zero values, there may be some epsilon from the exact proportion
defined here depending on the precision an implementation supports.
If only one serviceName is specified and it has a weight greater than 0,
100% of the traffic is forwarded to that backend.
If weights are specified for any one service name, they need to be
specified for all of them.
If weights are unspecified for all services, then, traffic is distributed
in equal proportions to all of them.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-16 UTC."],[],[],null,["# Interface TcpRoute.RouteDestinationOrBuilder (0.28.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.28.0 (latest)](/java/docs/reference/google-cloud-networkservices/latest/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.26.0](/java/docs/reference/google-cloud-networkservices/0.26.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.24.0](/java/docs/reference/google-cloud-networkservices/0.24.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.23.0](/java/docs/reference/google-cloud-networkservices/0.23.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.20.0](/java/docs/reference/google-cloud-networkservices/0.20.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.19.0](/java/docs/reference/google-cloud-networkservices/0.19.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.18.0](/java/docs/reference/google-cloud-networkservices/0.18.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.16.0](/java/docs/reference/google-cloud-networkservices/0.16.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloud-networkservices/0.15.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.14.0](/java/docs/reference/google-cloud-networkservices/0.14.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.13.0](/java/docs/reference/google-cloud-networkservices/0.13.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.12.0](/java/docs/reference/google-cloud-networkservices/0.12.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.11.0](/java/docs/reference/google-cloud-networkservices/0.11.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.10.0](/java/docs/reference/google-cloud-networkservices/0.10.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.9.0](/java/docs/reference/google-cloud-networkservices/0.9.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.8.0](/java/docs/reference/google-cloud-networkservices/0.8.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.7.0](/java/docs/reference/google-cloud-networkservices/0.7.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.5.0](/java/docs/reference/google-cloud-networkservices/0.5.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.4.0](/java/docs/reference/google-cloud-networkservices/0.4.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.3.0](/java/docs/reference/google-cloud-networkservices/0.3.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.2.0](/java/docs/reference/google-cloud-networkservices/0.2.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder)\n- [0.1.0](/java/docs/reference/google-cloud-networkservices/0.1.0/com.google.cloud.networkservices.v1.TcpRoute.RouteDestinationOrBuilder) \n\n public static interface TcpRoute.RouteDestinationOrBuilder extends MessageOrBuilder\n\nImplements\n----------\n\n[MessageOrBuilder](https://cloud.google.com/java/docs/reference/protobuf/latest/com.google.protobuf.MessageOrBuilder.html)\n\nMethods\n-------\n\n### getServiceName()\n\n public abstract String getServiceName()\n\nRequired. The URL of a BackendService to route traffic to.\n\n`\nstring service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }\n`\n\n### getServiceNameBytes()\n\n public abstract ByteString getServiceNameBytes()\n\nRequired. The URL of a BackendService to route traffic to.\n\n`\nstring service_name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... }\n`\n\n### getWeight()\n\n public abstract int getWeight()\n\nOptional. Specifies the proportion of requests forwarded to the backend\nreferenced by the serviceName field. This is computed as:\n\n- weight/Sum(weights in this destination list).\n For non-zero values, there may be some epsilon from the exact proportion\n defined here depending on the precision an implementation supports.\n\n If only one serviceName is specified and it has a weight greater than 0,\n 100% of the traffic is forwarded to that backend.\n\n If weights are specified for any one service name, they need to be\n specified for all of them.\n\n If weights are unspecified for all services, then, traffic is distributed\n in equal proportions to all of them.\n\n`int32 weight = 2 [(.google.api.field_behavior) = OPTIONAL];`"]]