Load Reporting Service (LRS)
The Load Reporting Service provides a mechanism by which Envoy can emit Load Reports to a management server at a regular cadence.
This will initiate a bi-directional stream with a management server. Upon connecting, the management server can send a LoadStatsResponse to a node it is interested in getting the load reports for. Envoy in this node will start sending LoadStatsRequest. This is done periodically based on the load reporting interval.
Example of an Envoy config with LRS:
1node:
2 id: envoy-1
3 cluster: local_service
4static_resources:
5 listeners:
6 - address:
7 socket_address:
8 address: 0.0.0.0
9 port_value: 80
10 filter_chains:
11 - filters:
12 - name: envoy.filters.network.http_connection_manager
13 typed_config:
14 "@type": type.googleapis.com/envoy.extensions.filters.network.http_connection_manager.v3.HttpConnectionManager
15 codec_type: AUTO
16 stat_prefix: ingress_http
17 route_config:
18 name: local_route
19 virtual_hosts:
20 - name: service
21 domains:
22 - "*"
23 routes:
24 - match:
25 prefix: "/service"
26 route:
27 cluster: local_service
28 http_filters:
29 - name: envoy.filters.http.router
30 typed_config:
31 "@type": type.googleapis.com/envoy.extensions.filters.http.router.v3.Router
32 clusters:
33 - name: local_service
34 type: STRICT_DNS
35 lb_policy: ROUND_ROBIN
36 load_assignment:
37 cluster_name: local_service
38 endpoints:
39 - lb_endpoints:
40 - endpoint:
41 address:
42 socket_address:
43 address: http_service
44 port_value: 8080
45 - name: load_reporting_cluster
46 type: STRICT_DNS
47 lb_policy: ROUND_ROBIN
48 typed_extension_protocol_options:
49 envoy.extensions.upstreams.http.v3.HttpProtocolOptions:
50 "@type": type.googleapis.com/envoy.extensions.upstreams.http.v3.HttpProtocolOptions
51 explicit_http_config:
52 http2_protocol_options: {}
53 load_assignment:
54 cluster_name: load_reporting_cluster
55 endpoints:
56 - lb_endpoints:
57 - endpoint:
58 address:
59 socket_address:
60 address: lrs_server
61 port_value: 18000
62cluster_manager:
63 load_stats_config:
64 api_type: GRPC
65 grpc_services:
66 - envoy_grpc:
67 cluster_name: load_reporting_cluster
68admin:
69 address:
70 socket_address:
71 address: 0.0.0.0
72 port_value: 8081