@@ -120,6 +120,14 @@ examples:
120
120
primary_resource_id : ' default'
121
121
vars :
122
122
backend_service_name : ' backend-service'
123
+ - name : ' backend_service_custom_metrics'
124
+ primary_resource_id : ' default'
125
+ min_version : ' beta'
126
+ vars :
127
+ backend_service_name : ' backend-service'
128
+ default_neg_name : ' network-endpoint'
129
+ health_check_name : ' health-check'
130
+ network_name : ' network'
123
131
parameters :
124
132
properties :
125
133
- name : ' affinityCookieTtlSec'
@@ -147,8 +155,8 @@ properties:
147
155
Specifies the balancing mode for this backend.
148
156
149
157
For global HTTP(S) or TCP/SSL load balancing, the default is
150
- UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S))
151
- and CONNECTION (for TCP/SSL).
158
+ UTILIZATION. Valid values are UTILIZATION, RATE (for HTTP(S)),
159
+ CUSTOM_METRICS (for HTTP(s)) and CONNECTION (for TCP/SSL).
152
160
153
161
See the [Backend Services Overview](https://cloud.google.com/load-balancing/docs/backend-service#balancing-mode)
154
162
for an explanation of load balancing modes.
@@ -157,6 +165,7 @@ properties:
157
165
- ' UTILIZATION'
158
166
- ' RATE'
159
167
- ' CONNECTION'
168
+ - ' CUSTOM_METRICS'
160
169
- name : ' capacityScaler'
161
170
type : Double
162
171
description : |
@@ -261,6 +270,38 @@ properties:
261
270
Used when balancingMode is UTILIZATION. This ratio defines the
262
271
CPU utilization target for the group. Valid range is [0.0, 1.0].
263
272
default_from_api : true
273
+ - name : ' customMetrics'
274
+ type : Array
275
+ description : |
276
+ The set of custom metrics that are used for <code>CUSTOM_METRICS</code> BalancingMode.
277
+ item_type :
278
+ type : NestedObject
279
+ properties :
280
+ - name : ' name'
281
+ type : String
282
+ required : true
283
+ description : |
284
+ Name of a custom utilization signal. The name must be 1-64 characters
285
+ long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which
286
+ means the first character must be a lowercase letter, and all following
287
+ characters must be a dash, period, underscore, lowercase letter, or
288
+ digit, except the last character, which cannot be a dash, period, or
289
+ underscore. For usage guidelines, see Custom Metrics balancing mode. This
290
+ field can only be used for a global or regional backend service with the
291
+ loadBalancingScheme set to <code>EXTERNAL_MANAGED</code>,
292
+ <code>INTERNAL_MANAGED</code> <code>INTERNAL_SELF_MANAGED</code>.
293
+ - name : ' dryRun'
294
+ type : Boolean
295
+ required : true
296
+ description : |
297
+ If true, the metric data is collected and reported to Cloud
298
+ Monitoring, but is not used for load balancing.
299
+ - name : ' maxUtilization'
300
+ type : Double
301
+ description : |
302
+ Optional parameter to define a target utilization for the Custom Metrics
303
+ balancing mode. The valid range is <code>[0.0, 1.0]</code>.
304
+ default_value : 0.8
264
305
- name : ' circuitBreakers'
265
306
type : NestedObject
266
307
description : |
@@ -840,6 +881,13 @@ properties:
840
881
UNAVAILABLE_WEIGHT. Otherwise, Load Balancing remains
841
882
equal-weight.
842
883
884
+ * `WEIGHTED_ROUND_ROBIN`: Per-endpoint weighted round-robin Load Balancing using weights computed
885
+ from Backend reported Custom Metrics. If set, the Backend Service
886
+ responses are expected to contain non-standard HTTP response header field
887
+ X-Endpoint-Load-Metrics. The reported metrics
888
+ to use for computing the weights are specified via the
889
+ backends[].customMetrics fields.
890
+
843
891
locality_lb_policy is applicable to either:
844
892
845
893
* A regional backend service with the service_protocol set to HTTP, HTTPS, or HTTP2,
@@ -863,6 +911,7 @@ properties:
863
911
- ' ORIGINAL_DESTINATION'
864
912
- ' MAGLEV'
865
913
- ' WEIGHTED_MAGLEV'
914
+ - ' WEIGHTED_ROUND_ROBIN'
866
915
- name : ' localityLbPolicies'
867
916
type : Array
868
917
description : |
@@ -960,6 +1009,31 @@ properties:
960
1009
description : |
961
1010
An optional, arbitrary JSON object with configuration data, understood
962
1011
by a locally installed custom policy implementation.
1012
+ - name : ' customMetrics'
1013
+ type : Array
1014
+ description : |
1015
+ List of custom metrics that are used for the WEIGHTED_ROUND_ROBIN locality_lb_policy.
1016
+ item_type :
1017
+ type : NestedObject
1018
+ properties :
1019
+ - name : ' name'
1020
+ type : String
1021
+ required : true
1022
+ description : |
1023
+ Name of a custom utilization signal. The name must be 1-64 characters
1024
+ long and match the regular expression [a-z]([-_.a-z0-9]*[a-z0-9])? which
1025
+ means the first character must be a lowercase letter, and all following
1026
+ characters must be a dash, period, underscore, lowercase letter, or
1027
+ digit, except the last character, which cannot be a dash, period, or
1028
+ underscore. For usage guidelines, see Custom Metrics balancing mode. This
1029
+ field can only be used for a global or regional backend service with the
1030
+ loadBalancingScheme set to <code>EXTERNAL_MANAGED</code>,
1031
+ <code>INTERNAL_MANAGED</code> <code>INTERNAL_SELF_MANAGED</code>.
1032
+ - name : ' dryRun'
1033
+ type : Boolean
1034
+ required : true
1035
+ description : |
1036
+ If true, the metric data is not used for load balancing.
963
1037
- name : ' name'
964
1038
type : String
965
1039
description : |
0 commit comments