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-07 UTC."],[],[],null,["# Interface HttpRoute.DestinationOrBuilder (0.16.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.16.0 (latest)](/java/docs/reference/google-cloudevent-types/latest/com.google.events.cloud.networkservices.v1.HttpRoute.DestinationOrBuilder)\n- [0.15.0](/java/docs/reference/google-cloudevent-types/0.15.0/com.google.events.cloud.networkservices.v1.HttpRoute.DestinationOrBuilder)\n- [0.14.1](/java/docs/reference/google-cloudevent-types/0.14.1/com.google.events.cloud.networkservices.v1.HttpRoute.DestinationOrBuilder) \n\n public static interface HttpRoute.DestinationOrBuilder 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\nThe URL of a BackendService to route traffic to.\n\n`string service_name = 1;`\n\n### getServiceNameBytes()\n\n public abstract ByteString getServiceNameBytes()\n\nThe URL of a BackendService to route traffic to.\n\n`string service_name = 1;`\n\n### getWeight()\n\n public abstract int getWeight()\n\nSpecifies the proportion of requests forwarded to the backend referenced\nby the serviceName field. This is computed as:\nweight/Sum(weights in this destination list).\nFor non-zero values, there may be some epsilon from the exact proportion\ndefined here depending on the precision an implementation supports.\nIf only one serviceName is specified and it has a weight greater than 0,\n100% of the traffic is forwarded to that backend.\nIf weights are specified for any one service name, they need to be\nspecified for all of them.\nIf weights are unspecified for all services, then, traffic is distributed\nin equal proportions to all of them.\n\n`int32 weight = 2;`"]]