GRPC C++
1.30.0
|
Client and server use test.proto.
The code for the xDS test server can be found at: Java (other language implementations are in progress).
Server should accept these arguments:
The base behavior of the xDS test client is to send a constant QPS of unary messages and record the remote-peer distribution of the responses. Further, the client must expose an implementation of the LoadBalancerStatsService
gRPC service to allow the test driver to validate the load balancing behavior for a particular test case (see below for more details).
The code for the xDS test client can be at: Java (other language implementations are in progress).
Clients should accept these arguments:
LoadBalancerStatsService
implementation.Note that, unlike our other interop tests, neither the client nor the server has any notion of which of the following test scenarios is under test. Instead, a separate test driver is responsible for configuring the load balancer and the server backends, running the client, and then querying the client's LoadBalancerStatsService
to validate load balancer behavior for each of the tests described below.
The service is defined as:
Note that the LoadBalancerStatsResponse
contains the remote peer distribution of the next num_rpcs
sent by the client after receiving the LoadBalancerStatsRequest
. It is important that the remote peer distribution be recorded for a block of consecutive outgoing RPCs, to validate the intended distribution from the load balancer, rather than just looking at the next num_rpcs
responses received from backends, as different backends may respond at different rates.
This test verifies that every backend receives traffic.
Client parameters:
Load balancer configuration:
Test driver asserts:
This test verifies that RPCs are evenly routed according to an unweighted round robin policy.
Client parameters:
Load balancer configuration:
Test driver asserts that:
This test verifies that the load balancer will resume sending traffic to a set of backends that is stopped and then resumed.
Client parameters:
Load balancer configuration:
Test driver asserts:
The test driver records the peer distribution for a subsequent block of 100 RPCs then stops the backends.
Test driver asserts:
The test driver resumes the backends.
Test driver asserts:
This test verifies that backends in a secondary locality receive traffic when all backends in the primary locality fail.
Client parameters:
Load balancer configuration:
Test driver asserts:
The test driver stops the backends in the primary locality.
Test driver asserts:
The test driver resumes the backends in the primary locality.
Test driver asserts:
This test verifies that backends in a failover locality do not receive traffic when at least one of the backends in the primary locality remain healthy.
Note: Future TD features may change the expected behavior and require changes to this test case.
Client parameters:
Load balancer configuration:
Test driver asserts:
The test driver stops one of the backends in the primary locality.
Test driver asserts:
This test verifies that new instance groups added to a backend service in the same zone receive traffic.
Client parameters:
Load balancer configuration:
Test driver asserts:
The test driver adds a new MIG with two backends in the same zone.
Test driver asserts:
This test verifies that a remaining instance group can successfully serve RPCs after removal of another instance group in the same zone.
Client parameters:
Load balancer configuration:
Test driver asserts:
The test driver removes one MIG.
Test driver asserts:
This test verifies that the backend service can be replaced and traffic routed to the new backends.
Client parameters:
Load balancer configuration:
Test driver asserts:
The test driver creates a new backend service containing a MIG with two backends and changes the TD URL map to point to this new backend service.
Test driver asserts: