Demo Project Changes - rocos-yishi/grpc-web GitHub Wiki

Updates

Updated the helloworld.proto file, added interval and message_size fields:

message RepeatHelloRequest {
  string name = 1;
  int32 count = 2;
  int32 interval = 3;
  int32 message_size = 4;
}

Other changes: https://github.com/rocos-yishi/grpc-web/commit/4118fb6fa436b56800bc8dc89cbb77fc06955637

Tests

Run server.js as grpcServer

Run docker for Envoy proxy

Run client.js as grpc-web tester.

After running as following settings, which means every 1 second send back 1000 KB content back to the client.

streamRequest.setCount(1000);
streamRequest.setInterval(1000);  // in ms
streamRequest.setMessageSize(1000); // in KB

Open Chrome Performance monitor, you will see below results:

image

Change settings to:

streamRequest.setCount(1000);
streamRequest.setInterval(100);  // in ms
streamRequest.setMessageSize(100); // in KB

You will see: image

There is a significant increase in trending for CPU usage.