Load reporting service ()

    Sandbox environment

    Setup your sandbox environment with Docker and Docker Compose, and clone the Envoy repository with Git.

    This simple example demonstrates Envoy’s capability and how to use it.

    Lets say Cluster A (downstream) talks to Cluster B (Upstream) and Cluster C (Upstream). When enabling Load Report for Cluster A, LRS server should be sending LoadStatsResponse to Cluster A with LoadStatsResponse.Clusters to be B and C. LRS server will then receive LoadStatsRequests (with total requests, successful requests etc) from Cluster A to Cluster B and from Cluster A to Cluster C.

    In this example, all incoming requests are routed via Envoy to a simple goLang web server aka http_server. We scale up two containers and randomly send requests to each. Envoy is configured to initiate the connection with LRS Server. LRS Server enables the stats by sending LoadStatsResponse. Sending requests to http_server will be counted towards successful requests and will be visible in LRS Server logs.

    Terminal 1

    Terminal 2

    Terminal 2

    The script above (send_requests.sh) sends requests randomly to each Envoy, which in turn forwards the requests to the backend service.

    You should see

    See also

    Overview of Envoy’s Load reporting service.

    Load reporting service API(V3)

    The Load reporting service API.